All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] intel-iommu: fix mapping PSI missing for iommu_map()
@ 2018-04-18  4:41 Peter Xu
  2018-04-18  4:41 ` [PATCH 1/3] intel-iommu: add some traces for PSIs Peter Xu
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Peter Xu @ 2018-04-18  4:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alex Williamson, Joerg Roedel, David Woodhouse, peterx

(PSI stands for: Page Selective Invalidations)

Intel IOMMU has the caching mode to ease emulation of the device.
When that bit is set, we need to send PSIs even for newly mapped
pages.  However current driver is not fully obey the rule.  E.g.,
iommu_map() API will only do the mapping but it never sent the PSIs
before.  That can be problematic to emulated IOMMU devices since
they'll never be able to build up the shadow page tables if without
such information.  This patchset tries to fix the problem.

Patch 1 is a tracing enhancement that helped me to triage the problem.
It might even be useful in the future.

Patch 2 generalized a helper to notify the MAP PSIs.

Patch 3 fixes the real problem by making sure every domain mapping
will trigger the MAP PSI notifications.

Without the patchset, nested device assignment (assign one device
firstly to L1 guest, then to L2 guest) won't work for QEMU.  After
applying the patchset, it works.

Please review.  Thanks.

Peter Xu (3):
  intel-iommu: add some traces for PSIs
  intel-iommu: generalize __mapping_notify_one()
  intel-iommu: fix iotlb psi missing for mappings

 drivers/iommu/dmar.c        |  3 ++
 drivers/iommu/intel-iommu.c | 68 ++++++++++++++++++++++++++++++++-------------
 2 files changed, 52 insertions(+), 19 deletions(-)

-- 
2.14.3

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

end of thread, other threads:[~2018-04-18  8:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-18  4:41 [PATCH 0/3] intel-iommu: fix mapping PSI missing for iommu_map() Peter Xu
2018-04-18  4:41 ` [PATCH 1/3] intel-iommu: add some traces for PSIs Peter Xu
2018-04-18  4:41 ` [PATCH 2/3] intel-iommu: generalize __mapping_notify_one() Peter Xu
2018-04-18  4:41 ` [PATCH 3/3] intel-iommu: fix iotlb psi missing for mappings Peter Xu
2018-04-18  4:46 ` [PATCH 0/3] intel-iommu: fix mapping PSI missing for iommu_map() Peter Xu
2018-04-18  8:36 ` Peter Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.