linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] vfio-pci support pasid attach/detach
@ 2023-11-27  6:39 Yi Liu
  2023-11-27  6:39 ` [PATCH 1/3] vfio-iommufd: Support pasid [at|de]tach for physical VFIO devices Yi Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Yi Liu @ 2023-11-27  6:39 UTC (permalink / raw)
  To: joro, alex.williamson, jgg, kevin.tian, robin.murphy, baolu.lu
  Cc: cohuck, eric.auger, nicolinc, kvm, mjrosato, chao.p.peng,
	yi.l.liu, yi.y.sun, peterx, jasowang, shameerali.kolothum.thodi,
	lulu, suravee.suthikulpanit, iommu, linux-kernel, linux-kselftest,
	zhenzhong.duan, joao.m.martins, xin.zeng, yan.y.zhao

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], tested with a draft Qemu branch[3]

[1] https://lore.kernel.org/linux-iommu/20231127063428.127436-1-yi.l.liu@intel.com/
[2] https://github.com/yiliu1765/iommufd/tree/iommufd_pasid
[3] https://github.com/yiliu1765/qemu/tree/zhenzhong/wip/iommufd_nesting_rfcv1%2Bpasid

Change log:

v1:
 - Report PASID capability via VFIO_DEVICE_FEATURE (Alex)

rfc: https://lore.kernel.org/linux-iommu/20230926093121.18676-1-yi.l.liu@intel.com/

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: Report PASID capability via VFIO_DEVICE_FEATURE ioctl

 drivers/vfio/device_cdev.c       | 45 +++++++++++++++++++++
 drivers/vfio/iommufd.c           | 48 ++++++++++++++++++++++
 drivers/vfio/pci/vfio_pci.c      |  2 +
 drivers/vfio/pci/vfio_pci_core.c | 47 ++++++++++++++++++++++
 drivers/vfio/vfio.h              |  4 ++
 drivers/vfio/vfio_main.c         |  8 ++++
 include/linux/vfio.h             | 11 ++++++
 include/uapi/linux/vfio.h        | 68 ++++++++++++++++++++++++++++++++
 8 files changed, 233 insertions(+)

-- 
2.34.1


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

end of thread, other threads:[~2024-01-15 17:18 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-27  6:39 [PATCH 0/3] vfio-pci support pasid attach/detach Yi Liu
2023-11-27  6:39 ` [PATCH 1/3] vfio-iommufd: Support pasid [at|de]tach for physical VFIO devices Yi Liu
2024-01-15 17:18   ` Jason Gunthorpe
2023-11-27  6:39 ` [PATCH 2/3] vfio: Add VFIO_DEVICE_PASID_[AT|DE]TACH_IOMMUFD_PT Yi Liu
2023-11-27  6:50   ` Duan, Zhenzhong
2023-11-28  3:06     ` Yi Liu
2023-12-11 17:05   ` Alex Williamson
2023-12-12  3:02     ` Yi Liu
2023-11-27  6:39 ` [PATCH 3/3] vfio: Report PASID capability via VFIO_DEVICE_FEATURE ioctl Yi Liu
2023-11-27  7:28   ` Duan, Zhenzhong
2023-11-28  3:11     ` Yi Liu
2023-11-28  4:23       ` Duan, Zhenzhong
2023-12-07  8:47   ` Tian, Kevin
2023-12-11  8:08     ` Yi Liu
2023-12-12  2:20       ` Tian, Kevin
2023-12-12  3:26         ` Yi Liu
2023-12-12 15:31         ` Jason Gunthorpe
2023-12-13  1:59           ` Tian, Kevin
2023-12-11 18:03   ` Alex Williamson
2023-12-11 18:10     ` Jason Gunthorpe
2023-12-11 18:49       ` Alex Williamson
2023-12-12 15:35         ` Jason Gunthorpe
2023-12-13  2:10           ` Tian, Kevin
2024-01-15  9:49           ` Yi Liu
2023-12-12  2:16     ` Tian, Kevin
2023-12-12  3:44       ` Yi Liu
2023-12-12  2:43     ` Duan, Zhenzhong
2023-12-12  3:39       ` Alex Williamson
2023-12-12  3:53         ` Yi Liu
2023-12-12 15:27         ` Jason Gunthorpe
2024-01-15  8:20           ` Yi Liu

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).