Skip to content

Commit

Permalink
xen: do not initialize PV timers on HVM if !xen_have_vector_callback
Browse files Browse the repository at this point in the history
if !xen_have_vector_callback do not initialize PV timer unconditionally
because we still don't know how many cpus are available and if there is
more than one we won't be able to receive the timer interrupts on
cpu > 0.

This patch fixes an hang at boot when Xen does not support vector
callbacks and the guest has multiple vcpus.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
  • Loading branch information
Stefano Stabellini committed Oct 5, 2010
1 parent a947f0f commit 31e7e93
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/x86/xen/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,9 @@ static void xen_hvm_setup_cpu_clockevents(void)
__init void xen_hvm_init_time_ops(void)
{
/* vector callback is needed otherwise we cannot receive interrupts
* on cpu > 0 */
if (!xen_have_vector_callback && num_present_cpus() > 1)
* on cpu > 0 and at this point we don't know how many cpus are
* available */
if (!xen_have_vector_callback)
return;
if (!xen_feature(XENFEAT_hvm_safe_pvclock)) {
printk(KERN_INFO "Xen doesn't support pvclock on HVM,"
Expand Down

0 comments on commit 31e7e93

Please sign in to comment.