Lots of PcGuestInfo fields are duplicates of PCMachineClass or PCMachineState fields. Pass PCMachineState as argument to acpi_setup(), so we can simply let the ACPI code use those fields directly.
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- hw/i386/acpi-build.c | 3 ++- hw/i386/acpi-build.h | 2 +- hw/i386/pc.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index bca3f06..74f0922 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1893,8 +1893,9 @@ static const VMStateDescription vmstate_acpi_build = { }, }; -void acpi_setup(PcGuestInfo *guest_info) +void acpi_setup(PCMachineState *pcms) { + PcGuestInfo *guest_info = &pcms->acpi_guest_info; AcpiBuildTables tables; AcpiBuildState *build_state; diff --git a/hw/i386/acpi-build.h b/hw/i386/acpi-build.h index e57b1aa..132aba2 100644 --- a/hw/i386/acpi-build.h +++ b/hw/i386/acpi-build.h @@ -4,6 +4,6 @@ #include "qemu/typedefs.h" -void acpi_setup(PcGuestInfo *); +void acpi_setup(PCMachineState *pcms); #endif diff --git a/hw/i386/pc.c b/hw/i386/pc.c index a17e5b3e..fc98a20 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1179,7 +1179,7 @@ void pc_machine_done(Notifier *notifier, void *data) } } - acpi_setup(&pcms->acpi_guest_info); + acpi_setup(pcms); } PcGuestInfo *pc_guest_info_init(PCMachineState *pcms) -- 2.1.0