mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
64fec58e8a
commit
f7d3e29db5
5 changed files with 64 additions and 6 deletions
|
@ -38,6 +38,8 @@ void acpi_memory_plug_cb(ACPIREGS *ar, qemu_irq irq, MemHotplugState *mem_st,
|
|||
void acpi_memory_unplug_request_cb(ACPIREGS *ar, qemu_irq irq,
|
||||
MemHotplugState *mem_st,
|
||||
DeviceState *dev, Error **errp);
|
||||
void acpi_memory_unplug_cb(MemHotplugState *mem_st,
|
||||
DeviceState *dev, Error **errp);
|
||||
|
||||
extern const VMStateDescription vmstate_memory_hotplug;
|
||||
#define VMSTATE_MEMORY_HOTPLUG(memhp, state) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue