[xen staging] amd/iommu: skip host bridge devices when updating IOMMU page tables

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen staging] amd/iommu: skip host bridge devices when updating IOMMU page tables

patchbot
commit fad6ba64a8c98bebb9374f390cc255fac05237ab
Author:     Roger Pau Monné <[hidden email]>
AuthorDate: Fri Nov 30 12:10:00 2018 +0100
Commit:     Jan Beulich <[hidden email]>
CommitDate: Fri Nov 30 12:10:00 2018 +0100

    amd/iommu: skip host bridge devices when updating IOMMU page tables
   
    Host bridges are not behind an IOMMU, and are already special cased and
    skipped in amd_iommu_add_device. Apply the same special casing when
    updating page tables.
   
    This is required or else update_paging_mode will fail and return an
    error to the caller (amd_iommu_{un}map_page) which will destroy the
    domain.
   
    Signed-off-by: Roger Pau Monné <[hidden email]>
    Acked-by: Brian Woods <[hidden email]>
---
 xen/drivers/passthrough/amd/iommu_map.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/drivers/passthrough/amd/iommu_map.c b/xen/drivers/passthrough/amd/iommu_map.c
index 0ac3f473b3..4ff05e4bdc 100644
--- a/xen/drivers/passthrough/amd/iommu_map.c
+++ b/xen/drivers/passthrough/amd/iommu_map.c
@@ -616,6 +616,9 @@ 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 ( 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 )
--
generated by git-patchbot for /home/xen/git/xen.git#staging


_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog