@@ -1665,6 +1665,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
pcmc->pci_enabled = true;
pcmc->kvmclock_enabled = true;
pcmc->smbios_defaults = true;
+ pcmc->has_acpi_build = true;
mc->get_hotplug_handler = pc_get_hotpug_handler;
mc->default_boot_order = "cad";
mc->hot_add_cpu = pc_hot_add_cpu;
@@ -60,7 +60,6 @@ static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
static bool has_pci_info;
-static bool has_acpi_build = true;
/* Make sure that guest addresses aligned at 1Gbyte boundaries get mapped to
* host addresses aligned at 1Gbyte boundaries. This way we can use 1GByte
* pages in the host.
@@ -160,7 +159,7 @@ static void pc_init1(MachineState *machine)
guest_info = pc_guest_info_init(below_4g_mem_size, above_4g_mem_size);
- guest_info->has_acpi_build = has_acpi_build;
+ guest_info->has_acpi_build = pcmc->has_acpi_build;
guest_info->has_pci_info = has_pci_info;
guest_info->isapc_ram_fw = !pci_enabled;
@@ -311,7 +310,6 @@ static void pc_compat_1_6(MachineState *machine)
pc_compat_1_7(machine);
has_pci_info = false;
rom_file_has_mr = false;
- has_acpi_build = false;
}
static void pc_compat_1_5(MachineState *machine)
@@ -398,7 +396,6 @@ static void pc_init_pci_no_kvmclock(MachineState *machine)
static void pc_init_isa(MachineState *machine)
{
has_pci_info = false;
- has_acpi_build = false;
gigabyte_align = false;
has_reserved_memory = false;
option_rom_has_mr = true;
@@ -505,6 +502,7 @@ static const TypeInfo pc_i440fx_machine_v1_7_type_info = {
static void pc_i440fx_machine_v1_6_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(oc);
static GlobalProperty compat_props[] = {
PC_COMPAT_1_6,
{ /* end of list */ }
@@ -513,6 +511,7 @@ static void pc_i440fx_machine_v1_6_class_init(ObjectClass *oc, void *data)
mc->init = pc_init_pci_1_6;
mc->name = "pc-i440fx-1.6";
machine_class_add_compat_props(mc, compat_props);
+ pcmc->has_acpi_build = false;
}
static const TypeInfo pc_i440fx_machine_v1_6_type_info = {
@@ -972,6 +971,7 @@ static void isapc_machine_class_init(ObjectClass *oc, void *data)
mc->name = "isapc";
machine_class_add_compat_props(mc, compat_props);
pcmc->smbios_defaults = false;
+ pcmc->has_acpi_build = false;
}
static const TypeInfo isapc_machine_type_info = {
@@ -50,7 +50,6 @@
#define MAX_SATA_PORTS 6
static bool has_pci_info;
-static bool has_acpi_build = true;
/* Make sure that guest addresses aligned at 1Gbyte boundaries get mapped to
* host addresses aligned at 1Gbyte boundaries. This way we can use 1GByte
* pages in the host.
@@ -151,7 +150,7 @@ static void pc_q35_init(MachineState *machine)
guest_info = pc_guest_info_init(below_4g_mem_size, above_4g_mem_size);
guest_info->has_pci_info = has_pci_info;
guest_info->isapc_ram_fw = false;
- guest_info->has_acpi_build = has_acpi_build;
+ guest_info->has_acpi_build = pcmc->has_acpi_build;
guest_info->has_reserved_memory = has_reserved_memory;
if (pcmc->smbios_defaults) {
@@ -290,7 +289,6 @@ static void pc_compat_1_6(MachineState *machine)
pc_compat_1_7(machine);
has_pci_info = false;
rom_file_has_mr = false;
- has_acpi_build = false;
}
static void pc_compat_1_5(MachineState *machine)
@@ -415,6 +413,7 @@ static TypeInfo pc_q35_machine_v1_7_type_info = {
static void pc_q35_machine_v1_6_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
+ PCMachineClass *pcmc = PC_MACHINE_CLASS(oc);
static GlobalProperty compat_props[] = {
PC_COMPAT_1_6,
{ /* end of list */ }
@@ -423,6 +422,7 @@ static void pc_q35_machine_v1_6_class_init(ObjectClass *oc, void *data)
mc->init = pc_q35_init_1_6;
machine_class_add_compat_props(mc, compat_props);
mc->name = "pc-q35-1.6";
+ pcmc->has_acpi_build = false;
}
static TypeInfo pc_q35_machine_v1_6_type_info = {
@@ -57,6 +57,7 @@ struct PCMachineClass {
bool kvmclock_enabled;
bool smbios_legacy_mode;
bool smbios_defaults;
+ bool has_acpi_build;
};
typedef struct PCMachineState PCMachineState;
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- hw/i386/pc.c | 1 + hw/i386/pc_piix.c | 8 ++++---- hw/i386/pc_q35.c | 6 +++--- include/hw/i386/pc.h | 1 + 4 files changed, 9 insertions(+), 7 deletions(-)