[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 69/73] spapr: add hotplug interrupt machine options
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 69/73] spapr: add hotplug interrupt machine options |
Date: |
Fri, 28 Oct 2016 12:38:10 +1100 |
From: Michael Roth <address@hidden>
This adds machine options of the form:
-machine pseries,modern-hotplug-events=true
-machine pseries,modern-hotplug-events=false
If false, QEMU will force the use of "legacy" style hotplug events,
which are surfaced through EPOW events instead of a dedicated
hot plug event source, and lack certain features necessary, mainly,
for memory unplug support.
If true, QEMU will enable support for "modern" dedicated hot plug
event source. Note that we will still default to "legacy" style unless
the guest advertises support for the "modern" hotplug events via
ibm,client-architecture-support hcall during early boot.
For pseries-2.7 and earlier we default to false, for newer machine
types we default to true.
Signed-off-by: Michael Roth <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 9ddf2ff..fe91883 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2143,16 +2143,41 @@ static void spapr_set_kvm_type(Object *obj, const char
*value, Error **errp)
spapr->kvm_type = g_strdup(value);
}
+static bool spapr_get_modern_hotplug_events(Object *obj, Error **errp)
+{
+ sPAPRMachineState *spapr = SPAPR_MACHINE(obj);
+
+ return spapr->use_hotplug_event_source;
+}
+
+static void spapr_set_modern_hotplug_events(Object *obj, bool value,
+ Error **errp)
+{
+ sPAPRMachineState *spapr = SPAPR_MACHINE(obj);
+
+ spapr->use_hotplug_event_source = value;
+}
+
static void spapr_machine_initfn(Object *obj)
{
sPAPRMachineState *spapr = SPAPR_MACHINE(obj);
spapr->htab_fd = -1;
+ spapr->use_hotplug_event_source = true;
object_property_add_str(obj, "kvm-type",
spapr_get_kvm_type, spapr_set_kvm_type, NULL);
object_property_set_description(obj, "kvm-type",
"Specifies the KVM virtualization mode
(HV, PR)",
NULL);
+ object_property_add_bool(obj, "modern-hotplug-events",
+ spapr_get_modern_hotplug_events,
+ spapr_set_modern_hotplug_events,
+ NULL);
+ object_property_set_description(obj, "modern-hotplug-events",
+ "Use dedicated hotplug event mechanism in"
+ " place of standard EPOW events when
possible"
+ " (required for memory hot-unplug
support)",
+ NULL);
}
static void spapr_machine_finalizefn(Object *obj)
@@ -2599,7 +2624,10 @@ static void phb_placement_2_7(sPAPRMachineState *spapr,
uint32_t index,
static void spapr_machine_2_7_instance_options(MachineState *machine)
{
+ sPAPRMachineState *spapr = SPAPR_MACHINE(machine);
+
spapr_machine_2_8_instance_options(machine);
+ spapr->use_hotplug_event_source = false;
}
static void spapr_machine_2_7_class_options(MachineClass *mc)
--
2.7.4
- [Qemu-ppc] [PULL 43/73] pseries: Move /hypervisor node construction to fdt_build_fdt(), (continued)
- [Qemu-ppc] [PULL 43/73] pseries: Move /hypervisor node construction to fdt_build_fdt(), David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 33/73] target-ppc: add vmul10[u, eu, cu, ecu]q instructions, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 65/73] target-ppc: add xscmp[eq, gt, ge, ne]dp instructions, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 55/73] tests: Adjust tco-test to use qpci_legacy_iomap(), David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 71/73] spapr: use count+index for memory hotplug, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 58/73] tests: Clean up IO handling in ide-test, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 64/73] tests: Add pseries machine to the prom-env-test, too, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 66/73] target-ppc: Add xvcmpnesp, xvcmpnedp instructions, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 52/73] libqos: Handle PCI IO de-multiplexing in common code, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 56/73] libqos: Add streaming accessors for PCI MMIO, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 69/73] spapr: add hotplug interrupt machine options,
David Gibson <=
- [Qemu-ppc] [PULL 49/73] spapr: improve ibm, architecture-vec-5 property handling, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 47/73] spapr_hcall: use spapr_ovec_* interfaces for CAS options, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 48/73] spapr: add option vector handling in CAS-generated resets, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 70/73] spapr: Add DRC count indexed hotplug identifier type, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 53/73] libqos: Move BAR assignment to common code, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 54/73] libqos: Better handling of PCI legacy IO, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 51/73] libqos: Give qvirtio_config_read*() consistent semantics, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 62/73] libqos: Change PCI accessors to take opaque BAR handle, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 59/73] libqos: Add 64-bit PCI IO accessors, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 61/73] tests: Don't assume structure of PCI IO base in ahci-test, David Gibson, 2016/10/27