xen/arm: dom0less use has_dtb local variable

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

Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
Jason Andryuk authored and Stefano Stabellini committed 2025-04-18 13:41:29 -07:00
1 parent 375c4837ee
commit 00eee5a0e0
1 file changed
+5 -3
+5 -3
View File
@@ -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) )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.