13ef77acaSIgor Mammedov #ifndef QEMU_HW_ACPI_MEMORY_HOTPLUG_H 23ef77acaSIgor Mammedov #define QEMU_HW_ACPI_MEMORY_HOTPLUG_H 33ef77acaSIgor Mammedov 43ef77acaSIgor Mammedov #include "hw/qdev-core.h" 53ef77acaSIgor Mammedov #include "hw/acpi/acpi.h" 63ef77acaSIgor Mammedov 73ef77acaSIgor Mammedov #define ACPI_MEMORY_HOTPLUG_STATUS 8 83ef77acaSIgor Mammedov 93ef77acaSIgor Mammedov typedef struct MemStatus { 103ef77acaSIgor Mammedov DeviceState *dimm; 113ef77acaSIgor Mammedov bool is_enabled; 123ef77acaSIgor Mammedov bool is_inserting; 133ef77acaSIgor Mammedov uint32_t ost_event; 143ef77acaSIgor Mammedov uint32_t ost_status; 153ef77acaSIgor Mammedov } MemStatus; 163ef77acaSIgor Mammedov 173ef77acaSIgor Mammedov typedef struct MemHotplugState { 18*34774320SIgor Mammedov bool is_enabled; /* true if memory hotplug is supported */ 193ef77acaSIgor Mammedov MemoryRegion io; 203ef77acaSIgor Mammedov uint32_t selector; 213ef77acaSIgor Mammedov uint32_t dev_count; 223ef77acaSIgor Mammedov MemStatus *devs; 233ef77acaSIgor Mammedov } MemHotplugState; 243ef77acaSIgor Mammedov 253ef77acaSIgor Mammedov void acpi_memory_hotplug_init(MemoryRegion *as, Object *owner, 263ef77acaSIgor Mammedov MemHotplugState *state); 273ef77acaSIgor Mammedov 283ef77acaSIgor Mammedov void acpi_memory_plug_cb(ACPIREGS *ar, qemu_irq irq, MemHotplugState *mem_st, 293ef77acaSIgor Mammedov DeviceState *dev, Error **errp); 303ef77acaSIgor Mammedov #endif 31