aboutsummaryrefslogtreecommitdiffstats
path: root/include/xen
diff options
context:
space:
mode:
authorLiu Jinsong <jinsong.liu@intel.com>2013-01-25 02:43:34 -0500
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2013-02-19 22:02:29 -0500
commit39adc483d378f79711f291539f20e3797337892d (patch)
tree7f045e2f284864f5f16cb3b072d2cb25e6e16801 /include/xen
parent40a58637a4fa10a2faea71f0f30ff0b3d74c6e00 (diff)
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>
Diffstat (limited to 'include/xen')
-rw-r--r--include/xen/acpi.h3
-rw-r--r--include/xen/interface/platform.h8
2 files changed, 11 insertions, 0 deletions
diff --git a/include/xen/acpi.h b/include/xen/acpi.h
index dc69c91605b8..c962d5f5b38b 100644
--- a/include/xen/acpi.h
+++ b/include/xen/acpi.h
@@ -54,6 +54,9 @@ void xen_stub_memory_device_exit(void);
54int xen_stub_processor_init(void); 54int xen_stub_processor_init(void);
55void xen_stub_processor_exit(void); 55void xen_stub_processor_exit(void);
56 56
57void xen_pcpu_hotplug_sync(void);
58int xen_pcpu_id(uint32_t acpi_id);
59
57int xen_acpi_notify_hypervisor_state(u8 sleep_state, 60int xen_acpi_notify_hypervisor_state(u8 sleep_state,
58 u32 pm1a_cnt, u32 pm1b_cnd); 61 u32 pm1a_cnt, u32 pm1b_cnd);
59 62
diff --git a/include/xen/interface/platform.h b/include/xen/interface/platform.h
index 2c4fb4bb07df..c57d5f67f702 100644
--- a/include/xen/interface/platform.h
+++ b/include/xen/interface/platform.h
@@ -324,6 +324,13 @@ struct xenpf_cpu_ol {
324}; 324};
325DEFINE_GUEST_HANDLE_STRUCT(xenpf_cpu_ol); 325DEFINE_GUEST_HANDLE_STRUCT(xenpf_cpu_ol);
326 326
327#define XENPF_cpu_hotadd 58
328struct xenpf_cpu_hotadd {
329 uint32_t apic_id;
330 uint32_t acpi_id;
331 uint32_t pxm;
332};
333
327#define XENPF_mem_hotadd 59 334#define XENPF_mem_hotadd 59
328struct xenpf_mem_hotadd { 335struct xenpf_mem_hotadd {
329 uint64_t spfn; 336 uint64_t spfn;
@@ -361,6 +368,7 @@ struct xen_platform_op {
361 struct xenpf_set_processor_pminfo set_pminfo; 368 struct xenpf_set_processor_pminfo set_pminfo;
362 struct xenpf_pcpuinfo pcpu_info; 369 struct xenpf_pcpuinfo pcpu_info;
363 struct xenpf_cpu_ol cpu_ol; 370 struct xenpf_cpu_ol cpu_ol;
371 struct xenpf_cpu_hotadd cpu_add;
364 struct xenpf_mem_hotadd mem_add; 372 struct xenpf_mem_hotadd mem_add;
365 struct xenpf_core_parking core_parking; 373 struct xenpf_core_parking core_parking;
366 uint8_t pad[128]; 374 uint8_t pad[128];