|
|
1bdc94 |
From d3f4feea8023be7c0c3db09e4ea1a24a34f8c4a9 Mon Sep 17 00:00:00 2001
|
|
|
1bdc94 |
From: Igor Mammedov <imammedo@redhat.com>
|
|
|
1bdc94 |
Date: Wed, 31 Jan 2018 10:44:31 +0100
|
|
|
1bdc94 |
Subject: spapr: disable memory hotplug
|
|
|
1bdc94 |
|
|
|
1bdc94 |
RH-Author: Igor Mammedov <imammedo@redhat.com>
|
|
|
1bdc94 |
Message-id: <1517395471-44118-1-git-send-email-imammedo@redhat.com>
|
|
|
1bdc94 |
Patchwork-id: 78748
|
|
|
1bdc94 |
O-Subject: [RHV7.5 qemu-kvm-ma PATCH v3] spapr: disable memory hotplug
|
|
|
1bdc94 |
Bugzilla: 1535952
|
|
|
1bdc94 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
1bdc94 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
1bdc94 |
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
1bdc94 |
|
|
|
1bdc94 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1535952
|
|
|
1bdc94 |
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=15146188
|
|
|
1bdc94 |
Upstream: RHEL-only
|
|
|
1bdc94 |
|
|
|
1bdc94 |
Disable memory hotplug for qemu-kvm-ma variant of QEMU where
|
|
|
1bdc94 |
shouldn't be supported.
|
|
|
1bdc94 |
Use CONFIG_RHV to switch feature off only for qemu-kvm-ma and
|
|
|
1bdc94 |
not to affect RHEV variant built from the same source code.
|
|
|
1bdc94 |
|
|
|
1bdc94 |
PS:
|
|
|
1bdc94 |
Disable only (un)plug entry points from device_add/del and
|
|
|
1bdc94 |
leave the rest of hotplug hw intact so that -ma machine
|
|
|
1bdc94 |
could be migrated to -rhev.
|
|
|
1bdc94 |
Note: backward migration would be broken if source -rhev
|
|
|
1bdc94 |
machine used pc-dimm devices (either with -device/device_add)
|
|
|
1bdc94 |
|
|
|
1bdc94 |
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
1bdc94 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
1bdc94 |
(cherry picked from commit bf05b668e4248781d24cfba88bfb9647ca6ca14e)
|
|
|
1bdc94 |
(cherry picked from commit dd0871512012fbbe343361bd3ff6fa21545c41d5)
|
|
|
1bdc94 |
(cherry picked from commit d42b9faa86dfd70e4ba6b8f2bf108d0e21a1a65d)
|
|
|
1bdc94 |
---
|
|
|
1bdc94 |
hw/ppc/spapr.c | 8 ++++++++
|
|
|
1bdc94 |
1 file changed, 8 insertions(+)
|
|
|
1bdc94 |
|
|
|
1bdc94 |
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
|
|
|
1bdc94 |
index f71a62e..360a258 100644
|
|
|
1bdc94 |
--- a/hw/ppc/spapr.c
|
|
|
1bdc94 |
+++ b/hw/ppc/spapr.c
|
|
|
1bdc94 |
@@ -3070,6 +3070,9 @@ out:
|
|
|
1bdc94 |
static void spapr_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
|
|
|
1bdc94 |
Error **errp)
|
|
|
1bdc94 |
{
|
|
|
1bdc94 |
+#if !defined(CONFIG_RHV)
|
|
|
1bdc94 |
+ error_setg(errp, "Memory hotplug not supported for this machine");
|
|
|
1bdc94 |
+#else
|
|
|
1bdc94 |
PCDIMMDevice *dimm = PC_DIMM(dev);
|
|
|
1bdc94 |
PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm);
|
|
|
1bdc94 |
MemoryRegion *mr;
|
|
|
1bdc94 |
@@ -3097,6 +3100,7 @@ static void spapr_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
|
|
|
1bdc94 |
|
|
|
1bdc94 |
out:
|
|
|
1bdc94 |
g_free(mem_dev);
|
|
|
1bdc94 |
+#endif
|
|
|
1bdc94 |
}
|
|
|
1bdc94 |
|
|
|
1bdc94 |
struct sPAPRDIMMState {
|
|
|
1bdc94 |
@@ -3210,6 +3214,9 @@ void spapr_lmb_release(DeviceState *dev)
|
|
|
1bdc94 |
static void spapr_memory_unplug_request(HotplugHandler *hotplug_dev,
|
|
|
1bdc94 |
DeviceState *dev, Error **errp)
|
|
|
1bdc94 |
{
|
|
|
1bdc94 |
+#if !defined(CONFIG_RHV)
|
|
|
1bdc94 |
+ error_setg(errp, "Memory hot unplug not supported for this machine");
|
|
|
1bdc94 |
+#else
|
|
|
1bdc94 |
sPAPRMachineState *spapr = SPAPR_MACHINE(hotplug_dev);
|
|
|
1bdc94 |
Error *local_err = NULL;
|
|
|
1bdc94 |
PCDIMMDevice *dimm = PC_DIMM(dev);
|
|
|
1bdc94 |
@@ -3264,6 +3271,7 @@ static void spapr_memory_unplug_request(HotplugHandler *hotplug_dev,
|
|
|
1bdc94 |
nr_lmbs, spapr_drc_index(drc));
|
|
|
1bdc94 |
out:
|
|
|
1bdc94 |
error_propagate(errp, local_err);
|
|
|
1bdc94 |
+#endif
|
|
|
1bdc94 |
}
|
|
|
1bdc94 |
|
|
|
1bdc94 |
static void *spapr_populate_hotplug_cpu_dt(CPUState *cs, int *fdt_offset,
|
|
|
1bdc94 |
--
|
|
|
1bdc94 |
1.8.3.1
|
|
|
1bdc94 |
|