[PATCH v3 00/15] acpi: i386 tweaks

Gerd Hoffmann posted 15 patches 4 years ago
Test docker-mingw@fedora passed
Test checkpatch failed
Test asan passed
Test docker-quick@centos7 passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200429140003.7336-1-kraxel@redhat.com
Maintainers: John Snow <jsnow@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Kevin Wolf <kwolf@redhat.com>, Richard Henderson <rth@twiddle.net>, "Michael S. Tsirkin" <mst@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Thomas Huth <thuth@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Igor Mammedov <imammedo@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Max Reitz <mreitz@redhat.com>
There is a newer version of this series
hw/i386/fw_cfg.h                            |   1 +
include/hw/acpi/aml-build.h                 |   1 -
include/hw/isa/isa.h                        |   2 +
include/hw/rtc/mc146818rtc.h                |   1 +
include/qemu/typedefs.h                     |   1 +
tests/qtest/bios-tables-test-allowed-diff.h |  17 ++
hw/acpi/aml-build-stub.c                    |  79 ++++++
hw/block/fdc.c                              |  83 ++++++
hw/char/parallel.c                          |  32 +++
hw/char/serial-isa.c                        |  32 +++
hw/i386/acpi-build.c                        | 271 +-------------------
hw/i386/fw_cfg.c                            |  28 ++
hw/input/pckbd.c                            |  31 +++
hw/isa/isa-bus.c                            |  15 ++
hw/rtc/mc146818rtc.c                        |  25 +-
stubs/cmos.c                                |   7 +
hw/acpi/Makefile.objs                       |   4 +-
stubs/Makefile.objs                         |   1 +
18 files changed, 361 insertions(+), 270 deletions(-)
create mode 100644 hw/acpi/aml-build-stub.c
create mode 100644 stubs/cmos.c
[PATCH v3 00/15] acpi: i386 tweaks
Posted by Gerd Hoffmann 4 years ago
First batch of microvm patches, some generic acpi stuff.
Split the acpi-build.c monster, specifically split the
pc and q35 and pci bits into a separate file which we
can skip building at some point in the future.

v2 changes: leave acpi-build.c largely as-is, move useful
bits to other places to allow them being reused, specifically:

 * move isa device generator functions to individual isa devices.
 * move fw_cfg generator function to fw_cfg.c

v3 changes: fix rtc, support multiple lpt devices.

take care,
  Gerd

Gerd Hoffmann (15):
  move 'typedef Aml' to qemu/types.h
  acpi: add aml builder stubs
  qtest: allow DSDT acpi table changes
  acpi: drop pointless _STA method
  acpi: add ISADeviceClass->build_aml()
  rtc: add RTC_ISA_BASE
  acpi: move aml builder code for rtc device
  acpi: serial: don't use _STA method
  acpi: move aml builder code for serial device
  acpi: parallel: don't use _STA method
  acpi: move aml builder code for parallel device
  acpi: move aml builder code for floppy device
  acpi: move aml builder code for i8042 (kbd+mouse) device
  acpi: factor out fw_cfg_add_acpi_dsdt()
  acpi: simplify build_isa_devices_aml()

 hw/i386/fw_cfg.h                            |   1 +
 include/hw/acpi/aml-build.h                 |   1 -
 include/hw/isa/isa.h                        |   2 +
 include/hw/rtc/mc146818rtc.h                |   1 +
 include/qemu/typedefs.h                     |   1 +
 tests/qtest/bios-tables-test-allowed-diff.h |  17 ++
 hw/acpi/aml-build-stub.c                    |  79 ++++++
 hw/block/fdc.c                              |  83 ++++++
 hw/char/parallel.c                          |  32 +++
 hw/char/serial-isa.c                        |  32 +++
 hw/i386/acpi-build.c                        | 271 +-------------------
 hw/i386/fw_cfg.c                            |  28 ++
 hw/input/pckbd.c                            |  31 +++
 hw/isa/isa-bus.c                            |  15 ++
 hw/rtc/mc146818rtc.c                        |  25 +-
 stubs/cmos.c                                |   7 +
 hw/acpi/Makefile.objs                       |   4 +-
 stubs/Makefile.objs                         |   1 +
 18 files changed, 361 insertions(+), 270 deletions(-)
 create mode 100644 hw/acpi/aml-build-stub.c
 create mode 100644 stubs/cmos.c

