aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-11-20 19:46:29 -0500
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-12-03 14:14:51 -0500
commit3905bb2aa7bb801b31946b37a4635ebac4009051 (patch)
tree3d952a665cdaeeee0fecede06a61060bb00b7ade
parentbe012920ecba161ad20303a3f6d9e96c58cf97c7 (diff)
xen: restore runstate_info even if !have_vcpu_info_placement
Even if have_vcpu_info_placement is not set, we still need to set up the runstate area on each resumed vcpu. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Stable Kernel <stable@kernel.org>
-rw-r--r--arch/x86/xen/enlighten.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index cb61f77e4496..a7b49f99a130 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -138,26 +138,23 @@ static void xen_vcpu_setup(int cpu)
138 */ 138 */
139void xen_vcpu_restore(void) 139void xen_vcpu_restore(void)
140{ 140{
141 if (have_vcpu_info_placement) { 141 int cpu;
142 int cpu;
143 142
144 for_each_online_cpu(cpu) { 143 for_each_online_cpu(cpu) {
145 bool other_cpu = (cpu != smp_processor_id()); 144 bool other_cpu = (cpu != smp_processor_id());
146 145
147 if (other_cpu && 146 if (other_cpu &&
148 HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL)) 147 HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL))
149 BUG(); 148 BUG();
150 149
151 xen_setup_runstate_info(cpu); 150 xen_setup_runstate_info(cpu);
152 151
152 if (have_vcpu_info_placement)
153 xen_vcpu_setup(cpu); 153 xen_vcpu_setup(cpu);
154 154
155 if (other_cpu && 155 if (other_cpu &&
156 HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL)) 156 HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL))
157 BUG(); 157 BUG();
158 }
159
160 BUG_ON(!have_vcpu_info_placement);
161 } 158 }
162} 159}
163 160