Necessary to hotplug them cleanly later. We can only support memory
devices that are not DIMMs if we have a parent bus. Otherwise we might
miss "Device '%s' can not be hotplugged on this machine" cases.
Signed-off-by: David Hildenbrand <david@redhat.com>
---
hw/ppc/spapr.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index db09b626cc..a7c84ec34c 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -3669,6 +3669,13 @@ static HotplugHandler *spapr_get_hotplug_handler(MachineState *machine,
object_dynamic_cast(OBJECT(dev), TYPE_SPAPR_CPU_CORE)) {
return HOTPLUG_HANDLER(machine);
}
+
+ if (dev->parent_bus) {
+ if (object_dynamic_cast(OBJECT(dev), TYPE_MEMORY_DEVICE)) {
+ return HOTPLUG_HANDLER(machine);
+ }
+ }
+
return NULL;
}
--
2.14.3