]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
VT-d: posted interrupts require interrupt remapping
authorJan Beulich <jbeulich@suse.com>
Wed, 15 May 2019 07:41:37 +0000 (09:41 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 15 May 2019 07:41:37 +0000 (09:41 +0200)
Initially I had just noticed the unnecessary indirection in the call
from pi_update_irte(). The generic wrapper having an iommu_intremap
conditional made me look at the setup code though. So first of all
enforce the necessary dependency.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 6c54663786d9f1ed04153867687c158675e7277d
master date: 2019-04-09 15:12:07 +0200

xen/drivers/passthrough/vtd/intremap.c
xen/drivers/passthrough/vtd/iommu.c

index 1d198560918eed11bfa1645eb8cba8bc1d3a14bd..c9927e47069374f3640ce888954fc568d6ac9f4d 100644 (file)
@@ -988,7 +988,8 @@ int pi_update_irte(const struct pi_desc *pi_desc, const struct pirq *pirq,
     spin_unlock_irq(&desc->lock);
 
     ASSERT(pcidevs_locked());
-    return iommu_update_ire_from_msi(msi_desc, &msi_desc->msg);
+
+    return msi_msg_write_remap_rte(msi_desc, &msi_desc->msg);
 
  unlock_out:
     spin_unlock_irq(&desc->lock);
index 50a0e25224935aca903ba66bccba75b4d72f8fca..1db1cd9f2d09768865a9beb3987fc24f760f7c63 100644 (file)
@@ -2342,7 +2342,7 @@ int __init intel_vtd_setup(void)
          * not supported, since we count on this feature to
          * atomically update 16-byte IRTE in posted format.
          */
-        if ( !cap_intr_post(iommu->cap) || !cpu_has_cx16 )
+        if ( !cap_intr_post(iommu->cap) || !iommu_intremap || !cpu_has_cx16 )
             iommu_intpost = 0;
 
         if ( !vtd_ept_page_compatible(iommu) )