-- 
2.18.2


Re: [PATCH v3 00/15] acpi: i386 tweaks
Posted by Michael S. Tsirkin 4 years ago
On Wed, Apr 29, 2020 at 03:59:48PM +0200, Gerd Hoffmann wrote:
> First batch of microvm patches, some generic acpi stuff.
> Split the acpi-build.c monster, specifically split the
> pc and q35 and pci bits into a separate file which we
> can skip building at some point in the future.

OK I applied 1st part of this that got acks.

> v2 changes: leave acpi-build.c largely as-is, move useful
> bits to other places to allow them being reused, specifically:
> 
>  * move isa device generator functions to individual isa devices.
>  * move fw_cfg generator function to fw_cfg.c
> 
> v3 changes: fix rtc, support multiple lpt devices.
> 
> take care,
>   Gerd
> 
> Gerd Hoffmann (15):
>   move 'typedef Aml' to qemu/types.h
>   acpi: add aml builder stubs
>   qtest: allow DSDT acpi table changes
>   acpi: drop pointless _STA method
>   acpi: add ISADeviceClass->build_aml()
>   rtc: add RTC_ISA_BASE
>   acpi: move aml builder code for rtc device
>   acpi: serial: don't use _STA method
>   acpi: move aml builder code for serial device
>   acpi: parallel: don't use _STA method
>   acpi: move aml builder code for parallel device
>   acpi: move aml builder code for floppy device
>   acpi: move aml builder code for i8042 (kbd+mouse) device
>   acpi: factor out fw_cfg_add_acpi_dsdt()
>   acpi: simplify build_isa_devices_aml()
> 
>  hw/i386/fw_cfg.h                            |   1 +
>  include/hw/acpi/aml-build.h                 |   1 -
>  include/hw/isa/isa.h                        |   2 +
>  include/hw/rtc/mc146818rtc.h                |   1 +
>  include/qemu/typedefs.h                     |   1 +
>  tests/qtest/bios-tables-test-allowed-diff.h |  17 ++
>  hw/acpi/aml-build-stub.c                    |  79 ++++++
>  hw/block/fdc.c                              |  83 ++++++
>  hw/char/parallel.c                          |  32 +++
>  hw/char/serial-isa.c                        |  32 +++
>  hw/i386/acpi-build.c                        | 271 +-------------------
>  hw/i386/fw_cfg.c                            |  28 ++
>  hw/input/pckbd.c                            |  31 +++
>  hw/isa/isa-bus.c                            |  15 ++
>  hw/rtc/mc146818rtc.c                        |  25 +-
>  stubs/cmos.c                                |   7 +
>  hw/acpi/Makefile.objs                       |   4 +-
>  stubs/Makefile.objs                         |   1 +
>  18 files changed, 361 insertions(+), 270 deletions(-)
>  create mode 100644 hw/acpi/aml-build-stub.c
>  create mode 100644 stubs/cmos.c
> 
> -- 
> 2.18.2


Re: [PATCH v3 00/15] acpi: i386 tweaks
Posted by no-reply@patchew.org 4 years ago
Patchew URL: https://patchew.org/QEMU/20200429140003.7336-1-kraxel@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20200429140003.7336-1-kraxel@redhat.com
Subject: [PATCH v3 00/15] acpi: i386 tweaks
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Switched to a new branch 'test'
e42c6f8 acpi: simplify build_isa_devices_aml()
f55de34 acpi: factor out fw_cfg_add_acpi_dsdt()
e717e9e acpi: move aml builder code for i8042 (kbd+mouse) device
902fe4b acpi: move aml builder code for floppy device
381c640 acpi: move aml builder code for parallel device
7143112 acpi: parallel: don't use _STA method
652bafc acpi: move aml builder code for serial device
a156bbb acpi: serial: don't use _STA method
5b9e269 acpi: move aml builder code for rtc device
aee5c70 rtc: add RTC_ISA_BASE
0b4e292 acpi: add ISADeviceClass->build_aml()
aa50821 acpi: drop pointless _STA method
977bff5 qtest: allow DSDT acpi table changes
af6a412 acpi: add aml builder stubs
c714c16 move 'typedef Aml' to qemu/types.h

