[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] IOMMU: avoid double flushing in shared page table case
 
- To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
 
- From: Julien Grall <julien@xxxxxxx>
 
- Date: Tue, 20 Oct 2020 16:00:17 +0100
 
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Paul Durrant <paul@xxxxxxx>
 
- Delivery-date: Tue, 20 Oct 2020 15:00:37 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
Hi Jan,
On 20/10/2020 14:52, Jan Beulich wrote:
 
While the flush coalescing optimization has been helping the non-shared
case, it has actually lead to double flushes in the shared case (which
ought to be the more common one nowadays at least): Once from
*_set_entry() and a second time up the call tree from wherever the
overriding flag gets played with. In alignment with XSA-346 suppress
flushing in this case.
Similarly avoid excessive setting of IOMMU_FLUSHF_added on the batched
flushes: "idx" hasn't been added a new mapping for.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
TBD: The Arm part really is just for completeness (and hence could also
      be dropped) - the affected mapping spaces aren't currently
      supported there.
 
 As I may I have pointed out in the past, there are many ways to screw 
things up when using iommu_dont_flush_iotlb.
So I would rather not introduce any usage on Arm until we see a use-case.
Cheers,
--
Julien Grall
 
 
    
     |