All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] vfio/type1/pci: IOMMU PFNMAP invalidation
@ 2020-05-14 16:51 Alex Williamson
  2020-05-14 16:51 ` [PATCH 1/2] vfio: Introduce bus driver to IOMMU invalidation interface Alex Williamson
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Alex Williamson @ 2020-05-14 16:51 UTC (permalink / raw)
  To: kvm; +Cc: linux-kernel, cohuck, jgg, peterx

This is a follow-on series to "vfio-pci: Block user access to disabled
device MMIO"[1], which extends user access blocking of disabled MMIO
ranges to include unmapping the ranges from the IOMMU.  The first patch
adds an invalidation callback path, allowing vfio bus drivers to signal
the IOMMU backend to unmap ranges with vma level granularity.  This
signaling is done both when the MMIO range becomes inaccessible due to
memory disabling, as well as when a vma is closed, making up for the
lack of tracking or pinning for non-page backed vmas.  The second
patch adds registration and testing interfaces such that the IOMMU
backend driver can test whether a given PFNMAP vma is provided by a
vfio bus driver supporting invalidation.  We can then implement more
restricted semantics to only allow PFNMAP DMA mappings when we have
such support, which becomes the new default.

Jason, if you'd like Suggested-by credit for the ideas here I'd be
glad to add it.  Thanks,

Alex

[1]https://lore.kernel.org/kvm/158871401328.15589.17598154478222071285.stgit@gimli.home/

---

Alex Williamson (2):
      vfio: Introduce bus driver to IOMMU invalidation interface
      vfio: Introduce strict PFNMAP mappings


 drivers/vfio/pci/vfio_pci.c         |   41 ++++++++++-
 drivers/vfio/pci/vfio_pci_private.h |    1 
 drivers/vfio/vfio.c                 |   76 ++++++++++++++++++++
 drivers/vfio/vfio_iommu_type1.c     |  130 +++++++++++++++++++++++++++--------
 include/linux/vfio.h                |    9 ++
 5 files changed, 222 insertions(+), 35 deletions(-)


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

end of thread, other threads:[~2020-05-20  0:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14 16:51 [PATCH 0/2] vfio/type1/pci: IOMMU PFNMAP invalidation Alex Williamson
2020-05-14 16:51 ` [PATCH 1/2] vfio: Introduce bus driver to IOMMU invalidation interface Alex Williamson
2020-05-20  0:19   ` Jason Gunthorpe
2020-05-14 16:52 ` [PATCH 2/2] vfio: Introduce strict PFNMAP mappings Alex Williamson
2020-05-20  0:20   ` Jason Gunthorpe
2020-05-14 21:25 ` [PATCH 0/2] vfio/type1/pci: IOMMU PFNMAP invalidation Peter Xu
2020-05-14 22:17   ` Alex Williamson
2020-05-14 22:24     ` Jason Gunthorpe
2020-05-14 22:55       ` Alex Williamson
2020-05-15 15:22         ` Peter Xu
2020-05-15 15:54           ` Alex Williamson
2020-05-20  0:24         ` Jason Gunthorpe
2020-05-20  0:23 ` Jason Gunthorpe

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.