From d43c9841300448da7a7239c78de72d394e24dc76 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Thu, 13 Dec 2012 15:33:05 +0000 Subject: [PATCH] --- yaml --- r: 346891 b: refs/heads/master c: 9d328a948f38ec240fc6d05db2c146e23ccd9b8b h: refs/heads/master i: 346889: 5a9ab37b297a2dd35ebd1b52b7ee60427d8dbaac 346887: 0bfa75e1445a90c65ca46ca2a9b76d49569df1bc v: v3 --- [refs] | 2 +- trunk/arch/x86/xen/enlighten.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 6b3e259d9642..56f73370d775 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cc31fd9c4f8fc466ec8488d617150e751f643903 +refs/heads/master: 9d328a948f38ec240fc6d05db2c146e23ccd9b8b diff --git a/trunk/arch/x86/xen/enlighten.c b/trunk/arch/x86/xen/enlighten.c index 3aeaa933b527..138e5667409a 100644 --- a/trunk/arch/x86/xen/enlighten.c +++ b/trunk/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(); }