qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC v2 18/39] q35: Use PCMachineClass.pci_enabled field


From: Eduardo Habkost
Subject: [Qemu-devel] [RFC v2 18/39] q35: Use PCMachineClass.pci_enabled field
Date: Fri, 13 Jun 2014 16:43:57 -0300

Little step towards making the q35 and piix init functions converge, to
eliminate duplication.

Signed-off-by: Eduardo Habkost <address@hidden>
---
 hw/i386/pc_q35.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index e3da35c..8c0fe64 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -63,6 +63,8 @@ static bool has_reserved_memory = true;
 static void pc_q35_init(MachineState *machine)
 {
     PCMachineState *pc_machine = PC_MACHINE(machine);
+    PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(machine);
+    bool pci_enabled = pcmc->pci_enabled;
     ram_addr_t below_4g_mem_size, above_4g_mem_size;
     Q35PCIHost *q35_host;
     PCIHostState *phb;
@@ -76,7 +78,6 @@ static void pc_q35_init(MachineState *machine)
     MemoryRegion *ram_memory;
     GSIState *gsi_state;
     ISABus *isa_bus;
-    int pci_enabled = 1;
     qemu_irq *cpu_irq;
     qemu_irq *gsi;
     qemu_irq *i8259;
@@ -322,8 +323,10 @@ static void pc_q35_init_1_4(MachineState *machine)
 static void pc_q35_machine_class_init(ObjectClass *oc, void *data)
 {
     MachineClass *mc = MACHINE_CLASS(oc);
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(oc);
     mc->desc = "Standard PC (Q35 + ICH9, 2009)";
     mc->hot_add_cpu = pc_hot_add_cpu;
+    pcmc->pci_enabled = true;
 }
 
 #define TYPE_PC_Q35_MACHINE "pc-q35" TYPE_MACHINE_SUFFIX
-- 
1.9.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]