]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xen/cpu: Make VCPU hotplug code online CPUs properly.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 8 Feb 2012 00:11:51 +0000 (19:11 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 9 Feb 2012 15:48:02 +0000 (10:48 -0500)
commitd1038b12072b0925db1deb973ce3b06e0a718143
treeeb1b8fdee4e29b0d695c8820a8e771e676bb35d4
parenta43a5ccdfa5bd5b2f00aa9b2321df268c2e5d6e2
xen/cpu: Make VCPU hotplug code online CPUs properly.

Offlining CPUs works. Onlining does not work anymore and it looks
like we were missing a cpu_up() call in the hotplug bring up path.

When the vCPUs are initialized, if they are onlined or never had
been in use (so maxcpus > vcpus) the vCPUs are in xen_play_dead
having called VCPUOP_down and are not running. When a vCPU is
onlined, the bootup (or any other currently running CPU) is suppose
to call VCPUOP_up on the vCPU that is not running and make the
vCPU unhinge itself out of the xen_play_dead and continue in
cpu_idle. We did not make the hypercall on onlining, nor did we
recreate the timer, spinlocks, ipi interrupts so the vCPU never
was onlined. This patch fixes it by calling cpu_on() and we
also make the code more readable.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/cpu_hotplug.c