]> xenbits.xensource.com Git - people/julieng/xen-unstable.git/commitdiff
x86: make sure the HVM callback vector is correctly set
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 3 Dec 2015 14:33:40 +0000 (15:33 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 3 Dec 2015 14:33:40 +0000 (15:33 +0100)
If certain devices (like the local or the io apic) are disabled some modes
of operation of the HVM event channel callback cannot be used. Make sure Xen
doesn't try to setup them.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/irq.c

index 990a2ca379482bf409c044b2f3596e8c58490d3b..0f3ab6c60c49c92217c0fbfbe0e7f6bf0adbc653 100644 (file)
@@ -330,6 +330,10 @@ void hvm_set_callback_via(struct domain *d, uint64_t via)
          (via_type > HVMIRQ_callback_vector) )
         via_type = HVMIRQ_callback_none;
 
+    if ( via_type != HVMIRQ_callback_vector &&
+         (!has_vlapic(d) || !has_vioapic(d) || !has_vpic(d)) )
+        return;
+
     spin_lock(&d->arch.hvm_domain.irq_lock);
 
     /* Tear down old callback via. */