1 #ifndef QEMU_HW_ACPI_MEMORY_HOTPLUG_H
2 #define QEMU_HW_ACPI_MEMORY_HOTPLUG_H
4 #include "hw/qdev-core.h"
5 #include "hw/acpi/acpi.h"
6 #include "migration/vmstate.h"
10 * @is_removing: the memory device in slot has been requested to be ejected.
12 * This structure stores memory device's status.
14 typedef struct MemStatus
{
23 typedef struct MemHotplugState
{
24 bool is_enabled
; /* true if memory hotplug is supported */
31 void acpi_memory_hotplug_init(MemoryRegion
*as
, Object
*owner
,
32 MemHotplugState
*state
);
34 void acpi_memory_plug_cb(ACPIREGS
*ar
, qemu_irq irq
, MemHotplugState
*mem_st
,
35 DeviceState
*dev
, Error
**errp
);
36 void acpi_memory_unplug_request_cb(ACPIREGS
*ar
, qemu_irq irq
,
37 MemHotplugState
*mem_st
,
38 DeviceState
*dev
, Error
**errp
);
39 void acpi_memory_unplug_cb(MemHotplugState
*mem_st
,
40 DeviceState
*dev
, Error
**errp
);
42 extern const VMStateDescription vmstate_memory_hotplug
;
43 #define VMSTATE_MEMORY_HOTPLUG(memhp, state) \
44 VMSTATE_STRUCT(memhp, state, 1, \
45 vmstate_memory_hotplug, MemHotplugState)
47 void acpi_memory_ospm_status(MemHotplugState
*mem_st
, ACPIOSTInfoList
***list
);