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

[PATCH v3 4/5] xen/arm: enable vPCI for dom0


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Mon, 9 Oct 2023 15:57:43 -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=I6WEOoMs+pzdjzi1jL0lpLVB/53RytXMX+c0QXchhzI=; b=AspjglAjvn3niV+v2naQZ8tQ3Y29rJdAa6Dx43duQoygJJ224fk6se8Vhh8dxdwH+69L2qKRAp1tDU7KLH9TLFrnkbpXAAeDHu1nwcZOcdJAPH5lsCDrwBNMQf5hwpG61fPCYrMcbSpiA2MLntkA2jH+h3ECP98B/1wWGtyM6T24zC66HYBePB/+XeSTZ04NAKmcdT3lq4mYxZzBwlwITW+NGHvg4/r4cUgmpA2JUFFDacsnPR+LvFx3PlJm+2SriE/XVqyHQQdvsgaOfnRkWpqsTMVLHOxo/Qbt6jkkNXHF/baOOxJGo4nBKrg/H9efOb1DpTyruOMumQ+uyrSJ+g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cQuDWzum0CuhmzM7egEHV7OjwogQRjxtzGaO5JaKbbcfkzZkKCIR4YsM9odwy5zmgiHf7iOg48+fvlbVxL5pfBjTMUj2C/0IJhTugrsQvKv7Yt1IJ9taDKr3skc5fD/31T/MEbGJC9qTe0id6xZlU2HsaWgO4sKxvBlF4LXvZY7ls4+BgT9o/S4mPWXxbo7w7yEzJos0Kpo5G/Ai+l0QHUGG/lpiDAba3JF+tYRxJuq4cKIUoH82xVEqElrwneteYRE1zsmW2sk6mxnfP+YDEGam6fqFZTJpn9XWsw38UTo3s7c0mWWDiHWDc/cIkZ51g4Msh0sri88T2AFhAjjw1g==
  • Cc: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 09 Oct 2023 19:59:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Set the pci flags in xen_arch_domainconfig to enable vPCI for dom0.

Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
---
Julien had a suggestion to make this conditional on pci_passthrough_enabled [1].
However, in v5 of the PCI ARM SMMU series [2], we propose removing the
pci_passthrough_enabled flag. If pci_passthrough_enabled is gone, the conditions
under which vPCI should be enabled for dom0 aren't entirely clear to me (other
than CONFIG_HAS_VPCI=y).

v2->v3:
* new patch

[1] https://lists.xenproject.org/archives/html/xen-devel/2023-10/msg00475.html
[2] https://lists.xenproject.org/archives/html/xen-devel/2023-10/msg00210.html
---
 xen/arch/arm/domain_build.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 24c9019cc43c..c1174535f430 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -3912,6 +3912,9 @@ void __init create_dom0(void)
             panic("SVE vector length error\n");
     }
 
+    if ( IS_ENABLED(CONFIG_HAS_VPCI) )
+        dom0_cfg.arch.pci_flags = XEN_DOMCTL_CONFIG_PCI_VPCI;
+
     dom0 = domain_create(0, &dom0_cfg, CDF_privileged | CDF_directmap);
     if ( IS_ERR(dom0) )
         panic("Error creating domain 0 (rc = %ld)\n", PTR_ERR(dom0));
-- 
2.42.0




 


Rackspace

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