summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTang Chen <tangchen@cn.fujitsu.com>2015-04-27 16:47:17 +0800
committerMichael S. Tsirkin <mst@redhat.com>2015-04-27 21:07:39 +0200
commit64fec58e8ab62490edd2638e4214d8c9f84518c9 (patch)
treea48577cda520f091834296d18eaf6ffe0a5fb1ea /include
parent4aae99b63333e71b2097b106bb15a6fde7f9b55b (diff)
downloadhqemu-64fec58e8ab62490edd2638e4214d8c9f84518c9.zip
hqemu-64fec58e8ab62490edd2638e4214d8c9f84518c9.tar.gz
acpi, mem-hotplug: add unplug request cb for memory device
This patch adds unplug request cb for memory device, and adds the is_removing boolean field to MemStatus. This field is used to indicate whether the memory device in slot has been requested to be ejected. This field is set to true in acpi_memory_unplug_request_cb(). Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/acpi/memory_hotplug.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/hw/acpi/memory_hotplug.h b/include/hw/acpi/memory_hotplug.h
index 7bbf8a0..9d7eee9 100644
--- a/include/hw/acpi/memory_hotplug.h
+++ b/include/hw/acpi/memory_hotplug.h
@@ -7,10 +7,17 @@
#define ACPI_MEMORY_HOTPLUG_STATUS 8
+/**
+ * MemStatus:
+ * @is_removing: the memory device in slot has been requested to be ejected.
+ *
+ * This structure stores memory device's status.
+ */
typedef struct MemStatus {
DeviceState *dimm;
bool is_enabled;
bool is_inserting;
+ bool is_removing;
uint32_t ost_event;
uint32_t ost_status;
} MemStatus;
@@ -28,6 +35,9 @@ void acpi_memory_hotplug_init(MemoryRegion *as, Object *owner,
void acpi_memory_plug_cb(ACPIREGS *ar, qemu_irq irq, MemHotplugState *mem_st,
DeviceState *dev, Error **errp);
+void acpi_memory_unplug_request_cb(ACPIREGS *ar, qemu_irq irq,
+ MemHotplugState *mem_st,
+ DeviceState *dev, Error **errp);
extern const VMStateDescription vmstate_memory_hotplug;
#define VMSTATE_MEMORY_HOTPLUG(memhp, state) \
OpenPOWER on IntegriCloud