[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [v4][PATCH 2/5] pc_init1: pass parameters just with types
From: |
Tiejun Chen |
Subject: |
[Qemu-devel] [v4][PATCH 2/5] pc_init1: pass parameters just with types |
Date: |
Wed, 6 Aug 2014 14:50:32 +0800 |
Pass types to configure pc_init1().
Signed-off-by: Tiejun Chen <address@hidden>
---
hw/i386/pc_piix.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
v4:
* New patch to work for patch #1
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index bf26550..2bf8046 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -74,7 +74,9 @@ static bool has_reserved_memory = true;
/* PC hardware initialisation */
static void pc_init1(MachineState *machine,
int pci_enabled,
- int kvmclock_enabled)
+ int kvmclock_enabled,
+ const char *host_type,
+ const char *pci_type)
{
PCMachineState *pc_machine = PC_MACHINE(machine);
MemoryRegion *system_memory = get_system_memory();
@@ -201,8 +203,8 @@ static void pc_init1(MachineState *machine,
}
if (pci_enabled) {
- pci_bus = i440fx_init(TYPE_I440FX_PCI_HOST_BRIDGE,
- TYPE_I440FX_PCI_DEVICE,
+ pci_bus = i440fx_init(host_type,
+ pci_type,
&i440fx_state, &piix3_devfn, &isa_bus, gsi,
system_memory, system_io, machine->ram_size,
below_4g_mem_size,
@@ -303,7 +305,8 @@ static void pc_init1(MachineState *machine,
static void pc_init_pci(MachineState *machine)
{
- pc_init1(machine, 1, 1);
+ pc_init1(machine, 1, 1, TYPE_I440FX_PCI_HOST_BRIDGE,
+ TYPE_I440FX_PCI_DEVICE);
}
static void pc_compat_2_0(MachineState *machine)
@@ -419,7 +422,8 @@ static void pc_init_pci_1_2(MachineState *machine)
static void pc_init_pci_no_kvmclock(MachineState *machine)
{
pc_compat_1_2(machine);
- pc_init1(machine, 1, 0);
+ pc_init1(machine, 1, 0, TYPE_I440FX_PCI_HOST_BRIDGE,
+ TYPE_I440FX_PCI_DEVICE);
}
static void pc_init_isa(MachineState *machine)
@@ -437,7 +441,8 @@ static void pc_init_isa(MachineState *machine)
}
x86_cpu_compat_disable_kvm_features(FEAT_KVM, KVM_FEATURE_PV_EOI);
enable_compat_apic_id_mode();
- pc_init1(machine, 0, 1);
+ pc_init1(machine, 0, 1, TYPE_I440FX_PCI_HOST_BRIDGE,
+ TYPE_I440FX_PCI_DEVICE);
}
#ifdef CONFIG_XEN
--
1.9.1
- [Qemu-devel] [v4][PATCH 0/5] xen: introduce new machine for IGD passthrough, Tiejun Chen, 2014/08/06
- [Qemu-devel] [v4][PATCH 1/5] i440fx: make types configurable at run-time, Tiejun Chen, 2014/08/06
- [Qemu-devel] [v4][PATCH 2/5] pc_init1: pass parameters just with types,
Tiejun Chen <=
- [Qemu-devel] [v4][PATCH 3/5] I440FX_PCI_DEVICE: add pci_type to index, Tiejun Chen, 2014/08/06
- Re: [Qemu-devel] [v4][PATCH 3/5] I440FX_PCI_DEVICE: add pci_type to index, Michael S. Tsirkin, 2014/08/06
- Re: [Qemu-devel] [v4][PATCH 3/5] I440FX_PCI_DEVICE: add pci_type to index, Chen, Tiejun, 2014/08/06
- Re: [Qemu-devel] [v4][PATCH 3/5] I440FX_PCI_DEVICE: add pci_type to index, Michael S. Tsirkin, 2014/08/06
- Re: [Qemu-devel] [v4][PATCH 3/5] I440FX_PCI_DEVICE: add pci_type to index, Chen, Tiejun, 2014/08/06
- Re: [Qemu-devel] [v4][PATCH 3/5] I440FX_PCI_DEVICE: add pci_type to index, Michael S. Tsirkin, 2014/08/10
- Re: [Qemu-devel] [v4][PATCH 3/5] I440FX_PCI_DEVICE: add pci_type to index, Chen, Tiejun, 2014/08/10
- Re: [Qemu-devel] [v4][PATCH 3/5] I440FX_PCI_DEVICE: add pci_type to index, Michael S. Tsirkin, 2014/08/12
- Re: [Qemu-devel] [v4][PATCH 3/5] I440FX_PCI_DEVICE: add pci_type to index, Chen, Tiejun, 2014/08/12
- Re: [Qemu-devel] [v4][PATCH 3/5] I440FX_PCI_DEVICE: add pci_type to index, Chen, Tiejun, 2014/08/12