aboutsummaryrefslogtreecommitdiff
path: root/hw/i386
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2018-08-01 15:34:41 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2018-08-23 18:46:25 +0200
commit8f1ffe5be8178aa7dd72c06ac4d65096d149c573 (patch)
tree1b5eb7df0b88b2f7d4f7ca7341bb788d1f5dfe10 /hw/i386
parentefbb649da0d4b13a036211fbc79d514b7c2efd43 (diff)
downloadqemu-8f1ffe5be8178aa7dd72c06ac4d65096d149c573.zip
qemu-8f1ffe5be8178aa7dd72c06ac4d65096d149c573.tar.gz
qemu-8f1ffe5be8178aa7dd72c06ac4d65096d149c573.tar.bz2
pc-dimm: assign and verify the "slot" property during pre_plug
We can assign and verify the slot before realizing and trying to plug. reading/writing the slot property should never fail, so let's reduce error handling a bit by using &error_abort. To do this during pre_plug, add and use (x86, ppc) pc_dimm_pre_plug(). Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20180801133444.11269-2-david@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/i386')
-rw-r--r--hw/i386/pc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 83a4444..96be77f 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1696,6 +1696,8 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
error_setg(errp, "nvdimm is not enabled: missing 'nvdimm' in '-M'");
return;
}
+
+ pc_dimm_pre_plug(dev, MACHINE(hotplug_dev), errp);
}
static void pc_memory_plug(HotplugHandler *hotplug_dev,