=== OUTPUT BEGIN ===
1/15 Checking commit c714c160fe50 (move 'typedef Aml' to qemu/types.h)
2/15 Checking commit af6a4124ef46 (acpi: add aml builder stubs)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#27: 
new file mode 100644

total: 0 errors, 1 warnings, 87 lines checked

Patch 2/15 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/15 Checking commit 977bff5929a2 (qtest: allow DSDT acpi table changes)
ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/acpi/aml-build-stub.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/acpi/aml-build-stub.c found

total: 2 errors, 0 warnings, 18 lines checked

Patch 3/15 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

4/15 Checking commit aa508215d7fe (acpi: drop pointless _STA method)
ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

total: 2 errors, 0 warnings, 40 lines checked

Patch 4/15 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

5/15 Checking commit 0b4e292ee2df (acpi: add ISADeviceClass->build_aml())
ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/isa/isa-bus.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/isa/isa-bus.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and include/hw/isa/isa.h found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and include/hw/isa/isa.h found

total: 6 errors, 0 warnings, 42 lines checked

Patch 5/15 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

6/15 Checking commit aee5c702ac1b (rtc: add RTC_ISA_BASE)
ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/rtc/mc146818rtc.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/rtc/mc146818rtc.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and include/hw/rtc/mc146818rtc.h found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and include/hw/rtc/mc146818rtc.h found

total: 4 errors, 0 warnings, 30 lines checked

Patch 6/15 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

7/15 Checking commit 5b9e269be56d (acpi: move aml builder code for rtc device)
ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/rtc/mc146818rtc.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/rtc/mc146818rtc.c found

total: 4 errors, 0 warnings, 68 lines checked

Patch 7/15 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

8/15 Checking commit a156bbb317d7 (acpi: serial: don't use _STA method)
ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

total: 2 errors, 0 warnings, 66 lines checked

Patch 8/15 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

9/15 Checking commit 652bafc9af4e (acpi: move aml builder code for serial device)
ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/char/serial-isa.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/char/serial-isa.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

total: 4 errors, 0 warnings, 97 lines checked

Patch 9/15 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

10/15 Checking commit 7143112749cd (acpi: parallel: don't use _STA method)
ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

total: 2 errors, 0 warnings, 54 lines checked

Patch 10/15 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

11/15 Checking commit 381c64082a32 (acpi: move aml builder code for parallel device)
ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/char/parallel.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/char/parallel.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

total: 4 errors, 0 warnings, 88 lines checked

Patch 11/15 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

12/15 Checking commit 902fe4b93a56 (acpi: move aml builder code for floppy device)
ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/block/fdc.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/block/fdc.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and stubs/Makefile.objs found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and stubs/Makefile.objs found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and stubs/cmos.c found

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#244: 
new file mode 100644

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and stubs/cmos.c found

total: 8 errors, 1 warnings, 221 lines checked

Patch 12/15 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

13/15 Checking commit e717e9e3bb42 (acpi: move aml builder code for i8042 (kbd+mouse) device)
ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/input/pckbd.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/input/pckbd.c found

total: 4 errors, 0 warnings, 100 lines checked

Patch 13/15 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

14/15 Checking commit f55de3428a01 (acpi: factor out fw_cfg_add_acpi_dsdt())
ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/fw_cfg.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/fw_cfg.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/fw_cfg.h found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/fw_cfg.h found

total: 6 errors, 0 warnings, 74 lines checked

Patch 14/15 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

15/15 Checking commit e42c6f818141 (acpi: simplify build_isa_devices_aml())
ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/i386/acpi-build.c found

total: 2 errors, 0 warnings, 24 lines checked

Patch 15/15 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200429140003.7336-1-kraxel@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com