All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mykyta Poturai <Mykyta_Poturai@epam.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Mykyta Poturai" <Mykyta_Poturai@epam.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Julien Grall" <julien@xen.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Stewart Hildebrand" <stewart.hildebrand@amd.com>
Subject: [PATCH v3 0/8] Implement PCI device enumeration on Arm
Date: Tue, 18 Nov 2025 13:36:32 +0000	[thread overview]
Message-ID: <cover.1763462211.git.mykyta_poturai@epam.com> (raw)

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

v2->v3:
* add arm/pci: Mark pci_host_common_probe as init
* reorder patches
* see individual patches

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 (2):
  arm/pci: Mark pci_host_common_probe as init
  arm/pci: enable vpci for hwdom when pci-scan is enabled

Stefano Stabellini (1):
  xen/vpci: 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       |  10 ++
 xen/arch/arm/include/asm/setup.h     |   2 +-
 xen/arch/arm/pci/pci-host-common.c   | 110 ++++++++++++++++++-
 xen/arch/arm/pci/pci.c               | 139 +++++++++++++++++++++++-
 xen/common/device-tree/device-tree.c |   5 +-
 xen/common/rangeset.c                |  62 ++++++++++-
 xen/drivers/passthrough/arm/iommu.c  |  15 +++
 xen/drivers/passthrough/pci.c        |  11 ++
 xen/drivers/vpci/header.c            |  74 ++++++-------
 xen/drivers/vpci/vpci.c              |   4 +-
 xen/include/xen/device_tree.h        |   2 +-
 xen/include/xen/rangeset.h           |  11 ++
 xen/include/xen/vpci.h               |   8 ++
 17 files changed, 565 insertions(+), 58 deletions(-)

-- 
2.51.2


             reply	other threads:[~2025-11-18 13:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-18 13:36 Mykyta Poturai [this message]
2025-11-18 13:36 ` [PATCH v3 1/8] arm/pci: Add pci-scan boot argument Mykyta Poturai
2025-11-18 13:36 ` [PATCH v3 2/8] xen/dt: pass flags to callback in dt_for_each_range() Mykyta Poturai
2025-11-18 13:36 ` [PATCH v3 3/8] xen/vpci: introduce has_vpci_bridge Mykyta Poturai
2025-11-18 13:55   ` Jan Beulich
2025-11-18 13:36 ` [PATCH v3 5/8] arm/pci: Mark pci_host_common_probe as init Mykyta Poturai
2025-11-18 13:36 ` [PATCH v3 4/8] xen/pci: update DT for hwdom when it uses vpci Mykyta Poturai
2025-11-18 13:36 ` [PATCH v3 6/8] xen/pci: initialize BARs Mykyta Poturai
2025-11-18 14:41   ` Jan Beulich
2025-11-18 13:36 ` [PATCH v3 7/8] xen/pci: assign discovered devices to hwdom Mykyta Poturai
2025-11-18 14:44   ` Jan Beulich
2025-11-18 13:36 ` [PATCH v3 8/8] arm/pci: enable vpci for hwdom when pci-scan is enabled Mykyta Poturai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1763462211.git.mykyta_poturai@epam.com \
    --to=mykyta_poturai@epam.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=bertrand.marquis@arm.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=stewart.hildebrand@amd.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.