Skip to content

Commit

Permalink
xen: Do not enable PV IPIs when vector callback not present
Browse files Browse the repository at this point in the history
Fix regression for HVM case on older (<4.1.1) hypervisors caused by

  commit 99bbb3a
  Author: Stefano Stabellini <[email protected]>
  Date:   Thu Dec 2 17:55:10 2010 +0000

    xen: PV on HVM: support PV spinlocks and IPIs

This change replaced the SMP operations with event based handlers without
taking into account that this only works when the hypervisor supports
callback vectors. This causes unexplainable hangs early on boot for
HVM guests with more than one CPU.

BugLink: http://bugs.launchpad.net/bugs/791850

CC: [email protected]
Signed-off-by: Stefan Bader <[email protected]>
Signed-off-by: Stefano Stabellini <[email protected]>
Tested-and-Reported-by: Stefan Bader <[email protected]>
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
  • Loading branch information
Stefano Stabellini authored and konradwilk committed Aug 22, 2011
1 parent ccbcdf7 commit 3c05c4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/xen/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,6 @@ static void __init xen_hvm_smp_prepare_cpus(unsigned int max_cpus)
native_smp_prepare_cpus(max_cpus);
WARN_ON(xen_smp_intr_init(0));

if (!xen_have_vector_callback)
return;
xen_init_lock_cpu(0);
xen_init_spinlocks();
}
Expand All @@ -546,6 +544,8 @@ static void xen_hvm_cpu_die(unsigned int cpu)

void __init xen_hvm_smp_init(void)
{
if (!xen_have_vector_callback)
return;
smp_ops.smp_prepare_cpus = xen_hvm_smp_prepare_cpus;
smp_ops.smp_send_reschedule = xen_smp_send_reschedule;
smp_ops.cpu_up = xen_hvm_cpu_up;
Expand Down

0 comments on commit 3c05c4b

Please sign in to comment.