diff options
author | Xiao Guangrong <guangrong.xiao@linux.intel.com> | 2016-10-29 00:35:40 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-11-01 19:21:09 +0200 |
commit | b097cc52fc9126bd1a71dae8302b8536d28104dd (patch) | |
tree | 334774fab08978bf302a83149cbf867df68d0286 /hw/i386/pc.c | |
parent | 806864d9a8a6d5c4cee2ca9bd00474346143113b (diff) | |
download | qemu-b097cc52fc9126bd1a71dae8302b8536d28104dd.zip qemu-b097cc52fc9126bd1a71dae8302b8536d28104dd.tar.gz qemu-b097cc52fc9126bd1a71dae8302b8536d28104dd.tar.bz2 |
pc: memhp: enable nvdimm device hotplug
_GPE.E04 is dedicated for nvdimm device hotplug
Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/pc.c')
-rw-r--r-- | hw/i386/pc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index b395717..c011552 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1744,6 +1744,12 @@ static void pc_dimm_unplug_request(HotplugHandler *hotplug_dev, goto out; } + if (object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM)) { + error_setg(&local_err, + "nvdimm device hot unplug is not supported yet."); + goto out; + } + hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev); hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err); @@ -1761,6 +1767,12 @@ static void pc_dimm_unplug(HotplugHandler *hotplug_dev, HotplugHandlerClass *hhc; Error *local_err = NULL; + if (object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM)) { + error_setg(&local_err, + "nvdimm device hot unplug is not supported yet."); + goto out; + } + hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev); hhc->unplug(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err); |