All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] Implement PCI device enumeration on Arm
@ 2025-10-22 13:56 Mykyta Poturai
  2025-10-22 13:56 ` [PATCH v2 2/7] xen/dt: pass flags to callback in dt_for_each_range() Mykyta Poturai
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Mykyta Poturai @ 2025-10-22 13:56 UTC (permalink / raw)
  To: xen-devel@lists.xenproject.org
  Cc: Mykyta Poturai, Andrew Cooper, Anthony PERARD, Michal Orzel,
	Jan Beulich, Julien Grall, Roger Pau Monné,
	Stefano Stabellini, Bertrand Marquis, Volodymyr Babchuk,
	Stewart Hildebrand

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-10-22 14:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-22 13:56 [PATCH v2 0/7] Implement PCI device enumeration on Arm Mykyta Poturai
2025-10-22 13:56 ` [PATCH v2 2/7] xen/dt: pass flags to callback in dt_for_each_range() Mykyta Poturai
2025-10-22 13:56 ` [PATCH v2 1/7] arm/pci: Add pci-scan boot argument Mykyta Poturai
2025-10-22 13:56 ` [PATCH v2 3/7] xen/pci: update DT for hwdom when it uses vpci Mykyta Poturai
2025-10-22 13:56 ` [PATCH v2 4/7] xen/pci: introduce has_vpci_bridge Mykyta Poturai
2025-10-22 14:11   ` Jan Beulich
2025-10-22 13:56 ` [PATCH v2 5/7] xen/pci: initialize BARs Mykyta Poturai
2025-10-22 14:30   ` Jan Beulich
2025-10-22 13:56 ` [PATCH v2 7/7] arm/pci: enable vpci for hwdom when pci-scan is enabled Mykyta Poturai
2025-10-22 13:56 ` [PATCH v2 6/7] xen/pci: assign discovered devices to hwdom Mykyta Poturai
2025-10-22 14:44   ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.