1 #ifndef QEMU_HW_ACPI_MEMORY_HOTPLUG_H 2 #define QEMU_HW_ACPI_MEMORY_HOTPLUG_H 3 4 #include "hw/qdev-core.h" 5 #include "hw/acpi/acpi.h" 6 7 #define ACPI_MEMORY_HOTPLUG_STATUS 8 8 9 typedef struct MemStatus { 10 DeviceState *dimm; 11 bool is_enabled; 12 bool is_inserting; 13 uint32_t ost_event; 14 uint32_t ost_status; 15 } MemStatus; 16 17 typedef struct MemHotplugState { 18 bool is_enabled; /* true if memory hotplug is supported */ 19 MemoryRegion io; 20 uint32_t selector; 21 uint32_t dev_count; 22 MemStatus *devs; 23 } MemHotplugState; 24 25 void acpi_memory_hotplug_init(MemoryRegion *as, Object *owner, 26 MemHotplugState *state); 27 28 void acpi_memory_plug_cb(ACPIREGS *ar, qemu_irq irq, MemHotplugState *mem_st, 29 DeviceState *dev, Error **errp); 30 #endif 31