Little step towards making the q35 and piix init functions converge, to eliminate duplication.
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- 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