acpi, mem-hotplug: add unplug cb for memory device
commitf7d3e29db5a5900a1f0ed10f8313f7c3f28e5b59
authorTang Chen <tangchen@cn.fujitsu.com>
Mon, 27 Apr 2015 08:47:18 +0000 (27 16:47 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 27 Apr 2015 19:07:39 +0000 (27 21:07 +0200)
treef76c897e3773dc31306813a74276bfd042cff798
parent64fec58e8ab62490edd2638e4214d8c9f84518c9
acpi, mem-hotplug: add unplug cb for memory device

This patch adds unplug cb for memory device. It resets memory status
"is_enabled" in acpi_memory_unplug_cb(), removes the corresponding
memory region, unregisters vmstate, and unparents the object.

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>
hw/acpi/ich9.c
hw/acpi/memory_hotplug.c
hw/acpi/piix4.c
hw/i386/pc.c
include/hw/acpi/memory_hotplug.h