diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-11-12 11:43:21 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-11-12 11:43:21 +0000 |
commit | c1100c28edad0c4494bba80f7b2da1f573d28d44 (patch) | |
tree | 7b9f3008aa467e64ed8ed5f7c8f3a33624a8a30c /xen/arch/x86/mpparse.c | |
parent | f4cf0d5e8825b258de4964c615dbbfdae85d0b03 (diff) | |
download | xen-c1100c28edad0c4494bba80f7b2da1f573d28d44.tar.gz xen-c1100c28edad0c4494bba80f7b2da1f573d28d44.tar.bz2 xen-c1100c28edad0c4494bba80f7b2da1f573d28d44.zip |
Support physical CPU hot-add in xen hypervisor
This patch add CPU hot-add in system.
a) It mark all CPU as possible when booting, if CONFIG_HOTPLUG_CPU is
set. BTW, this will increase per_cpu area.
b) When a CPU is added through hypercall, the CPU will be marked as
present and offline, and the numa information is setup if numa is
supported. The CPU will be brought to online by dom0 online explicitly.
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
Diffstat (limited to 'xen/arch/x86/mpparse.c')
-rw-r--r-- | xen/arch/x86/mpparse.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c index 7d65c2abaf..33648562ae 100644 --- a/xen/arch/x86/mpparse.c +++ b/xen/arch/x86/mpparse.c @@ -35,7 +35,7 @@ /* Have we found an MP table */ int smp_found_config; -unsigned int __initdata maxcpus = NR_CPUS; +unsigned int __devinitdata maxcpus = NR_CPUS; /* * Various Linux-internal data structures created from the @@ -868,6 +868,20 @@ int __devinit mp_register_lapic ( return MP_processor_info(&processor); } +void mp_unregister_lapic(uint32_t apic_id, uint32_t cpu) +{ + if (!cpu || (apic_id == boot_cpu_physical_apicid)) + return; + + if (x86_cpu_to_apicid[cpu] != apic_id) + return; + + physid_clear(apic_id, phys_cpu_present_map); + + x86_cpu_to_apicid[cpu] = BAD_APICID; + cpu_clear(cpu, cpu_present_map); + } + #ifdef CONFIG_X86_IO_APIC #define MP_ISA_BUS 0 |