xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH] IOMMU/x86: don't bypass softirq processing in arch_iommu_hwdom_init()
@ 2020-03-02  9:49 Jan Beulich
  2020-03-02  9:55 ` Roger Pau Monné
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2020-03-02  9:49 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Wei Liu, Roger Pau Monné

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@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- 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(
         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,

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xen-devel] [PATCH] IOMMU/x86: don't bypass softirq processing in arch_iommu_hwdom_init()
  2020-03-02  9:49 [Xen-devel] [PATCH] IOMMU/x86: don't bypass softirq processing in arch_iommu_hwdom_init() Jan Beulich
@ 2020-03-02  9:55 ` Roger Pau Monné
  2020-03-02 11:36   ` Andrew Cooper
  0 siblings, 1 reply; 3+ messages in thread
From: Roger Pau Monné @ 2020-03-02  9:55 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel, Wei Liu, Andrew Cooper

On Mon, Mar 02, 2020 at 10:49:48AM +0100, Jan Beulich wrote:
> 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@citrix.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xen-devel] [PATCH] IOMMU/x86: don't bypass softirq processing in arch_iommu_hwdom_init()
  2020-03-02  9:55 ` Roger Pau Monné
@ 2020-03-02 11:36   ` Andrew Cooper
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2020-03-02 11:36 UTC (permalink / raw)
  To: Roger Pau Monné, Jan Beulich; +Cc: xen-devel, Wei Liu

On 02/03/2020 09:55, Roger Pau Monné wrote:
> On Mon, Mar 02, 2020 at 10:49:48AM +0100, Jan Beulich wrote:
>> 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@citrix.com>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>

This resolves the watchdog timeout, and reveals more work to do, but
I'll follow up on the main thread.

~Andrew

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-02 11:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02  9:49 [Xen-devel] [PATCH] IOMMU/x86: don't bypass softirq processing in arch_iommu_hwdom_init() Jan Beulich
2020-03-02  9:55 ` Roger Pau Monné
2020-03-02 11:36   ` Andrew Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).