Files
qemu/include/hw
Bernhard Beschow 9a4fedcf12 hw/acpi/cpu: Have build_cpus_aml() take a build_madt_cpu_fn callback
build_cpus_aml() is architecture independent but needs to create architecture-
specific CPU AML. So far this was achieved by using a virtual method from
TYPE_ACPI_DEVICE_IF. However, build_cpus_aml() would resolve this interface from
global (!) state. This makes it quite incomprehensible where this interface
comes from (TYPE_PIIX4_PM?, TYPE_ICH9_LPC_DEVICE?, TYPE_ACPI_GED_X86?) an can
lead to crashes when the generic code is ported to new architectures.

So far, build_cpus_aml() is only called in architecture-specific code -- and
only in x86. We can therefore simply pass pc_madt_cpu_entry() as callback to
build_cpus_aml(). This is the same callback that would be used through
TYPE_ACPI_DEVICE_IF.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230908084234.17642-3-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-10-04 18:15:05 -04:00
..
2023-09-08 13:08:52 +03:00
2023-09-21 11:31:18 +03:00
2023-01-08 01:54:22 -05:00
2023-09-08 13:08:52 +03:00
2023-09-20 07:54:34 +03:00
2023-07-11 00:11:25 +02:00
2023-02-08 07:16:23 +01:00
2023-07-25 17:13:53 +03:00
2023-09-08 13:08:52 +03:00
2023-10-04 04:53:52 -04:00
2023-09-20 07:54:34 +03:00
2023-09-08 13:08:52 +03:00
2023-07-25 17:13:45 +03:00
2023-09-08 13:08:52 +03:00
2023-01-08 01:54:22 -05:00
2023-09-08 13:08:52 +03:00
2023-09-08 13:08:52 +03:00
2023-03-20 12:43:50 +01:00
2023-03-20 12:43:50 +01:00
2022-11-08 11:13:48 +01:00