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

[PATCH v5 6/7] xen/arm: dom0less use has_dtb local variable


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Wed, 16 Apr 2025 17:29:10 -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=HEhCn/D2ABiwChVcgLzJo/1vunmuVBcfpq/kh2xui/g=; b=sIEBC0olEYqOWabKmUJCkr2WSaVOCjsmdZ4VMJOHQ0SbNqug1Sh6umDtqBHg92o20Ebuo407zXUfyXm570DJW38YHRAOrlidWurfk2KEMrfdKqEgZ0qHdXqTuH6P0IHqVWTLKnHuEC0PNvI0HRHCcFqsywq1yA85JHkdTsVUPQS2WZ67E+o5q/xKGRKCyHjqR9G05HQnlNAVVGK9WrG8EFI5vTTH2NUBcyO24zdbNqKEkQmvTPpUH3LlOO+Yaa60c2fkawtoGthkyZTaGA+KgxRDEc4dX7L1L44dcHnT6v6i9laHwiu+khThB9Ao/+p0q4n58zXAEva2Bf+Dyy74dA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=F91MAoPq6kxDQ3wwQaROs0pZgIKsYVFLAwoy8iKciY4epILCzHaU+1b50d0EXYkje9ttT1kL60ZeQuEcgIhyf9lMWsGMmBOMaYs8od3h86yfBqCSn8lTTsBxBjCbgll0Fhk4DWI4k1JIBDQ5e2twhxGBn91A8dZ0y7jUaoXc6vzHvIqfTgeL1pVIvUCUSv39oCO/6x9AzCCNmK07MiK0pQzLBLl+EX7vTF56v5c4lymh2Lgg6vadkdtHUbcq7sDqfU7/tSea08268APwvRVqMGfNS3btNFo4LnFVTXhFrZaxy18LFR8Gf0S/hEpmlAe0ym+INkb/x2iHGx6tQXFDRA==
  • Cc: Jason Andryuk <jason.andryuk@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 16 Apr 2025 21:29:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Store the result of finding a "multiboot,device-tree" node.  This will
simplity adding hardware domain checks.

Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
v5:
No change

v4:
Add Stefano R-b

v3:
New

Could be squashed into the next patch, but this helps make the next one
cleaner.
---
 xen/arch/arm/dom0less-build.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/dom0less-build.c b/xen/arch/arm/dom0less-build.c
index 188ef40b52..50d2d3e4e4 100644
--- a/xen/arch/arm/dom0less-build.c
+++ b/xen/arch/arm/dom0less-build.c
@@ -1033,6 +1033,7 @@ void __init create_domUs(void)
             .grant_opts = XEN_DOMCTL_GRANT_version(opt_gnttab_max_version),
         };
         unsigned int flags = 0U;
+        bool has_dtb = false;
         uint32_t val;
         int rc;
 
@@ -1067,9 +1068,10 @@ void __init create_domUs(void)
              !strcmp(dom0less_iommu, "enabled") )
             iommu = true;
 
-        if ( iommu_enabled &&
-             (iommu || dt_find_compatible_node(node, NULL,
-                                               "multiboot,device-tree")) )
+        if ( dt_find_compatible_node(node, NULL, "multiboot,device-tree") )
+            has_dtb = true;
+
+        if ( iommu_enabled && (iommu || has_dtb) )
             d_cfg.flags |= XEN_DOMCTL_CDF_iommu;
 
         if ( !dt_property_read_u32(node, "nr_spis", &d_cfg.arch.nr_spis) )
-- 
2.49.0




 


Rackspace

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