xen/acpi: ACPI cpu hotplug

This patch implement real Xen ACPI cpu hotplug driver as module.
When loaded, it replaces Xen stub driver.

For booting existed cpus, the driver enumerates them.
For hotadded cpus, which added at runtime and notify OS via
device or container event, the driver is invoked to add them,
parsing cpu information, hypercalling to Xen hypervisor to add
them, and finally setting up new /sys interface for them.

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
Liu Jinsong
2013-01-25 15:43:34 +08:00
committed by Konrad Rzeszutek Wilk
parent 40a58637a4
commit 39adc483d3
6 changed files with 530 additions and 0 deletions

View File

@@ -324,6 +324,13 @@ struct xenpf_cpu_ol {
};
DEFINE_GUEST_HANDLE_STRUCT(xenpf_cpu_ol);
#define XENPF_cpu_hotadd 58
struct xenpf_cpu_hotadd {
uint32_t apic_id;
uint32_t acpi_id;
uint32_t pxm;
};
#define XENPF_mem_hotadd 59
struct xenpf_mem_hotadd {
uint64_t spfn;
@@ -361,6 +368,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_cpu_hotadd cpu_add;
struct xenpf_mem_hotadd mem_add;
struct xenpf_core_parking core_parking;
uint8_t pad[128];