[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 24/60] piix: Add kvmclock_enabled, pci_enabled glo
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v2 24/60] piix: Add kvmclock_enabled, pci_enabled globals |
Date: |
Mon, 1 Jun 2015 14:23:39 +0200 |
From: Eduardo Habkost <address@hidden>
This looks like a step backwards, but it will allow pc-0.1[0123] and
isapc to follow the same compat+init pattern used by the other
machine-types, allowing us to generate all init function using the same
macro later.
Signed-off-by: Eduardo Habkost <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/i386/pc_piix.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 052fca2..cdc0443 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -59,6 +59,7 @@ 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;
@@ -71,11 +72,10 @@ static bool smbios_uuid_encoded = true;
*/
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,
- int pci_enabled,
- int kvmclock_enabled)
+static void pc_init1(MachineState *machine)
{
PCMachineState *pc_machine = PC_MACHINE(machine);
MemoryRegion *system_memory = get_system_memory();
@@ -307,7 +307,7 @@ static void pc_init1(MachineState *machine,
static void pc_init_pci(MachineState *machine)
{
- pc_init1(machine, 1, 1);
+ pc_init1(machine);
}
static void pc_compat_2_3(MachineState *machine)
@@ -430,6 +430,13 @@ static void pc_init_pci_2_2(MachineState *machine)
pc_init_pci(machine);
}
+/* PC compat function for pc-0.10 to pc-0.13 */
+static void pc_compat_0_13(MachineState *machine)
+{
+ pc_compat_1_2(machine);
+ kvmclock_enabled = false;
+}
+
static void pc_init_pci_2_1(MachineState *machine)
{
pc_compat_2_1(machine);
@@ -482,12 +489,13 @@ static void pc_init_pci_1_2(MachineState *machine)
/* PC init function for pc-0.10 to pc-0.13 */
static void pc_init_pci_no_kvmclock(MachineState *machine)
{
- pc_compat_1_2(machine);
- pc_init1(machine, 1, 0);
+ pc_compat_0_13(machine);
+ pc_init_pci(machine);
}
static void pc_init_isa(MachineState *machine)
{
+ pci_enabled = false;
has_acpi_build = false;
smbios_defaults = false;
gigabyte_align = false;
@@ -500,7 +508,7 @@ static void pc_init_isa(MachineState *machine)
}
x86_cpu_compat_kvm_no_autoenable(FEAT_KVM, 1 << KVM_FEATURE_PV_EOI);
enable_compat_apic_id_mode();
- pc_init1(machine, 0, 1);
+ pc_init1(machine);
}
#ifdef CONFIG_XEN
--
MST
- [Qemu-devel] [PULL v2 14/60] piix: Move pc-0.13 virtio-9p-pci compat to PC_COMPAT_0_13, (continued)
- [Qemu-devel] [PULL v2 14/60] piix: Move pc-0.13 virtio-9p-pci compat to PC_COMPAT_0_13, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 16/60] piix: Define PC_COMPAT_0_10, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 15/60] piix: Move pc-0.1[23] rombar compat props to PC_COMPAT_0_13, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 17/60] pc: Define MACHINE_OPTIONS macros consistently for all machines, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 18/60] pc: Define machines using a DEFINE_PC_MACHINE macro, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 19/60] pc: Convert *_MACHINE_OPTIONS macros into functions, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 20/60] pc: Move compat_props setting inside *_machine_options() functions, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 21/60] pc: Don't use QEMUMachine anymore, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 22/60] pc: Remove qemu_register_pc_machine() function, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 23/60] machine: Remove unused fields from QEMUMachine, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 24/60] piix: Add kvmclock_enabled, pci_enabled globals,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v2 25/60] piix: Eliminate pc_init_pci(), Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 27/60] pc: acpi: fix pvpanic for buggy guests, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 26/60] pc: Generate init functions with a macro, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 28/60] virtio: move host_features, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 29/60] virtio-ccw: Don't advertise VIRTIO_F_BAD_FEATURE, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 30/60] virtio: move VIRTIO_F_NOTIFY_ON_EMPTY into core, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 31/60] virtio-net: adding all queues in .realize(), Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 33/60] virtio: introduce virtio_get_num_queues(), Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 32/60] virtio: device_plugged() can fail, Michael S. Tsirkin, 2015/06/01
- [Qemu-devel] [PULL v2 34/60] virtio-ccw: introduce ccw specific queue limit, Michael S. Tsirkin, 2015/06/01