qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Marcel Apfelbaum <marcel@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Richard Henderson <rth@twiddle.net>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PULL 02/55] pc: Move compat boolean globals to PCMachineClass
Date: Tue, 22 Dec 2015 18:52:42 +0200	[thread overview]
Message-ID: <1450803119-4223-3-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1450803119-4223-1-git-send-email-mst@redhat.com>

From: Eduardo Habkost <ehabkost@redhat.com>

This way the compat flags can be initialized in the machine_options()
function. This will help us to eventually eliminate the pc_compat_*()
functions.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
---
 include/hw/i386/pc.h | 14 +++++++++
 hw/i386/pc.c         |  8 +++++
 hw/i386/pc_piix.c    | 84 +++++++++++++++++++++++++---------------------------
 hw/i386/pc_q35.c     | 54 +++++++++++++++------------------
 4 files changed, 86 insertions(+), 74 deletions(-)

diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 4bf4faf..969852f 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -75,6 +75,20 @@ struct PCMachineClass {
     bool broken_reserved_end;
     HotplugHandler *(*get_hotplug_handler)(MachineState *machine,
                                            DeviceState *dev);
+
+    bool pci_enabled;
+    bool has_acpi_build;
+    bool rsdp_in_ram;
+    bool smbios_defaults;
+    bool smbios_legacy_mode;
+    bool smbios_uuid_encoded;
+    /* 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.
+     */
+    bool gigabyte_align;
+    bool has_reserved_memory;
+    bool kvmclock_enabled;
 };
 
 #define TYPE_PC_MACHINE "generic-pc-machine"
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 426424a..c2e1a7e 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1953,6 +1953,14 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
     HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc);
 
     pcmc->get_hotplug_handler = mc->get_hotplug_handler;
+    pcmc->pci_enabled = true;
+    pcmc->has_acpi_build = true;
+    pcmc->rsdp_in_ram = true;
+    pcmc->smbios_defaults = true;
+    pcmc->smbios_uuid_encoded = true;
+    pcmc->gigabyte_align = true;
+    pcmc->has_reserved_memory = true;
+    pcmc->kvmclock_enabled = true;
     mc->get_hotplug_handler = pc_get_hotpug_handler;
     mc->cpu_index_to_socket_id = pc_cpu_index_to_socket_id;
     mc->default_boot_order = "cad";
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 319497e..9e486c6 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -61,26 +61,14 @@ static const int ide_iobase[MAX_IDE_BUS] = { 0x1f0, 0x170 };
 static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
 static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
 
-static bool pci_enabled = true;
-static bool has_acpi_build = true;
-static bool rsdp_in_ram = true;
 static int legacy_acpi_table_size;
