summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorWei Liu <wei.liu2@citrix.com>2012-12-13 15:33:05 +0000
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-12-17 21:58:09 -0500
commit9d328a948f38ec240fc6d05db2c146e23ccd9b8b (patch)
treeb50234ea0ffe5b4870533e8a97ae1c43d8322fcd /arch
parentcc31fd9c4f8fc466ec8488d617150e751f643903 (diff)
downloadop-kernel-dev-9d328a948f38ec240fc6d05db2c146e23ccd9b8b.zip
op-kernel-dev-9d328a948f38ec240fc6d05db2c146e23ccd9b8b.tar.gz
xen/vcpu: Fix vcpu restore path.
The runstate of vcpu should be restored for all possible cpus, as well as the vcpu info placement. Acked-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/xen/enlighten.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 3aeaa93..138e566 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -193,10 +193,11 @@ void xen_vcpu_restore(void)
{
int cpu;
- for_each_online_cpu(cpu) {
+ for_each_possible_cpu(cpu) {
bool other_cpu = (cpu != smp_processor_id());
+ bool is_up = HYPERVISOR_vcpu_op(VCPUOP_is_up, cpu, NULL);
- if (other_cpu &&
+ if (other_cpu && is_up &&
HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL))
BUG();
@@ -205,7 +206,7 @@ void xen_vcpu_restore(void)
if (have_vcpu_info_placement)
xen_vcpu_setup(cpu);
- if (other_cpu &&
+ if (other_cpu && is_up &&
HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL))
BUG();
}
OpenPOWER on IntegriCloud