Bridges are not behind an IOMMU, and are already special cased and
silently skipped in amd_iommu_add_device. Apply the same special
casing when updating page tables.

Signed-off-by: Roger Pau Monné <roger....@citrix.com>
---
Cc: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
Cc: Brian Woods <brian.wo...@amd.com>
---
 xen/drivers/passthrough/amd/iommu_map.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/xen/drivers/passthrough/amd/iommu_map.c 
b/xen/drivers/passthrough/amd/iommu_map.c
index 6a2c877d34..62292a9015 100644
--- a/xen/drivers/passthrough/amd/iommu_map.c
+++ b/xen/drivers/passthrough/amd/iommu_map.c
@@ -593,6 +593,10 @@ static int update_paging_mode(struct domain *d, unsigned 
long dfn)
         /* Update device table entries using new root table and paging mode */
         for_each_pdev( d, pdev )
         {
+            if ( is_hardware_domain(d) &&
+                 pdev->type == DEV_TYPE_PCI_HOST_BRIDGE )
+                continue;
+
             bdf = PCI_BDF2(pdev->bus, pdev->devfn);
             iommu = find_iommu_for_device(pdev->seg, bdf);
             if ( !iommu )
-- 
2.19.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to