Skip to content

RFC vfio-pci support pasid attach/detach

Yi Liu kvm linux-iommu linux-kselftest lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3vfio-iommufd: Support pasid [at|de]tach for physical VFIO devicesdrivers/vfio/iommufd.c drivers/vfio/pci/vfio_pci.c include/linux/vfio.h+61 -00 replies
2/3vfio: Add VFIO_DEVICE_PASID_[AT|DE]TACH_IOMMUFD_PTdrivers/vfio/device_cdev.c drivers/vfio/vfio.h drivers/vfio/vfio_main.c +1 more+112 -00 replies
3/3vfio/pci: Expose PCIe PASID capability to userspacedrivers/vfio/pci/vfio_pci_config.c+1 -13 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/3] vfio-pci support pasid attach/detach

This adds the pasid attach/detach uAPIs for userspace to attach/detach a PASID of a device to/from a given ioas/hwpt. Only vfio-pci driver is enabled in this series. After this series, PASID-capable devices bound with vfio-pci can report PASID capability to userspace and VM to enable PASID usages like Shared Virtual Addressing (SVA).

This series first adds the helpers for pasid attach in vfio core and then add the device cdev ioctls for pasid attach/detach, finally exposes the device PASID capability to user. It depends on iommufd pasid attach/detach series [1].

Complete code can be found at [2]

[1] https://lore.kernel.org/linux-iommu/[email protected]/
[2] https://github.com/yiliu1765/iommufd/tree/iommufd_pasid

Regards,
Yi Liu

Kevin Tian (1):
vfio-iommufd: Support pasid [at|de]tach for physical VFIO devices

Yi Liu (2):
vfio: Add VFIO_DEVICE_PASID_[AT|DE]TACH_IOMMUFD_PT vfio/pci: Expose PCIe PASID capability to userspace

 drivers/vfio/device_cdev.c         | 45 ++++++++++++++++++++++++
 drivers/vfio/iommufd.c             | 48 ++++++++++++++++++++++++++
 drivers/vfio/pci/vfio_pci.c        |  2 ++
 drivers/vfio/pci/vfio_pci_config.c |  2 +-
 drivers/vfio/vfio.h                |  4 +++
 drivers/vfio/vfio_main.c           |  8 +++++
 include/linux/vfio.h               | 11 ++++++
 include/uapi/linux/vfio.h          | 55 ++++++++++++++++++++++++++++++
 8 files changed, 174 insertions(+), 1 deletion(-)
Signature · 1 line
2.34.1