mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
acpi:ich9: add memory hotplug handling
Add memory hotplug initialization/handling to ICH9 LPC device and enable it by default for post 2.0 machine types Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
d6b38b6611
commit
1f8621842e
4 changed files with 68 additions and 1 deletions
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "hw/acpi/acpi.h"
|
||||
#include "hw/acpi/cpu_hotplug.h"
|
||||
#include "hw/acpi/memory_hotplug.h"
|
||||
|
||||
typedef struct ICH9LPCPMRegs {
|
||||
/*
|
||||
|
@ -46,6 +47,8 @@ typedef struct ICH9LPCPMRegs {
|
|||
|
||||
AcpiCpuHotplug gpe_cpu;
|
||||
Notifier cpu_added_notifier;
|
||||
|
||||
MemHotplugState acpi_memory_hotplug;
|
||||
} ICH9LPCPMRegs;
|
||||
|
||||
void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
|
||||
|
@ -55,4 +58,5 @@ extern const VMStateDescription vmstate_ich9_pm;
|
|||
|
||||
void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm, Error **errp);
|
||||
|
||||
void ich9_pm_device_plug_cb(ICH9LPCPMRegs *pm, DeviceState *dev, Error **errp);
|
||||
#endif /* HW_ACPI_ICH9_H */
|
||||
|
|
|
@ -286,7 +286,12 @@ int e820_get_num_entries(void);
|
|||
bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
|
||||
|
||||
#define PC_Q35_COMPAT_2_0 \
|
||||
PC_COMPAT_2_0
|
||||
PC_COMPAT_2_0, \
|
||||
{\
|
||||
.driver = "ICH9 LPC",\
|
||||
.property = "memory-hotplug-support",\
|
||||
.value = "off",\
|
||||
}
|
||||
|
||||
#define PC_Q35_COMPAT_1_7 \
|
||||
PC_COMPAT_1_7, \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue