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 MemoryRegion io; 19 uint32_t selector; 20 uint32_t dev_count; 21 MemStatus *devs; 22 } MemHotplugState; 23 24 void acpi_memory_hotplug_init(MemoryRegion *as, Object *owner, 25 MemHotplugState *state); 26 27 void acpi_memory_plug_cb(ACPIREGS *ar, qemu_irq irq, MemHotplugState *mem_st, 28 DeviceState *dev, Error **errp); 29 #endif 30