-static bool smbios_defaults = true;
-static bool smbios_legacy_mode;
-static bool smbios_uuid_encoded = 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.
- */
-static bool gigabyte_align = true;
-static bool has_reserved_memory = true;
-static bool kvmclock_enabled = true;
 
 /* PC hardware initialisation */
 static void pc_init1(MachineState *machine,
                      const char *host_type, const char *pci_type)
 {
     PCMachineState *pcms = PC_MACHINE(machine);
+    PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
     MemoryRegion *system_memory = get_system_memory();
     MemoryRegion *system_io = get_system_io();
     int i;
@@ -109,7 +97,7 @@ static void pc_init1(MachineState *machine,
      * breaking migration.
      */
     if (machine->ram_size >= 0xe0000000) {
-        lowmem = gigabyte_align ? 0xc0000000 : 0xe0000000;
+        lowmem = pcmc->gigabyte_align ? 0xc0000000 : 0xe0000000;
     } else {
         lowmem = 0xe0000000;
     }
@@ -142,11 +130,11 @@ static void pc_init1(MachineState *machine,
 
     pc_cpus_init(pcms);
 
-    if (kvm_enabled() && kvmclock_enabled) {
+    if (kvm_enabled() && pcmc->kvmclock_enabled) {
         kvmclock_create();
     }
 
-    if (pci_enabled) {
+    if (pcmc->pci_enabled) {
         pci_memory = g_new(MemoryRegion, 1);
         memory_region_init(pci_memory, NULL, "pci", UINT64_MAX);
         rom_memory = pci_memory;
@@ -157,18 +145,19 @@ static void pc_init1(MachineState *machine,
 
     guest_info = pc_guest_info_init(pcms);
 
-    guest_info->has_acpi_build = has_acpi_build;
+    guest_info->has_acpi_build = pcmc->has_acpi_build;
     guest_info->legacy_acpi_table_size = legacy_acpi_table_size;
 
-    guest_info->isapc_ram_fw = !pci_enabled;
-    guest_info->has_reserved_memory = has_reserved_memory;
-    guest_info->rsdp_in_ram = rsdp_in_ram;
+    guest_info->isapc_ram_fw = !pcmc->pci_enabled;
+    guest_info->has_reserved_memory = pcmc->has_reserved_memory;
+    guest_info->rsdp_in_ram = pcmc->rsdp_in_ram;
 
-    if (smbios_defaults) {
+    if (pcmc->smbios_defaults) {
         MachineClass *mc = MACHINE_GET_CLASS(machine);
         /* These values are guest ABI, do not change */
         smbios_set_defaults("QEMU", "Standard PC (i440FX + PIIX, 1996)",
-                            mc->name, smbios_legacy_mode, smbios_uuid_encoded,
+                            mc->name, pcmc->smbios_legacy_mode,
+                            pcmc->smbios_uuid_encoded,
                             SMBIOS_ENTRY_POINT_21);
     }
 
@@ -183,14 +172,14 @@ static void pc_init1(MachineState *machine,
 
     gsi_state = g_malloc0(sizeof(*gsi_state));
     if (kvm_ioapic_in_kernel()) {
-        kvm_pc_setup_irq_routing(pci_enabled);
+        kvm_pc_setup_irq_routing(pcmc->pci_enabled);
         gsi = qemu_allocate_irqs(kvm_pc_gsi_handler, gsi_state,
                                  GSI_NUM_PINS);
     } else {
         gsi = qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS);
     }
 
-    if (pci_enabled) {
+    if (pcmc->pci_enabled) {
         pci_bus = i440fx_init(host_type,
                               pci_type,
                               &i440fx_state, &piix3_devfn, &isa_bus, gsi,
@@ -218,13 +207,13 @@ static void pc_init1(MachineState *machine,
         gsi_state->i8259_irq[i] = i8259[i];
     }
     g_free(i8259);
-    if (pci_enabled) {
+    if (pcmc->pci_enabled) {
         ioapic_init_gsi(gsi_state, "i440fx");
     }
 
     pc_register_ferr_irq(gsi[13]);
 
-    pc_vga_init(isa_bus, pci_enabled ? pci_bus : NULL);
+    pc_vga_init(isa_bus, pcmc->pci_enabled ? pci_bus : NULL);
 
     assert(pcms->vmport != ON_OFF_AUTO__MAX);
     if (pcms->vmport == ON_OFF_AUTO_AUTO) {
@@ -238,7 +227,7 @@ static void pc_init1(MachineState *machine,
     pc_nic_init(isa_bus, pci_bus);
 
     ide_drive_get(hd, ARRAY_SIZE(hd));
-    if (pci_enabled) {
+    if (pcmc->pci_enabled) {
         PCIDevice *dev;
         if (xen_enabled()) {
             dev = pci_piix3_xen_ide_init(pci_bus, hd, piix3_devfn + 1);
@@ -265,11 +254,11 @@ static void pc_init1(MachineState *machine,
 
     pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state);
 
-    if (pci_enabled && usb_enabled()) {
+    if (pcmc->pci_enabled && usb_enabled()) {
         pci_create_simple(pci_bus, piix3_devfn + 2, "piix3-usb-uhci");
     }
 
-    if (pci_enabled && acpi_enabled) {
+    if (pcmc->pci_enabled && acpi_enabled) {
         DeviceState *piix4_pm;
         I2CBus *smbus;
 
@@ -290,7 +279,7 @@ static void pc_init1(MachineState *machine,
                                  PC_MACHINE_ACPI_DEVICE_PROP, &error_abort);
     }
 
-    if (pci_enabled) {
+    if (pcmc->pci_enabled) {
         pc_pci_device_init(pci_bus);
     }
 }
@@ -316,7 +305,6 @@ static void pc_compat_2_3(MachineState *machine)
 static void pc_compat_2_2(MachineState *machine)
 {
     pc_compat_2_3(machine);
-    rsdp_in_ram = false;
     machine->suppress_vmdesc = true;
 }
 
@@ -325,7 +313,6 @@ static void pc_compat_2_1(MachineState *machine)
     PCMachineState *pcms = PC_MACHINE(machine);
 
     pc_compat_2_2(machine);
-    smbios_uuid_encoded = false;
     x86_cpu_change_kvm_default("svm", NULL);
     pcms->enforce_aligned_dimm = false;
 }
@@ -350,16 +337,12 @@ static void pc_compat_2_0(MachineState *machine)
      * QEMU 1.7 it is 6414.  For RHEL/CentOS 7.0 it is 6418.
      */
     legacy_acpi_table_size = 6652;
-    smbios_legacy_mode = true;
-    has_reserved_memory = false;
     pc_set_legacy_acpi_data_size();
 }
 
 static void pc_compat_1_7(MachineState *machine)
 {
     pc_compat_2_0(machine);
-    smbios_defaults = false;
-    gigabyte_align = false;
     option_rom_has_mr = true;
     legacy_acpi_table_size = 6414;
     x86_cpu_change_kvm_default("x2apic", NULL);
@@ -369,7 +352,6 @@ static void pc_compat_1_6(MachineState *machine)
 {
     pc_compat_1_7(machine);
     rom_file_has_mr = false;
-    has_acpi_build = false;
 }
 
 static void pc_compat_1_5(MachineState *machine)
@@ -399,17 +381,10 @@ static void pc_compat_1_2(MachineState *machine)
 static void pc_compat_0_13(MachineState *machine)
 {
     pc_compat_1_2(machine);
-    kvmclock_enabled = false;
 }
 
 static void pc_init_isa(MachineState *machine)
 {
-    pci_enabled = false;
-    has_acpi_build = false;
-    smbios_defaults = false;
-    gigabyte_align = false;
-    smbios_legacy_mode = true;
-    has_reserved_memory = false;
     option_rom_has_mr = true;
     rom_file_has_mr = false;
     if (!machine->cpu_model) {
@@ -511,9 +486,11 @@ DEFINE_I440FX_MACHINE(v2_3, "pc-i440fx-2.3", pc_compat_2_3,
 
 static void pc_i440fx_2_2_machine_options(MachineClass *m)
 {
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_i440fx_2_3_machine_options(m);
     m->hw_version = "2.2.0";
     SET_MACHINE_COMPAT(m, PC_COMPAT_2_2);
+    pcmc->rsdp_in_ram = false;
 }
 
 DEFINE_I440FX_MACHINE(v2_2, "pc-i440fx-2.2", pc_compat_2_2,
@@ -522,10 +499,12 @@ DEFINE_I440FX_MACHINE(v2_2, "pc-i440fx-2.2", pc_compat_2_2,
 
 static void pc_i440fx_2_1_machine_options(MachineClass *m)
 {
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_i440fx_2_2_machine_options(m);
     m->hw_version = "2.1.0";
     m->default_display = NULL;
     SET_MACHINE_COMPAT(m, PC_COMPAT_2_1);
+    pcmc->smbios_uuid_encoded = false;
 }
 
 DEFINE_I440FX_MACHINE(v2_1, "pc-i440fx-2.1", pc_compat_2_1,
@@ -535,9 +514,12 @@ DEFINE_I440FX_MACHINE(v2_1, "pc-i440fx-2.1", pc_compat_2_1,
 
 static void pc_i440fx_2_0_machine_options(MachineClass *m)
 {
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_i440fx_2_1_machine_options(m);
     m->hw_version = "2.0.0";
     SET_MACHINE_COMPAT(m, PC_COMPAT_2_0);
+    pcmc->smbios_legacy_mode = true;
+    pcmc->has_reserved_memory = false;
 }
 
 DEFINE_I440FX_MACHINE(v2_0, "pc-i440fx-2.0", pc_compat_2_0,
@@ -546,10 +528,13 @@ DEFINE_I440FX_MACHINE(v2_0, "pc-i440fx-2.0", pc_compat_2_0,
 
 static void pc_i440fx_1_7_machine_options(MachineClass *m)
 {
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_i440fx_2_0_machine_options(m);
     m->hw_version = "1.7.0";
     m->default_machine_opts = NULL;
     SET_MACHINE_COMPAT(m, PC_COMPAT_1_7);
+    pcmc->smbios_defaults = false;
+    pcmc->gigabyte_align = false;
 }
 
 DEFINE_I440FX_MACHINE(v1_7, "pc-i440fx-1.7", pc_compat_1_7,
@@ -558,9 +543,11 @@ DEFINE_I440FX_MACHINE(v1_7, "pc-i440fx-1.7", pc_compat_1_7,
 
 static void pc_i440fx_1_6_machine_options(MachineClass *m)
 {
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_i440fx_1_7_machine_options(m);
     m->hw_version = "1.6.0";
     SET_MACHINE_COMPAT(m, PC_COMPAT_1_6);
+    pcmc->has_acpi_build = false;
 }
 
 DEFINE_I440FX_MACHINE(v1_6, "pc-i440fx-1.6", pc_compat_1_6,
@@ -814,9 +801,11 @@ DEFINE_I440FX_MACHINE(v0_14, "pc-0.14", pc_compat_1_2,
 
 static void pc_i440fx_0_13_machine_options(MachineClass *m)
 {
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_i440fx_0_14_machine_options(m);
     m->hw_version = "0.13";
     SET_MACHINE_COMPAT(m, PC_COMPAT_0_13);
+    pcmc->kvmclock_enabled = false;
 }
 
 DEFINE_I440FX_MACHINE(v0_13, "pc-0.13", pc_compat_0_13,
@@ -1038,8 +1027,15 @@ void igd_passthrough_isa_bridge_create(PCIBus *bus, uint16_t gpu_dev_id)
 
 static void isapc_machine_options(MachineClass *m)
 {
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     m->desc = "ISA-only PC";
     m->max_cpus = 1;
+    pcmc->pci_enabled = false;
+    pcmc->has_acpi_build = false;
+    pcmc->smbios_defaults = false;
+    pcmc->gigabyte_align = false;
+    pcmc->smbios_legacy_mode = true;
+    pcmc->has_reserved_memory = false;
 }
 
 DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa,
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 9a12068..c028748 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -49,22 +49,11 @@
 /* ICH9 AHCI has 6 ports */
 #define MAX_SATA_PORTS     6
 
-static bool has_acpi_build = true;
-static bool rsdp_in_ram = true;
-static bool smbios_defaults = true;
-static bool smbios_legacy_mode;
-static bool smbios_uuid_encoded = 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.
- */
-static bool gigabyte_align = true;
-static bool has_reserved_memory = true;
-
 /* PC hardware initialisation */
 static void pc_q35_init(MachineState *machine)
 {
     PCMachineState *pcms = PC_MACHINE(machine);
+    PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms);
     Q35PCIHost *q35_host;
     PCIHostState *phb;
     PCIBus *host_bus;
@@ -76,7 +65,6 @@ static void pc_q35_init(MachineState *machine)
     MemoryRegion *ram_memory;
     GSIState *gsi_state;
     ISABus *isa_bus;
-    int pci_enabled = 1;
     qemu_irq *gsi;
     qemu_irq *i8259;
     int i;
@@ -97,7 +85,7 @@ static void pc_q35_init(MachineState *machine)
      * breaking migration.
      */
     if (machine->ram_size >= 0xb0000000) {
-        lowmem = gigabyte_align ? 0x80000000 : 0xb0000000;
+        lowmem = pcmc->gigabyte_align ? 0x80000000 : 0xb0000000;
     } else {
         lowmem = 0xb0000000;
     }
@@ -134,7 +122,7 @@ static void pc_q35_init(MachineState *machine)
     kvmclock_create();
 
     /* pci enabled */
-    if (pci_enabled) {
+    if (pcmc->pci_enabled) {
         pci_memory = g_new(MemoryRegion, 1);
         memory_region_init(pci_memory, NULL, "pci", UINT64_MAX);
         rom_memory = pci_memory;
@@ -145,19 +133,20 @@ static void pc_q35_init(MachineState *machine)
 
     guest_info = pc_guest_info_init(pcms);
     guest_info->isapc_ram_fw = false;
-    guest_info->has_acpi_build = has_acpi_build;
-    guest_info->has_reserved_memory = has_reserved_memory;
-    guest_info->rsdp_in_ram = rsdp_in_ram;
+    guest_info->has_acpi_build = pcmc->has_acpi_build;
+    guest_info->has_reserved_memory = pcmc->has_reserved_memory;
+    guest_info->rsdp_in_ram = pcmc->rsdp_in_ram;
 
     /* Migration was not supported in 2.0 for Q35, so do not bother
      * with this hack (see hw/i386/acpi-build.c).
      */
     guest_info->legacy_acpi_table_size = 0;
 
-    if (smbios_defaults) {
+    if (pcmc->smbios_defaults) {
         /* These values are guest ABI, do not change */
         smbios_set_defaults("QEMU", "Standard PC (Q35 + ICH9, 2009)",
-                            mc->name, smbios_legacy_mode, smbios_uuid_encoded,
+                            mc->name, pcmc->smbios_legacy_mode,
+                            pcmc->smbios_uuid_encoded,
                             SMBIOS_ENTRY_POINT_21);
     }
 
@@ -170,7 +159,7 @@ static void pc_q35_init(MachineState *machine)
     /* irq lines */
     gsi_state = g_malloc0(sizeof(*gsi_state));
     if (kvm_irqchip_in_kernel()) {
-        kvm_pc_setup_irq_routing(pci_enabled);
+        kvm_pc_setup_irq_routing(pcmc->pci_enabled);
         gsi = qemu_allocate_irqs(kvm_pc_gsi_handler, gsi_state,
                                  GSI_NUM_PINS);
     } else {
@@ -227,7 +216,7 @@ static void pc_q35_init(MachineState *machine)
     for (i = 0; i < ISA_NUM_IRQS; i++) {
         gsi_state->i8259_irq[i] = i8259[i];
     }
-    if (pci_enabled) {
+    if (pcmc->pci_enabled) {
         ioapic_init_gsi(gsi_state, "q35");
     }
 
@@ -272,7 +261,7 @@ static void pc_q35_init(MachineState *machine)
     /* the rest devices to which pci devfn is automatically assigned */
     pc_vga_init(isa_bus, host_bus);
     pc_nic_init(isa_bus, host_bus);
-    if (pci_enabled) {
+    if (pcmc->pci_enabled) {
         pc_pci_device_init(host_bus);
     }
 }
@@ -298,7 +287,6 @@ static void pc_compat_2_3(MachineState *machine)
 static void pc_compat_2_2(MachineState *machine)
 {
     pc_compat_2_3(machine);
-    rsdp_in_ram = false;
     machine->suppress_vmdesc = true;
 }
 
@@ -308,23 +296,18 @@ static void pc_compat_2_1(MachineState *machine)
 
     pc_compat_2_2(machine);
     pcms->enforce_aligned_dimm = false;
-    smbios_uuid_encoded = false;
     x86_cpu_change_kvm_default("svm", NULL);
 }
 
 static void pc_compat_2_0(MachineState *machine)
 {
     pc_compat_2_1(machine);
-    smbios_legacy_mode = true;
-    has_reserved_memory = false;
     pc_set_legacy_acpi_data_size();
 }
 
 static void pc_compat_1_7(MachineState *machine)
 {
     pc_compat_2_0(machine);
-    smbios_defaults = false;
-    gigabyte_align = false;
     option_rom_has_mr = true;
     x86_cpu_change_kvm_default("x2apic", NULL);
 }
@@ -333,7 +316,6 @@ static void pc_compat_1_6(MachineState *machine)
 {
     pc_compat_1_7(machine);
     rom_file_has_mr = false;
-    has_acpi_build = false;
 }
 
 static void pc_compat_1_5(MachineState *machine)
@@ -409,9 +391,11 @@ DEFINE_Q35_MACHINE(v2_3, "pc-q35-2.3", pc_compat_2_3,
 
 static void pc_q35_2_2_machine_options(MachineClass *m)
 {
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_q35_2_3_machine_options(m);
     m->hw_version = "2.2.0";
     SET_MACHINE_COMPAT(m, PC_COMPAT_2_2);
+    pcmc->rsdp_in_ram = false;
 }
 
 DEFINE_Q35_MACHINE(v2_2, "pc-q35-2.2", pc_compat_2_2,
@@ -420,10 +404,12 @@ DEFINE_Q35_MACHINE(v2_2, "pc-q35-2.2", pc_compat_2_2,
 
 static void pc_q35_2_1_machine_options(MachineClass *m)
 {
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_q35_2_2_machine_options(m);
     m->hw_version = "2.1.0";
     m->default_display = NULL;
     SET_MACHINE_COMPAT(m, PC_COMPAT_2_1);
+    pcmc->smbios_uuid_encoded = false;
 }
 
 DEFINE_Q35_MACHINE(v2_1, "pc-q35-2.1", pc_compat_2_1,
@@ -432,9 +418,12 @@ DEFINE_Q35_MACHINE(v2_1, "pc-q35-2.1", pc_compat_2_1,
 
 static void pc_q35_2_0_machine_options(MachineClass *m)
 {
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_q35_2_1_machine_options(m);
     m->hw_version = "2.0.0";
     SET_MACHINE_COMPAT(m, PC_COMPAT_2_0);
+    pcmc->has_reserved_memory = false;
+    pcmc->smbios_legacy_mode = true;
 }
 
 DEFINE_Q35_MACHINE(v2_0, "pc-q35-2.0", pc_compat_2_0,
@@ -443,10 +432,13 @@ DEFINE_Q35_MACHINE(v2_0, "pc-q35-2.0", pc_compat_2_0,
 
 static void pc_q35_1_7_machine_options(MachineClass *m)
 {
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_q35_2_0_machine_options(m);
     m->hw_version = "1.7.0";
     m->default_machine_opts = NULL;
     SET_MACHINE_COMPAT(m, PC_COMPAT_1_7);
+    pcmc->smbios_defaults = false;
+    pcmc->gigabyte_align = false;
 }
 
 DEFINE_Q35_MACHINE(v1_7, "pc-q35-1.7", pc_compat_1_7,
@@ -455,9 +447,11 @@ DEFINE_Q35_MACHINE(v1_7, "pc-q35-1.7", pc_compat_1_7,
 
 static void pc_q35_1_6_machine_options(MachineClass *m)
 {
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_q35_machine_options(m);
     m->hw_version = "1.6.0";
     SET_MACHINE_COMPAT(m, PC_COMPAT_1_6);
+    pcmc->has_acpi_build = false;
 }
 
 DEFINE_Q35_MACHINE(v1_6, "pc-q35-1.6", pc_compat_1_6,
-- 
MST

  parent reply	other threads:[~2015-12-22 16:52 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-22 16:52 [Qemu-devel] [PULL 00/55] acpi, pc features Michael S. Tsirkin
2015-12-22 16:52 ` [Qemu-devel] [PULL 01/55] mmap-alloc: tweak a comment on ppc64 Michael S. Tsirkin
2015-12-22 16:52 ` Michael S. Tsirkin [this message]
2015-12-22 16:52 ` [Qemu-devel] [PULL 03/55] pc: Move legacy_acpi_table_size global to PCMachineClass Michael S. Tsirkin
2015-12-22 16:52 ` [Qemu-devel] [PULL 04/55] pc: Move acpi_data_size " Michael S. Tsirkin
2015-12-22 16:52 ` [Qemu-devel] [PULL 05/55] pc: Move enforce_aligned_dimm " Michael S. Tsirkin
2015-12-22 16:52 ` [Qemu-devel] [PULL 06/55] pc: Remove enforce-aligned-dimm QOM property Michael S. Tsirkin
2015-12-22 16:52 ` [Qemu-devel] [PULL 07/55] pc: Move option_rom_has_mr/rom_file_has_mr globals to MachineClass Michael S. Tsirkin
2015-12-22 16:52 ` [Qemu-devel] [PULL 08/55] hw/acpi: merge pxb adjacent memory/IO ranges Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 09/55] hw/pxb: introduce pxb-pcie expander for PCIe machines Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 10/55] hw/i386: extend pxb query for all PC machines Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 11/55] q35: Remove MCHPCIState.guest_info field Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 12/55] pc: Group and document related PCMachineState/PCMachineclass fields Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 13/55] Add a base IPMI interface Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 14/55] ipmi: Add a local BMC simulation Michael S. Tsirkin
2016-01-08  9:02   ` Paolo Bonzini
2016-01-08  9:05   ` Paolo Bonzini
2016-01-12 11:06     ` Michael S. Tsirkin
2016-01-12 12:02       ` Paolo Bonzini
2015-12-22 16:53 ` [Qemu-devel] [PULL 15/55] ipmi: Add an external connection simulation interface Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 16/55] ipmi: Add an ISA KCS low-level interface Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 17/55] ipmi: Add a BT " Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 18/55] ipmi: Add tests Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 19/55] ipmi: Add documentation Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 20/55] ipmi: Add migration capability to the IPMI devices Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 21/55] ipmi: Add a firmware configuration repository Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 22/55] ipmi: Add firmware registration to the ISA interface Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 23/55] ipmi: Add a force off function Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 24/55] q35: skip q35-acpi-dsdt.aml load if not needed Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 25/55] pc: Remove redundant code from pc-*-2.3 machine classes Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 26/55] pc: Add pc-*-2.6 " Michael S. Tsirkin
2015-12-22 16:53 ` [Qemu-devel] [PULL 27/55] pc: Change indentation of PC_COMPAT_* to 4 spaces Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 28/55] hw/compat.h: Change indentation of HW_COMPAT_* " Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 29/55] docs/pci_expander_bridge: fix typo Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 30/55] nvdimm: implement NVDIMM device abstract Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 31/55] acpi: support specified oem table id for build_header Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 32/55] nvdimm acpi: build ACPI NFIT table Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 33/55] nvdimm acpi: build ACPI nvdimm devices Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 34/55] nvdimm: add maintain info Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 35/55] acpi: add aml_derefof Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 36/55] acpi: add aml_sizeof Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 37/55] acpi: add aml_lgreater_equal() Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 38/55] acpi: add aml_mutex(), aml_acquire(), aml_release() Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 39/55] acpi: add aml_create_qword_field() Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 40/55] acpi: aml: add helper for Opcode Arg2 Arg2 [Dst] AML pattern Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 41/55] acpi: extend aml_add() to accept target argument Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 42/55] acpi: add aml_decrement() and aml_subtract() Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 43/55] acpi: add aml_call0() helper Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 44/55] acpi: add aml_to_integer() Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 45/55] acpi: extend aml_shiftright() to accept target argument Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 46/55] acpi: add aml_alias() Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 47/55] acpi: add aml_sleep() Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 48/55] acpi: add aml_lor() Michael S. Tsirkin
2015-12-22 16:54 ` [Qemu-devel] [PULL 49/55] acpi: add aml_lgreater() Michael S. Tsirkin
2015-12-22 16:55 ` [Qemu-devel] [PULL 50/55] acpi: extend aml_field() to support LockRule Michael S. Tsirkin
2015-12-22 16:55 ` [Qemu-devel] [PULL 51/55] acpi: add aml_to_hexstring() Michael S. Tsirkin
2015-12-22 16:55 ` [Qemu-devel] [PULL 52/55] acpi: add aml_to_buffer() Michael S. Tsirkin
2015-12-22 16:55 ` [Qemu-devel] [PULL 53/55] acpi add aml_dma() Michael S. Tsirkin
2015-12-22 16:55 ` [Qemu-devel] [PULL 54/55] acpi: extend aml_or() to accept target argument Michael S. Tsirkin
2015-12-22 16:55 ` [Qemu-devel] [PULL 55/55] acpi: extend aml_and() " Michael S. Tsirkin
2015-12-23 12:55 ` [Qemu-devel] [PULL 00/55] acpi, pc features Peter Maydell
2016-01-08 14:53 ` Peter Maydell

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=1450803119-4223-3-git-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=marcel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).