Commit 31e7e931 authored by Stefano Stabellini's avatar Stefano Stabellini

xen: do not initialize PV timers on HVM if !xen_have_vector_callback

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: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: default avatarJeremy Fitzhardinge <jeremy@goop.org>
parent a947f0f8
...@@ -489,8 +489,9 @@ static void xen_hvm_setup_cpu_clockevents(void) ...@@ -489,8 +489,9 @@ static void xen_hvm_setup_cpu_clockevents(void)
__init void xen_hvm_init_time_ops(void) __init void xen_hvm_init_time_ops(void)
{ {
/* vector callback is needed otherwise we cannot receive interrupts /* vector callback is needed otherwise we cannot receive interrupts
* on cpu > 0 */ * on cpu > 0 and at this point we don't know how many cpus are
if (!xen_have_vector_callback && num_present_cpus() > 1) * available */
if (!xen_have_vector_callback)
return; return;
if (!xen_feature(XENFEAT_hvm_safe_pvclock)) { if (!xen_feature(XENFEAT_hvm_safe_pvclock)) {
printk(KERN_INFO "Xen doesn't support pvclock on HVM," printk(KERN_INFO "Xen doesn't support pvclock on HVM,"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment