mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
dom0less: Reinitialise all variables on each loop iteration
Reduce the scope of dom0less_iommu, iommu and cpupool_node. iommu, in
particular, wasn't being cleared, so the wrong flags may make it to
domains that should not have them.
Fixes: 1d2b4f3049fd("xen/arm, doc: Add a DT property to specify...")
Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
1 parent
3743746459
commit
cddc790705
1 file changed
+4
-4
@@ -826,14 +826,14 @@ static int __init construct_domU(struct kernel_info *kinfo,
|
||||
void __init create_domUs(void)
|
||||
{
|
||||
struct dt_device_node *node;
|
||||
const char *dom0less_iommu;
|
||||
bool iommu = false;
|
||||
const struct dt_device_node *cpupool_node,
|
||||
*chosen = dt_find_node_by_path("/chosen");
|
||||
const struct dt_device_node *chosen = dt_find_node_by_path("/chosen");
|
||||
|
||||
BUG_ON(chosen == NULL);
|
||||
dt_for_each_child_node(chosen, node)
|
||||
{
|
||||
const char *dom0less_iommu;
|
||||
bool iommu = false;
|
||||
const struct dt_device_node *cpupool_node;
|
||||
struct kernel_info ki = KERNEL_INFO_INIT;
|
||||
struct xen_domctl_createdomain *d_cfg = &ki.bd.create_cfg;
|
||||
unsigned int *flags = &ki.bd.create_flags;
|
||||
|
||||