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

Mykyta Poturai posted 7 patches 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/cover.1761134829.git.mykyta._5Fpoturai@epam.com
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(-)
[PATCH v2 0/7] Implement PCI device enumeration on Arm
Posted by Mykyta Poturai 1 week ago
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