[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 20/42] machine: add cpu-hotplug machine option
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [RFC 20/42] machine: add cpu-hotplug machine option |
Date: |
Mon, 2 May 2016 14:33:29 +0200 |
Signed-off-by: Igor Mammedov <address@hidden>
---
hw/core/machine.c | 20 ++++++++++++++++++++
include/hw/boards.h | 1 +
2 files changed, 21 insertions(+)
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 6dbbc85..498230a 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -329,6 +329,20 @@ static bool machine_get_enforce_config_section(Object
*obj, Error **errp)
return ms->enforce_config_section;
}
+static bool machine_get_cpu_hotplug(Object *obj, Error **errp)
+{
+ MachineState *ms = MACHINE(obj);
+
+ return ms->cpu_hotplug;
+}
+
+static void machine_set_cpu_hotplug(Object *obj, bool value, Error **errp)
+{
+ MachineState *ms = MACHINE(obj);
+
+ ms->cpu_hotplug = value;
+}
+
static int error_on_sysbus_device(SysBusDevice *sbdev, void *opaque)
{
error_report("Option '-device %s' cannot be handled by this machine",
@@ -490,6 +504,12 @@ static void machine_initfn(Object *obj)
object_property_set_description(obj, "enforce-config-section",
"Set on to enforce configuration section
migration",
NULL);
+ object_property_add_bool(obj, "cpu-hotplug",
+ machine_get_cpu_hotplug,
+ machine_set_cpu_hotplug, NULL);
+ object_property_set_description(obj, "cpu-hotplug",
+ "Set on to enable CPU hotplug",
+ NULL);
/* Register notifier when init is done for sysbus sanity checks */
ms->sysbus_notifier.notify = machine_init_notify;
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 8d4fe56..d388f96 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -154,6 +154,7 @@ struct MachineState {
bool iommu;
bool suppress_vmdesc;
bool enforce_config_section;
+ bool cpu_hotplug;
ram_addr_t ram_size;
ram_addr_t maxram_size;
--
1.8.3.1
[Qemu-devel] [RFC 03/42] pc: acpi: remove AML for empty/not used GPE handlers, Igor Mammedov, 2016/05/02
[Qemu-devel] [RFC 08/42] pc: acpi: consolidate legacy CPU hotplug in one file, Igor Mammedov, 2016/05/02
[Qemu-devel] [RFC 15/42] acpi: extend ACPI interface to provide send_event hook, Igor Mammedov, 2016/05/02
[Qemu-devel] [RFC 16/42] pc: use AcpiDeviceIfClass.send_event to issue GPE events, Igor Mammedov, 2016/05/02
[Qemu-devel] [RFC 17/42] docs: update ACPI CPU hotplug spec with new protocol, Igor Mammedov, 2016/05/02
[Qemu-devel] [RFC 20/42] machine: add cpu-hotplug machine option,
Igor Mammedov <=
[Qemu-devel] [RFC 13/42] tests: bios-tables-test: update tables with CPHP turned off by default, Igor Mammedov, 2016/05/02
[Qemu-devel] [RFC 10/42] pc: piix4/ich9: add 'cpu-hotplug-legacy' property, Igor Mammedov, 2016/05/02
[Qemu-devel] [RFC 19/42] pc: add generic CPU unplug callbacks, Igor Mammedov, 2016/05/02
[Qemu-devel] [RFC 18/42] acpi: hardware side of CPU hotplug, Igor Mammedov, 2016/05/02
[Qemu-devel] [RFC 22/42] pc: piix4: initialize new CPU hotplug hw, Igor Mammedov, 2016/05/02