diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/xen/enlighten.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 3aeaa933b527..138e5667409a 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -193,10 +193,11 @@ void xen_vcpu_restore(void) | |||
193 | { | 193 | { |
194 | int cpu; | 194 | int cpu; |
195 | 195 | ||
196 | for_each_online_cpu(cpu) { | 196 | for_each_possible_cpu(cpu) { |
197 | bool other_cpu = (cpu != smp_processor_id()); | 197 | bool other_cpu = (cpu != smp_processor_id()); |
198 | bool is_up = HYPERVISOR_vcpu_op(VCPUOP_is_up, cpu, NULL); | ||
198 | 199 | ||
199 | if (other_cpu && | 200 | if (other_cpu && is_up && |
200 | HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL)) | 201 | HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL)) |
201 | BUG(); | 202 | BUG(); |
202 | 203 | ||
@@ -205,7 +206,7 @@ void xen_vcpu_restore(void) | |||
205 | if (have_vcpu_info_placement) | 206 | if (have_vcpu_info_placement) |
206 | xen_vcpu_setup(cpu); | 207 | xen_vcpu_setup(cpu); |
207 | 208 | ||
208 | if (other_cpu && | 209 | if (other_cpu && is_up && |
209 | HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL)) | 210 | HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL)) |
210 | BUG(); | 211 | BUG(); |
211 | } | 212 | } |