Skip to content

vfio/pci: expose device's PASID capability to VMs

Liu, Yi L kvm linux-iommu lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 32 repliesIn review

Changelog from the cover letter

- RFC v1 -> Patch v1:
Add CONFIG_PCI_ATS #ifdef control to avoid compiling error.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2vfio/pci: Expose PCIe PASID capability to guestdrivers/vfio/pci/vfio_pci_config.c+1 -12 replies
2/2vfio/pci: Emulate PASID/PRI capability for VFsdrivers/vfio/pci/vfio_pci_config.c+323 -225 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH v1 0/2] vfio/pci: expose device's PASID capability to VMs

From: Liu Yi L <[email protected]>

Shared Virtual Addressing (SVA), a.k.a, Shared Virtual Memory (SVM) on Intel platforms allows address space sharing between device DMA and applications. SVA can reduce programming complexity and enhance security.

To enable SVA, device needs to have PASID capability, which is a key capability for SVA. This patchset exposes the device's PASID capability to guest instead of hiding it from guest.

The second patch emulates PASID capability for VFs (Virtual Function) since VFs don't implement such capability per PCIe spec. This patch emulates such capability and expose to VM if the capability is enabled in PF (Physical Function).

However, there is an open for PASID emulation. If PF driver disables PASID capability at runtime, then it may be an issue. e.g. PF should not disable PASID capability if there is guest using this capability on any VF related to this PF. To solve it, may need to introduce a generic communication framework between vfio-pci driver and PF drivers. Please feel free to give your suggestions on it.

Regards,
Yi Liu

Changelog:
- RFC v1 -> Patch v1:
Add CONFIG_PCI_ATS #ifdef control to avoid compiling error.

Liu Yi L (2):
vfio/pci: Expose PCIe PASID capability to guest
vfio/pci: Emulate PASID/PRI capability for VFs

 drivers/vfio/pci/vfio_pci_config.c | 327 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 324 insertions(+), 3 deletions(-)
Signature · 6 lines
2.7.4

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu