[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] IOMMU/x86: don't bypass softirq processing in arch_iommu_hwdom_init()



commit 9cedfab5e4b50bd1c6276413766350e2bff33b26
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Mar 2 10:49:48 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Mon Mar 2 13:06:22 2020 +0000

    IOMMU/x86: don't bypass softirq processing in arch_iommu_hwdom_init()
    
    Even when a page doesn't need mapping, we should check whether softirq
    processing should be invoked. Otherwise with sufficiently much RAM
    chances of a to-be-mapped page actually occurring with the loop counter
    having the "right" value may become diminishingly small.
    
    Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Tested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/drivers/passthrough/x86/iommu.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/xen/drivers/passthrough/x86/iommu.c 
b/xen/drivers/passthrough/x86/iommu.c
index 2cf528e760..6b4360ba39 100644
--- a/xen/drivers/passthrough/x86/iommu.c
+++ b/xen/drivers/passthrough/x86/iommu.c
@@ -226,9 +226,8 @@ void __hwdom_init arch_iommu_hwdom_init(struct domain *d)
         int rc;
 
         if ( !hwdom_iommu_map(d, pfn, max_pfn) )
-            continue;
-
-        if ( paging_mode_translate(d) )
+            rc = 0;
+        else if ( paging_mode_translate(d) )
             rc = set_identity_p2m_entry(d, pfn, p2m_access_rw, 0);
         else
             rc = iommu_map(d, _dfn(pfn), _mfn(pfn), PAGE_ORDER_4K,
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.