[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v2 10/39] pc: Eliminate pc_default_machine_options()
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [RFC v2 10/39] pc: Eliminate pc_default_machine_options() |
Date: |
Fri, 13 Jun 2014 16:43:49 -0300 |
The only PC machines that didn't call pc_default_machine_options() were
isaps and xenfv. Both were already overwriting max_cpus, and only isapc
was not overwriting hot_add_cpu. If we just make isapc set hot_add_cpu
to NULL, we can move pc_default_machine_options() the PC common
class_init.
Signed-off-by: Eduardo Habkost <address@hidden>
---
hw/i386/pc.c | 2 ++
hw/i386/pc_piix.c | 2 +-
hw/i386/pc_q35.c | 1 -
include/hw/i386/pc.h | 6 ------
4 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index b2e0809..10e8d10 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1618,6 +1618,8 @@ static void pc_machine_class_init(ObjectClass *oc, void
*data)
pcmc->get_hotplug_handler = mc->get_hotplug_handler;
mc->get_hotplug_handler = pc_get_hotpug_handler;
mc->default_boot_order = "cad";
+ mc->hot_add_cpu = pc_hot_add_cpu;
+ mc->max_cpus = 255;
hc->plug = pc_machine_device_plug_cb;
}
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 8b3cffe..c829aa8 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -407,7 +407,6 @@ static void pc_xen_hvm_init(MachineState *machine)
static void pc_i440fx_machine_options(MachineClass *mc)
{
- pc_default_machine_options(mc);
mc->desc = "Standard PC (i440FX + PIIX, 1996)";
mc->hot_add_cpu = pc_hot_add_cpu;
}
@@ -970,6 +969,7 @@ static void isapc_machine_class_init(ObjectClass *oc, void
*data)
mc->desc = "ISA-only PC";
mc->init = pc_init_isa;
mc->max_cpus = 1;
+ mc->hot_add_cpu = NULL;
mc->name = "isapc";
machine_class_add_compat_props(mc, compat_props);
}
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index cfeda8d..521bff7 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -321,7 +321,6 @@ static void pc_q35_init_1_4(MachineState *machine)
static void pc_q35_machine_options(MachineClass *mc)
{
- pc_default_machine_options(mc);
mc->desc = "Standard PC (Q35 + ICH9, 2009)";
mc->hot_add_cpu = pc_hot_add_cpu;
}
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 1b09eb4..92fab21 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -500,10 +500,4 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.value = stringify(0),\
}
-static inline void pc_default_machine_options(MachineClass *mc)
-{
- mc->hot_add_cpu = pc_hot_add_cpu;
- mc->max_cpus = 255;
-}
-
#endif
--
1.9.0
- Re: [Qemu-devel] [RFC v2 01/39] q35: Use PC_Q35_COMPAT_1_4 on pc-q35-1.4 compat_props, (continued)
- [Qemu-devel] [RFC v2 03/39] piix: Move pc-0.13 virtio-9p-pci compat to PC_COMPAT_0_13, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 02/39] piix: Move pc-0.14 qxl compat properties to PC_COMPAT_0_14, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 05/39] piix: Move pc-0.11 drive version compat props TO PC_COMPAT_0_11, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 06/39] vl.c: Use qdev_prop_register_global() for single globals, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 07/39] machine: Make compat_props a linked list, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 08/39] pc: Register machine classes directly instead of using QEMUMachine, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 10/39] pc: Eliminate pc_default_machine_options(),
Eduardo Habkost <=
- [Qemu-devel] [RFC v2 09/39] pc: Eliminate pc_common_machine_options(), Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 11/39] piix: Eliminate pc_i440fx_machine_options(), Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 13/39] q35: Eliminate pc_q35_1_4_machine_options(), Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 12/39] q35: Eliminate pc_q35_machine_options(), Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 14/39] pc: Eliminate *machine_options macros, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 15/39] piix: Make all *machine_options() functions call the previous one, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 16/39] pc: Eliminate all *_machine_options() functions, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 21/39] pc: Move smbios_defaults to PCMachineClass, Eduardo Habkost, 2014/06/13
- [Qemu-devel] [RFC v2 22/39] pc: Move has_acpi_build to PCMachineClass, Eduardo Habkost, 2014/06/13