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

[PATCH v2 0/7] Implement PCI device enumeration on Arm


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
  • Date: Wed, 22 Oct 2025 13:56:17 +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=GhasN+xkNZWH6EeNo1u/Dqg3Log2UsAz+BS6llV8g1g=; b=td/uqdsSW4iy1jCsm8zUWYFCT+d86OROhPfgAH2ReJQyh84u0Tk6M9AA2cdBDT64buj+thYiyYdZIMnpeJggR+BnnKeEZyEAiPmA3wIVh0tw+so6bBHFg8A7+yjggBz1cxsArwS/ZIRKiVPXFTfDH/CtpO9LLo2uJiIiewN9tpYsXUVemqv5hL+pokkHEmajzr8Zw4H2CswKTlPUiqiZI8DQ9tBi0K/+HAePsxsrEm0xFNRWSaoak8PTqiQqrW6JERM69ClfS8KtutAeOQlOEeOmh6CFflFXj/HBLvCkhfUuHtsIk4pc0t2o07Nm+hesv1YgS5ScCgbhX44SwEComA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=D4pXiP18pRuIONgjSzUca9lBu5Lnx8SV5OC7va5VK2EjzF5YRapp7lcANmqFUFYyybnB4DskIAfDtoHxBSI2Y2iIUXDJEogXpBIXXhN3mJI3WsNBzhsKqQkf+aKhKnc7fxljUIu0hbTMx9HwiidVbHDDVZYm+L99in82H69TNHty+fzNe8pj/T+qTE9uOZJBpOUNsTkprJRXb98nVTTAzUsrOZwcV08hpJgRUxBn8mUBY7Z5AvjA3rYcrGKliXwj5Dn7PVM8GB4h2ifTntMGSX8FZrNQ/CTZR0MAdLSS8Nwxfjn2WUXHbDkm+BKoT/1lxTM7+3k5eojbT1cdZgfR6w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Delivery-date: Wed, 22 Oct 2025 13:56:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHcQ1uj/RZMssOFqEGEU57P0Hacnw==
  • Thread-topic: [PATCH v2 0/7] Implement PCI device enumeration on Arm

This series adds basic PCI device enumeration in Xen on Arm. This will allow us
to not rely on Dom0 enumeration for supported controllers, which will enable PCI
passthrough for dom0less setups.

Enumeration is disabled by default and can be enabled with "pci-scan" cmdline
option.

For now the discovered devices are only assigned to HW domain. To achieve this,
several things need to be done:
1. A VPCI node is created for HW domain device tree, and the real PCI nodes are
hidden from it.
2. Discovered devices BARs are initialized.
3. Register handles for VPCI are updated to change behaviour depending on
whether or not the calling domain uses VPCI or HW PCI, instead of relying on
is_hardware_domain()

Tested on QEMU.
Arm:
* pci-scan=yes pci-passthrough=yes
* pci-scan=no pci-passthrough=yes
* pci-scan=no pci-passthrough=no
X86:
* no special options

v1->v2:
* drop xen/pci: disable pci_device_{add,remove} when hwdom uses vpci on arm
* see individual patches


Edward Pickup (1):
  arm/pci: Add pci-scan boot argument

Luca Fancellu (2):
  xen/pci: update DT for hwdom when it uses vpci
  xen/pci: assign discovered devices to hwdom

Mykyta Poturai (1):
  arm/pci: enable vpci for hwdom when pci-scan is enabled

Stefano Stabellini (1):
  xen/pci: introduce has_vpci_bridge

Stewart Hildebrand (2):
  xen/dt: pass flags to callback in dt_for_each_range()
  xen/pci: initialize BARs

 docs/misc/xen-command-line.pandoc    |   9 ++
 xen/arch/arm/device.c                |   4 +-
 xen/arch/arm/domain_build.c          | 154 ++++++++++++++++++++++++++-
 xen/arch/arm/include/asm/domain.h    |   3 +-
 xen/arch/arm/include/asm/pci.h       |  23 ++++
 xen/arch/arm/include/asm/setup.h     |   2 +-
 xen/arch/arm/pci/pci-host-common.c   |  81 +++++++++++++-
 xen/arch/arm/pci/pci.c               |  30 +++++-
 xen/arch/x86/include/asm/pci.h       |  20 ++++
 xen/common/device-tree/device-tree.c |   5 +-
 xen/common/rangeset.c                |  35 ++++++
 xen/drivers/passthrough/arm/iommu.c  |  13 +++
 xen/drivers/passthrough/pci.c        | 120 ++++++++++++++++++++-
 xen/drivers/vpci/header.c            |  14 +--
 xen/drivers/vpci/vpci.c              |   4 +-
 xen/include/xen/device_tree.h        |   2 +-
 xen/include/xen/rangeset.h           |   6 +-
 xen/include/xen/vpci.h               |   8 ++
 18 files changed, 508 insertions(+), 25 deletions(-)

-- 
2.34.1



 


Rackspace

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