]> git.proxmox.com Git - mirror_qemu.git/blame - include/hw/acpi/memory_hotplug.h
acpi: add aml_resource_template() helper
[mirror_qemu.git] / include / hw / acpi / memory_hotplug.h
CommitLineData
3ef77aca
IM
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"
f816a62d 6#include "migration/vmstate.h"
3ef77aca
IM
7
8#define ACPI_MEMORY_HOTPLUG_STATUS 8
9
10typedef struct MemStatus {
11 DeviceState *dimm;
12 bool is_enabled;
13 bool is_inserting;
14 uint32_t ost_event;
15 uint32_t ost_status;
16} MemStatus;
17
18typedef struct MemHotplugState {
34774320 19 bool is_enabled; /* true if memory hotplug is supported */
3ef77aca
IM
20 MemoryRegion io;
21 uint32_t selector;
22 uint32_t dev_count;
23 MemStatus *devs;
24} MemHotplugState;
25
26void acpi_memory_hotplug_init(MemoryRegion *as, Object *owner,
27 MemHotplugState *state);
28
29void acpi_memory_plug_cb(ACPIREGS *ar, qemu_irq irq, MemHotplugState *mem_st,
30 DeviceState *dev, Error **errp);
f816a62d
IM
31
32extern const VMStateDescription vmstate_memory_hotplug;
33#define VMSTATE_MEMORY_HOTPLUG(memhp, state) \
34 VMSTATE_STRUCT(memhp, state, 1, \
35 vmstate_memory_hotplug, MemHotplugState)
36
43f50410 37void acpi_memory_ospm_status(MemHotplugState *mem_st, ACPIOSTInfoList ***list);
3ef77aca 38#endif