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

[PATCH v7] xen/arm: pci: introduce PCI_PASSTHROUGH Kconfig option


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Tue, 10 Jun 2025 13:46:22 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=2bEb9fNvb2msY5p20GZTzmeXGe1QTu1AvV8qLq/dRag=; b=Uh3MTHMZOrcx9YBwAlmv1migvVkr6KGQqDO8S/YyyCgM0mFkB7z17NpQhVYu2YSeWiE2eJK015NpbIfu88xoQtIgL0AJaX/E5fJgcUUte3o3FnNwkl2Pn8nwMFHvD5Ktq4TVa6QbnX+5XF3PyQhX9AD+ZQViSUt/bGWQIhur/b39kkSne/GAZiVIM5Y9SFQXdJ346MxJS43UiHbiETgXwC8pvzHiTFzT8XE9OXM0rMoqRkiLfg7D1+ljpvBrrJm3YW1eImpQ0pzjf5/PQrqXGJgK/gj4BI4TFTi2nJ1F9eqqLPUU0R/QUcpOsFe/AH9Z3FOgBhL7SKTW5RbAq1aF1w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FXepyki7lPQi795Hsr6y6frYhaDCD5C9UNfkovwIRR8rMBihKqLckAlMUf0Ej5fkd/f3MNgvZt5VU/CZSN+F6kgTbfWCrix4cVJvbylbkkCaG6Bq9yzbTFlsHTp09CADGkKaZmR55MNhgerjVKg9tRzW5iDU139t0mWsrCH3GPdR24kd+dJe3EhVZ+VgqrjG7NtVuse95r8Nr5+lBsvcbB47ebdIEOrSNeqBt2jux0XkmkBaYKdgfoRRHwPAVS97edMbSgVZm2IJct/MbVbD7oK/U6KaR0nO1yONoe4LfmSJ6AN/A6W/XCiy1l4HpcNvuwp3TBwEwWrONL5ETue4cg==
  • Cc: Rahul Singh <rahul.singh@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "Stefano Stabellini" <stefano.stabellini@xxxxxxx>, Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Delivery-date: Tue, 10 Jun 2025 17:46:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Rahul Singh <rahul.singh@xxxxxxx>

Setting CONFIG_PCI_PASSTHROUGH=y will enable PCI passthrough on ARM,
even though the feature is not yet complete in the current upstream
codebase. The purpose of this is to make it easier to enable the
necessary configs (HAS_PCI, HAS_VPCI) for testing and development of PCI
passthrough on ARM.

Since PCI passthrough on ARM is still work in progress at this time,
make it depend on EXPERT.

Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
---
This requires ("xen/arm: fix build with HAS_PCI") [4] to be merged first

The alpine-3.18-gcc-arm64-randconfig CI job should pick up the new
config option, but if we wanted it to be built more consistently in CI
we could add CONFIG_PCI_PASSTHROUGH=y to one of the arm jobs in
automation/gitlab-ci/build.yaml, e.g. alpine-3.18-gcc-debug-arm64.

v6->v7:
* rebase
* send patch separately from series [3]
* add HAS_VPCI_GUEST_SUPPORT since it's upstream now
* drop Julien's A-b due to changes and was given several releases ago

v5->v6:
* no change

v4->v5:
* no change

v3->v4:
* no change

v2->v3:
* add Julien's A-b

v1->v2:
* drop "ARM" naming since it is already in an ARM category
* depend on EXPERT instead of UNSUPPORTED

Changes from downstream to v1:
* depends on ARM_64 (Stefano)
* Don't select HAS_VPCI_GUEST_SUPPORT since this config option is not currently
  used in the upstream codebase. This will want to be re-added here once the
  vpci series [2] is merged.
* Don't select ARM_SMMU_V3 since this option can already be selected
  independently. While PCI passthrough on ARM depends on an SMMU, it does not
  depend on a particular version or variant of an SMMU.
* Don't select HAS_ITS since this option can already be selected independently.
  HAS_ITS may want to be added here once the MSI series [1] is merged.
* Don't select LATE_HWDOM since this option is unrelated to PCI passthrough.

[1] 
https://gitlab.com/xen-project/people/bmarquis/xen-arm-poc/-/commits/poc/pci-passthrough
[2] https://lists.xenproject.org/archives/html/xen-devel/2023-10/msg00660.html
[3] 
https://lore.kernel.org/xen-devel/20231113222118.825758-1-stewart.hildebrand@xxxxxxx/T/#t
[4] 
https://lore.kernel.org/xen-devel/20250610142300.197599-1-stewart.hildebrand@xxxxxxx/T/#t

(cherry picked from commit 9a08f1f7ce28ec619640ba9ce11018bf443e9a0e from the
 downstream branch [1])
---
 xen/arch/arm/Kconfig | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 3f25da3ca5fd..778feff16a55 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -258,6 +258,16 @@ config PARTIAL_EMULATION
 
 source "arch/arm/firmware/Kconfig"
 
+config PCI_PASSTHROUGH
+       bool "PCI passthrough" if EXPERT
+       depends on ARM_64
+       select HAS_PCI
+       select HAS_VPCI
+       select HAS_VPCI_GUEST_SUPPORT
+       default n
+       help
+         This option enables PCI device passthrough
+
 endmenu
 
 menu "ARM errata workaround via the alternative framework"

base-commit: 86a12671c5d33063b6f958bdcca7c9d14cd5aac8
-- 
2.49.0




 


Rackspace

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