Skip to content

Commit

Permalink
xen: restore runstate_info even if !have_vcpu_info_placement
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeremy Fitzhardinge committed Dec 3, 2009
1 parent be01292 commit 3905bb2
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,26 +138,23 @@ static void xen_vcpu_setup(int cpu)
*/
void xen_vcpu_restore(void)
{
if (have_vcpu_info_placement) {
int cpu;
int cpu;

for_each_online_cpu(cpu) {
bool other_cpu = (cpu != smp_processor_id());
for_each_online_cpu(cpu) {
bool other_cpu = (cpu != smp_processor_id());

if (other_cpu &&
HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL))
BUG();
if (other_cpu &&
HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL))
BUG();

xen_setup_runstate_info(cpu);
xen_setup_runstate_info(cpu);

if (have_vcpu_info_placement)
xen_vcpu_setup(cpu);

if (other_cpu &&
HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL))
BUG();
}

BUG_ON(!have_vcpu_info_placement);
if (other_cpu &&
HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL))
BUG();
}
}

Expand Down

0 comments on commit 3905bb2

Please sign in to comment.