]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
xen/vcpu: Handle xen_vcpu_setup() failure at boot
authorAnkur Arora <ankur.a.arora@oracle.com>
Sat, 3 Jun 2017 00:06:02 +0000 (17:06 -0700)
committerJuergen Gross <jgross@suse.com>
Tue, 13 Jun 2017 14:10:58 +0000 (16:10 +0200)
commitae039001054b34c4a624539b32a8b6ff3403aaf9
tree593737839f22262a0c46b39d86987d741f1df8d7
parentc9b5d98b25161a7ebee6ea59d6424dd9f33c1b99
xen/vcpu: Handle xen_vcpu_setup() failure at boot

On PVH, PVHVM, at failure in the VCPUOP_register_vcpu_info hypercall
we limit the number of cpus to to MAX_VIRT_CPUS. However, if this
failure had occurred for a cpu beyond MAX_VIRT_CPUS, we continue
to function with > MAX_VIRT_CPUS.

This leads to problems at the next save/restore cycle when there
are > MAX_VIRT_CPUS threads going into stop_machine() but coming
back up there's valid state for only the first MAX_VIRT_CPUS.

This patch pulls the excess CPUs down via cpu_down().

Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
arch/x86/xen/smp.c
arch/x86/xen/smp.h
arch/x86/xen/smp_hvm.c
arch/x86/xen/smp_pv.c