[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v4 0/5] Implement SR-IOV support for PVH


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
  • Date: Thu, 15 Oct 2026 14:08:36 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fvMlPCObxLIEvCughisWjippOr1t8mmEjUTQZnihfjI=; b=vjsMnYkmUuzfoa0UxWK4mKNZiP9LyOW86fBbJXMhmazLu4XO9ClOVh3E/GmJqGdzVot0rWm1kE69TRuqUKEaIdsoQMDd02CFBps7YdsQDZkHBqpr3FkyuFnBhExccVQyCxPZwO8ht7OJMwuR3TRWcZFHyYYAnjM5rWAmqCdA1igyQ7ocwrT4hPVnSSe54VQKV6F/OybHEmYxDQGt9HAFD91NLiT7FQuULAT5vkzr7j61hlnH5E6Bs7cDTxULrEY5aPHznu4t4aPMe4AR6lwpulA0lwbcjRQcuobnliZ/A4Nk9zwnpj2GBwLGKvRMb4nCCBzju9SIqQvUpi2pWruNtw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SGNw/MbbMqGtTOUUIYKvMkD9w0+xg/pz4LYznNgQtwLCIeWASl+7G8MJz8BKxUt7/u92i7if0rlcrOPEVY4K0iyepQywTfqUJnX2QuEKjELhUxT1Ebo7w2f7e/JTCl8hpWUfRQT4JeRdNivX7M2lBEcsuugH23oWw3FYpAu0GLRL/EgSq0RWGPuRWPqrF2OpKwD+dvoyvOINjzsRETlqrLmsjiyjHDvfzLDS8hCv07TzCOQ8yS96Y1BR8LB2/j4B6svrpupZUMdEd8Xsk4a0NzO8J+gpcAbpdEl3tr4FYuatQlqjKZ6s6F2FonhwmoF/RdNpTnQwZ4f/UAUDufpM4A==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck"
  • Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, Community Manager <community.manager@xxxxxxxxxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 15 Oct 2026 14:08:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHdXK6rQsC6poG5A0eHd+VJtXmFsg==
  • Thread-topic: [PATCH v4 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/20180717094830.54806-1-roger.pau@xxxxxxxxxx/

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@xxxxxxxx/
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                  |   1 +
 SUPPORT.md                    |   2 -
 tools/tests/vpci/emul.h       |   4 +
 xen/common/domain.c           |   2 +
 xen/drivers/passthrough/pci.c |  44 +++
 xen/drivers/pci/physdev.c     |  16 +-
 xen/drivers/vpci/Makefile     |   1 +
 xen/drivers/vpci/header.c     | 309 +++++++++++-------
 xen/drivers/vpci/private.h    |  24 ++
 xen/drivers/vpci/sriov.c      | 568 ++++++++++++++++++++++++++++++++++
 xen/drivers/vpci/vpci.c       |  24 +-
 xen/include/xen/pci.h         |   3 +
 xen/include/xen/vpci.h        |  45 ++-
 13 files changed, 909 insertions(+), 134 deletions(-)
 create mode 100644 xen/drivers/vpci/sriov.c

-- 
2.55.0

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.