[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
- [Qemu-devel] [RFC v2 32/39] pc: Rename pc_machine variable to pcms, (continued)
- [Qemu-devel] [RFC v2 32/39] pc: Rename pc_machine variable to pcms, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 34/39] pc: Move duplicate Xen init code to pc_machine_init(), Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 35/39] pc: Move icc_bridge variable to PCMachineState, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 36/39] pc: Move duplicate icc-bridge and CPU initalization to pc_machine_init(), Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 37/39] pc: Make pc_cpus_init() static, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 38/39] pc: Make pc_cpus_init() use PCMachineState, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 39/39] machine: Eliminate QEMUMachine.compat_props, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 19/39] pc: Move kvmclock_enabled to PCMachineClass, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 20/39] pc: Move smbios_legacy_mode to PCMachineClass, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 17/39] pc: Move pci_enabled parameter to PCMachineClass, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 18/39] q35: Use PCMachineClass.pci_enabled field,
Eduardo Habkost <=
- [Qemu-devel] [RFC v2 33/39] pc: Move {ram, pci, rom}_memory variables to PCMachineState, Eduardo Habkost, 2014/06/13
- Re: [Qemu-devel] [RFC v2 00/39] Convert PC machine-types to QOM classes, Eduardo Habkost, 2014/06/13