Commit ef92e7ca authored by Liu Jinsong's avatar Liu Jinsong Committed by Konrad Rzeszutek Wilk

xen/acpi: ACPI memory hotplug

This patch implements real Xen acpi memory hotplug driver as module.
When loaded, it replaces Xen stub driver.

When an acpi memory device hotadd event occurs, it notifies OS and
invokes notification callback, adding related memory device and parsing
memory information, finally hypercall to xen hypervisor to add memory.
Signed-off-by: default avatarLiu Jinsong <>
Signed-off-by: default avatarKonrad Rzeszutek Wilk <>
parent dcb93b96
......@@ -191,6 +191,17 @@ config XEN_STUB
To enable Xen features like cpu and memory hotplug, select Y here.
tristate "Xen ACPI memory hotplug"
depends on XEN_DOM0 && XEN_STUB && ACPI
default n
This is Xen ACPI memory hotplug.
Currently Xen only support ACPI memory hot-add. If you want
to hot-add memory at runtime (the hot-added memory cannot be
removed until machine stop), select Y/M here, otherwise select N.
tristate "Xen ACPI processor"
depends on XEN && X86 && ACPI_PROCESSOR && CPU_FREQ
......@@ -31,6 +31,7 @@ obj-$(CONFIG_XEN_MCE_LOG) += mcelog.o
obj-$(CONFIG_XEN_PCIDEV_BACKEND) += xen-pciback/
obj-$(CONFIG_XEN_PRIVCMD) += xen-privcmd.o
obj-$(CONFIG_XEN_STUB) += xen-stub.o
obj-$(CONFIG_XEN_ACPI_HOTPLUG_MEMORY) += xen-acpi-memhotplug.o
obj-$(CONFIG_XEN_ACPI_PROCESSOR) += xen-acpi-processor.o
xen-evtchn-y := evtchn.o
xen-gntdev-y := gntdev.o
This diff is collapsed.
......@@ -324,10 +324,14 @@ struct xenpf_cpu_ol {
* CMD 58 and 59 are reserved for cpu hotadd and memory hotadd,
* which are already occupied at Xen hypervisor side.
#define XENPF_mem_hotadd 59
struct xenpf_mem_hotadd {
uint64_t spfn;
uint64_t epfn;
uint32_t pxm;
uint32_t flags;
#define XENPF_core_parking 60
struct xenpf_core_parking {
/* IN variables */
......@@ -357,6 +361,7 @@ struct xen_platform_op {
struct xenpf_set_processor_pminfo set_pminfo;
struct xenpf_pcpuinfo pcpu_info;
struct xenpf_cpu_ol cpu_ol;
struct xenpf_mem_hotadd mem_add;
struct xenpf_core_parking core_parking;
uint8_t pad[128];
} u;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment