From: Bernhard Beschow <shentey@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Aurelien Jarno" <aurelien@aurel32.net>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Sergio Lopez" <slp@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Igor Mammedov" <imammedo@redhat.com>,
"Ani Sinha" <anisinha@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Bernhard Beschow" <shentey@gmail.com>
Subject: [PATCH v2 0/8] ACPI: X86 AML generation and GPE tracing cleanup
Date: Fri, 8 Sep 2023 10:42:26 +0200 [thread overview]
Message-ID: <20230908084234.17642-1-shentey@gmail.com> (raw)
This series contains changes from my effort to bring the VIA south bridges to
the PC machine [1]. The first part of the series resolves the
AcpiCpuAmlIfClass::madt_cpu virtual method which frees ACPI controllers from
worrying about CPU AML generation. The second part minimizes an Intel-specific
assumption in AML generation to just one place. The third part contains two
ACPI tracing patches which have been reviewed a long time ago but weren't merged
yet.
The removal of AcpiCpuAmlIfClass::madt_cpu is essentially a respin of [2] with
a different approach. Igor wasn't generally against it but wasn't convinced
either [3]. The new approach causes much less churn and instead allows to
remove code. So I think it's worth to be reconsidered.
The motivation for removing this virtual method didn't change: It frees the ACPI
controllers in general and PIIX4 PM in particular from generating X86 CPU AML.
The latter is also used in MPIS context where X86 CPU AML generation is
stubbed out. This indicates a design issue where a problem was solved at the
wrong place. Moreover, it turned out that TYPE_ACPI_GED_X86 could be removed as
well, further supporting this claim.
The second part of this series limits SMI command port determination during AML
generation to just one place. Currently the ACPI_PORT_SMI_CMD constant is used
multiple times which has an Intel-specific value. In order to make the code a
microscopic bit more compatible with our VIA south bridge models its usage gets
limited to one place, allowing the constant to be turned into a device model
property in the future.
The third part improves the tracing experience for ACPI general purpose events.
It originates from an old series: [4].
Testing done:
* `make check`
* `make check-avocado`
v2:
* Trace ACPI GPE values with "0x%02" (Phil)
[1] https://github.com/shentok/qemu/tree/pc-via
[2] https://lore.kernel.org/qemu-devel/20230121151941.24120-1-shentey@gmail.com/
[3] https://lore.kernel.org/qemu-devel/20230125174842.395fda5d@imammedo.users.ipa.redhat.com/
[4] https://patchew.org/QEMU/20230122170724.21868-1-shentey@gmail.com/
Bernhard Beschow (8):
hw/i386/acpi-build: Use pc_madt_cpu_entry() directly
hw/acpi/cpu: Have build_cpus_aml() take a build_madt_cpu_fn callback
hw/acpi/acpi_dev_interface: Remove now unused madt_cpu virtual method
hw/acpi/acpi_dev_interface: Remove now unused #include "hw/boards.h"
hw/i386: Remove now redundant TYPE_ACPI_GED_X86
hw/i386/acpi-build: Determine SMI command port just once
hw/acpi: Trace GPE access in all device models, not just PIIX4
hw/acpi/core: Trace enable and status registers of GPE separately
hw/acpi/hmat.h | 3 ++-
hw/i386/acpi-common.h | 3 +--
include/hw/acpi/acpi_dev_interface.h | 3 ---
include/hw/acpi/cpu.h | 6 ++++-
include/hw/acpi/generic_event_device.h | 2 --
hw/acpi/acpi-x86-stub.c | 6 -----
hw/acpi/core.c | 9 +++++++
hw/acpi/cpu.c | 9 +++----
hw/acpi/hmat.c | 1 +
hw/acpi/memory_hotplug.c | 1 +
hw/acpi/piix4.c | 5 ----
hw/i386/acpi-build.c | 13 +++++-----
hw/i386/acpi-common.c | 5 ++--
hw/i386/acpi-microvm.c | 3 +--
hw/i386/generic_event_device_x86.c | 36 --------------------------
hw/i386/microvm.c | 2 +-
hw/isa/lpc_ich9.c | 1 -
hw/acpi/trace-events | 10 ++++---
hw/i386/meson.build | 1 -
19 files changed, 38 insertions(+), 81 deletions(-)
delete mode 100644 hw/i386/generic_event_device_x86.c
--
2.42.0
next reply other threads:[~2023-09-08 8:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 8:42 Bernhard Beschow [this message]
2023-09-08 8:42 ` [PATCH v2 1/8] hw/i386/acpi-build: Use pc_madt_cpu_entry() directly Bernhard Beschow
2023-09-08 8:42 ` [PATCH v2 2/8] hw/acpi/cpu: Have build_cpus_aml() take a build_madt_cpu_fn callback Bernhard Beschow
2023-09-08 8:42 ` [PATCH v2 3/8] hw/acpi/acpi_dev_interface: Remove now unused madt_cpu virtual method Bernhard Beschow
2023-09-08 8:42 ` [PATCH v2 4/8] hw/acpi/acpi_dev_interface: Remove now unused #include "hw/boards.h" Bernhard Beschow
2023-09-08 8:42 ` [PATCH v2 5/8] hw/i386: Remove now redundant TYPE_ACPI_GED_X86 Bernhard Beschow
2023-09-08 8:42 ` [PATCH v2 6/8] hw/i386/acpi-build: Determine SMI command port just once Bernhard Beschow
2023-09-08 8:42 ` [PATCH v2 7/8] hw/acpi: Trace GPE access in all device models, not just PIIX4 Bernhard Beschow
2023-09-08 8:42 ` [PATCH v2 8/8] hw/acpi/core: Trace enable and status registers of GPE separately Bernhard Beschow
2023-09-19 19:47 ` [PATCH v2 0/8] ACPI: X86 AML generation and GPE tracing cleanup Bernhard Beschow
2023-09-20 2:42 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230908084234.17642-1-shentey@gmail.com \
--to=shentey@gmail.com \
--cc=anisinha@redhat.com \
--cc=aurelien@aurel32.net \
--cc=eduardo@habkost.net \
--cc=imammedo@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=slp@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).