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

[PATCH v2 3/3] [FUTURE] xen/arm: enable vPCI for domUs


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Thu, 6 Jul 2023 21:47:50 -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
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=jPCXqi/U65BB6VinNnJwgiyIk9hy9wUXqeK8zlTJAwY=; b=ax7iQYtkA+iEPNvKlrx+8RTlGPxMM4YF2RM8uz0FK238SmtAM1UorcJZVqBamTc4w26mP5Mg/vbl4mC4Whp+X+sH2f61vbF3xFrp+nVnLb5IO6+m1dftRVZRLssroWZaGkyEQQpQcDhs5Di7TWB2mmVixDP7eccxMFn2IkMQVnuFZobi+PS8cPBNNe1zpl339sDgC1cSGfWUN472WTFAnE//WysBESzCHmNC19D6IWvQakfzplJS6zNJ9X5K3FnqBXew3b35ztRkATQgvhaUQEfejkdzzPgG4ca9U5WGMbYNVVU+NpZ2i1xNzO7lWHSqXnVltghu2nSCnuLVE0qVFg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B0o+3lXWQeqZudrKIF62XdbSLShHKLVTmY2T+HZ5DItGyIPq6tniV5ISp1ThQrde3Bwkpfbbj/XhXUd2O6rK3ujP+lEAm0yV6gPN3wh2LtokMUMOwtvq7I6Un1R4F9SWqQbJg9LW4Wc/3nhOOtSE5Sw4lp7PgLQ7xkifa5x80DDTnslp8VXZX3/qoySsBoE+ktVRP/TNCgf0NDMoFE5iCSZWgRcHhJOfZVhXYPb9okuwgB/n54DkYOuV9dCyp+xUvp1fqdGp7u1Pl+Nk2WcBKf47wp2EqGT5s0UHwl4rtjNk6diX5zsYVvnLCszJrJfcRVKl0foaS6+ycM1/hS1gFg==
  • Cc: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "Oleksandr Tyshchenko" <oleksandr_tyshchenko@xxxxxxxx>, Artem Mygaiev <artem_mygaiev@xxxxxxxx>
  • Delivery-date: Fri, 07 Jul 2023 01:49:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Remove is_hardware_domain check in has_vpci, and select HAS_VPCI_GUEST_SUPPORT
in Kconfig.

[1] https://lists.xenproject.org/archives/html/xen-devel/2023-06/msg00863.html

Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
---
As the tag implies, this patch is not intended to be merged (yet).

Note that CONFIG_HAS_VPCI_GUEST_SUPPORT is not currently used in the upstream
code base. It will be used by the vPCI series [1]. This patch is intended to be
merged as part of the vPCI series.

v1->v2:
* new patch
---
 xen/arch/arm/Kconfig              | 1 +
 xen/arch/arm/include/asm/domain.h | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index 4e0cc421ad48..75dfa2f5a82d 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -195,6 +195,7 @@ config PCI_PASSTHROUGH
        depends on ARM_64
        select HAS_PCI
        select HAS_VPCI
+       select HAS_VPCI_GUEST_SUPPORT
        default n
        help
          This option enables PCI device passthrough
diff --git a/xen/arch/arm/include/asm/domain.h 
b/xen/arch/arm/include/asm/domain.h
index 1a13965a26b8..6e016b00bae1 100644
--- a/xen/arch/arm/include/asm/domain.h
+++ b/xen/arch/arm/include/asm/domain.h
@@ -298,7 +298,7 @@ static inline void arch_vcpu_block(struct vcpu *v) {}
 
 #define arch_vm_assist_valid_mask(d) (1UL << VMASST_TYPE_runstate_update_flag)
 
-#define has_vpci(d) ({ IS_ENABLED(CONFIG_HAS_VPCI) && is_hardware_domain(d); })
+#define has_vpci(d)    ({ (void)(d); IS_ENABLED(CONFIG_HAS_VPCI); })
 
 struct arch_vcpu_io {
     struct instr_details dabt_instr; /* when the instruction is decoded */
-- 
2.41.0




 


Rackspace

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