Skip to content

Implement SR-IOV support for PVH

Mykyta Poturai xen-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest5 patches 1 replyIn review
  2. v45 patches 14 repliesSuperseded
  3. v37 patches 28 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v28 patches20 repliesSuperseded
v16 patches12 repliesSuperseded

Changes in v5 from the cover letter

* re-check pending VFs under pcidevs_lock()
* keep PHYSDEVOP_pci_device_add working for VFs on PV dom0
* gate the SR-IOV capability on the hardware domain instead of XSM
* drop the class/revision handler from the DomU patch
* see individual patches

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5vpci: Export functions required for SR-IOV supportxen/drivers/vpci/header.c xen/drivers/vpci/private.h+29 -160 replies
2/5vpci: use a local variable for the BAR rangesetxen/drivers/vpci/header.c+21 -171 reply
3/5vpci: allow queueing of mapping operationsxen/common/domain.c xen/drivers/vpci/header.c xen/drivers/vpci/private.h +2 more+170 -950 replies
4/5vpci: add SR-IOV support for PVH Dom0CHANGELOG.md SUPPORT.md tools/tests/vpci/emul.h +9 more+653 -40 replies
5/5vpci: add SR-IOV support for DomUsxen/drivers/vpci/sriov.c+56 -20 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchJason AndryukTeddy Astie
1/5R-b R-b
2/5R-b
3/5
4/5
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/5] Implement SR-IOV support for PVH

This series enables support for PCI SR-IOV capability for PVH domains. It allows Dom0 to enable and use SR-IOV virtual functions and for these functions to be passed to guests.

To achieve this, add handlers for SRIOV_CONTROL registers and simplified handlers for VF headers. Dom0 enables SR-IOV; Xen then discovers the VFs itself, terminating config space accesses to them for 100ms as the spec permits, and adding each VF on the first access past that window. No hypercall from dom0 is involved.

Core functionality is based on previous work[1].

Tested on R-Car Spider board with Samsung NVMe SSD Controller 980 and Intel X550T ethernet card.

[1]: https://lore.kernel.org/xen-devel/[email protected]/

v4->v5:
* re-check pending VFs under pcidevs_lock()
* keep PHYSDEVOP_pci_device_add working for VFs on PV dom0
* gate the SR-IOV capability on the hardware domain instead of XSM
* drop the class/revision handler from the DomU patch
* see individual patches

v3->v4:
* rework the series for VF discovery in Xen
* squash export patches
* drop "vpci: Use pervcpu ranges for BAR mapping"; rangesets are now allocated per mapping task
* split the non-functional churn into "vpci: use a local variable for the BAR rangeset"
* fold the documentation patch into "add SR-IOV support for PVH Dom0"
* see individual patches

v2->v3:
* rework the series for VF discovery by Dom0
* drop pci/iommu: Check that IOMMU supports removing devices, see [2]
* drop vpci: add a wait operation to the vpci vcpu pending actions
* add vpci: allow queueing of mapping operations
* minor changes in individual patches

[2]: https://patchew.org/Xen/a59c2da0d4c72deb42950e9a8e3982fbdee60668.1775555766.git.mykyta._5Fpoturai@epam.com/
v1->v2:
* rework the series for VF discovery in Xen
* separate doc changes into the last patch

Mykyta Poturai (1):
vpci: use a local variable for the BAR rangeset

Stewart Hildebrand (4):
vpci: Export functions required for SR-IOV support
vpci: allow queueing of mapping operations
vpci: add SR-IOV support for PVH Dom0
vpci: add SR-IOV support for DomUs

 CHANGELOG.md                  |   2 +
 SUPPORT.md                    |   2 -
 tools/tests/vpci/emul.h       |   6 +
 xen/common/domain.c           |   2 +
 xen/drivers/passthrough/pci.c |  46 +++
 xen/drivers/pci/physdev.c     |   3 +
 xen/drivers/vpci/Makefile     |   1 +
 xen/drivers/vpci/header.c     | 306 ++++++++++++-------
 xen/drivers/vpci/private.h    |  36 +++
 xen/drivers/vpci/sriov.c      | 560 ++++++++++++++++++++++++++++++++++
 xen/drivers/vpci/vpci.c       |  44 ++-
 xen/include/xen/pci.h         |   3 +
 xen/include/xen/vpci.h        |  40 ++-
 13 files changed, 923 insertions(+), 128 deletions(-)
 create mode 100644 xen/drivers/vpci/sriov.c
Signature · 1 line
2.56.1