[xen staging] vtd: cleanup vtd_set_hwdom_mapping after ia64 removal

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

[xen staging] vtd: cleanup vtd_set_hwdom_mapping after ia64 removal

patchbot
commit 9e26b58fa71e355d31eedf917e2ef58bdd12a65c
Author:     Roger Pau Monné <[hidden email]>
AuthorDate: Thu Aug 2 12:11:03 2018 +0200
Commit:     Jan Beulich <[hidden email]>
CommitDate: Thu Aug 2 12:11:03 2018 +0200

    vtd: cleanup vtd_set_hwdom_mapping after ia64 removal
   
    Remove the handling for different page sizes now that ia64 is gone.
   
    No functional change.
   
    Suggested by: Jan Beulich <[hidden email]>
    Signed-off-by: Roger Pau Monné <[hidden email]>
    Acked-by: Kevin Tian <[hidden email]>
---
 xen/drivers/passthrough/vtd/x86/vtd.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/xen/drivers/passthrough/vtd/x86/vtd.c b/xen/drivers/passthrough/vtd/x86/vtd.c
index cc2bfea162..00a9891005 100644
--- a/xen/drivers/passthrough/vtd/x86/vtd.c
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c
@@ -110,7 +110,7 @@ void hvm_dpci_isairq_eoi(struct domain *d, unsigned int isairq)
 
 void __hwdom_init vtd_set_hwdom_mapping(struct domain *d)
 {
-    unsigned long i, j, tmp, top, max_pfn;
+    unsigned long i, top, max_pfn;
 
     BUG_ON(!is_hardware_domain(d));
 
@@ -121,7 +121,7 @@ void __hwdom_init vtd_set_hwdom_mapping(struct domain *d)
     {
         unsigned long pfn = pdx_to_pfn(i);
         bool map;
-        int rc = 0;
+        int rc;
 
         /*
          * Set up 1:1 mapping for dom0. Default to include only
@@ -152,21 +152,12 @@ void __hwdom_init vtd_set_hwdom_mapping(struct domain *d)
              page_is_ram_type(pfn, RAM_TYPE_CONVENTIONAL) )
             continue;
 
-        tmp = 1 << (PAGE_SHIFT - PAGE_SHIFT_4K);
-        for ( j = 0; j < tmp; j++ )
-        {
-            int ret = iommu_map_page(d, pfn * tmp + j, pfn * tmp + j,
-                                     IOMMUF_readable|IOMMUF_writable);
-
-            if ( !rc )
-               rc = ret;
-        }
-
+        rc = iommu_map_page(d, pfn, pfn, IOMMUF_readable|IOMMUF_writable);
         if ( rc )
             printk(XENLOG_WARNING VTDPREFIX " d%d: IOMMU mapping failed: %d\n",
                    d->domain_id, rc);
 
-        if (!(i & (0xfffff >> (PAGE_SHIFT - PAGE_SHIFT_4K))))
+        if (!(i & 0xfffff))
             process_pending_softirqs();
     }
 }
--
generated by git-patchbot for /home/xen/git/xen.git#staging


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