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

[PATCH v1 0/8] Implement PCI device enumeration on Arm part 1


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
  • Date: Wed, 24 Sep 2025 07:59:19 +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=qTwXTNysux3iP3L58FkRp17XcK5UFJFmSy4ETHEy7e4=; b=Jdc/u+LXuaa+gkEE3YaMRYF2Sqy6mHkuXAfSNx83qsM7i9fCW9vPDJAJzQlcQNHCtL26EgMplmwyYPEy8dBCDlWMg8Ri9BnKtWmq22YHZwtqLa6EuFTW1jF9mQuAJQeNxN2pSi1fyL3wBT+AJip5s4x656UMfWo18+fT3gdytpy9o8vJ45/Z9HK/PAnGe23AZLLJiK++QUt5fhevwTejDzYVBdRWPnw5c+yl0sGGjIdV7W/rLgcn8Idr17AI+rl5jinPoXQQwu59UQdzD8m1XNi79tKGoU1teii+zhrStNvujWDQ/QXYWR/EJn/R7hSvny7eDdCOs8sAm//7BCczsg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sWE/BPUjP/H8ZNFgxR2g2q2ZlTAIEnW92LYsMR3FaZSNVN0w2P76P3WVs61I6/hyfsG3kdqr2EgpSh7nJi5bitAryGwC8D0ZFUKn+4uYDXvUC7zUgNguyzpPECguZ0aeCL6EJHsc+IyvnP1EQUufcm2hUo+oLGeCH64Uoh1bhNhVfjxxAy3Y5rJugTLBPU4JKkpkVCpWnn9UGcm6TS864xxjp9fx4pG9wKhbYI3WUrpsIL7l1K8aC6Y48Fkpyzn89U6GQUFsP5lqlc5yUTtVPAIlt8jeDibBlqawgJF5b/1uHX3NqSyBKernMzxgQvh0t5oHeQZoc3bZ9EDQ7loUeg==
  • 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>
  • Delivery-date: Wed, 24 Sep 2025 07:59:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHcLSkhRXSikUEA50SGGeDzHe8jnA==
  • Thread-topic: [PATCH v1 0/8] Implement PCI device enumeration on Arm part 1

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()
4. PCI physdev ops are disabled for HW domain using VPCI.

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

Luca Fancellu (3):
  xen/pci: update DT for hwdom when it uses vpci
  xen/pci: disable pci_device_{add,remove} when hwdom uses vpci on arm
  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/domain_build.h |   1 +
 xen/arch/arm/include/asm/pci.h          |  25 ++++
 xen/arch/arm/include/asm/setup.h        |   2 +-
 xen/arch/arm/pci/pci-host-common.c      |  83 ++++++++++++-
 xen/arch/arm/pci/pci.c                  |  24 +++-
 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     |   9 ++
 xen/drivers/passthrough/pci.c           | 119 +++++++++++++++++-
 xen/drivers/pci/physdev.c               |   6 +
 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                  |   9 ++
 20 files changed, 509 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®.