]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen/x86: make sure the HVM callback vector is correctly set
authorRoger Pau Monne <roger.pau@citrix.com>
Fri, 25 Sep 2015 16:42:06 +0000 (18:42 +0200)
committerRoger Pau Monne <roger.pau@citrix.com>
Wed, 4 Nov 2015 19:50:25 +0000 (20:50 +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>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/irq.c

index 990a2ca379482bf409c044b2f3596e8c58490d3b..b5f5b050f2fd831686347f2a7e604d582687d086 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)) )
+        return;
+
     spin_lock(&d->arch.hvm_domain.irq_lock);
 
     /* Tear down old callback via. */