diff --git a/xen/arch/arm/dom0less-build.c b/xen/arch/arm/dom0less-build.c
index 1e1c8d83ae..99447bfb0c 100644
--- a/xen/arch/arm/dom0less-build.c
+++ b/xen/arch/arm/dom0less-build.c
@@ -682,6 +682,49 @@ static int __init prepare_dtb_domU(struct domain *d, struct kernel_info *kinfo)
 
     if ( kinfo->dom0less_feature & DOM0LESS_ENHANCED_NO_XS )
     {
+        if ( is_domain_direct_mapped(d) )
+        {
+            struct meminfo *avail_magic_regions = xzalloc(struct meminfo);
+            struct meminfo *rsrv_mem = &bootinfo.reserved_mem;
+            struct mem_map_domain *mem_map = &d->arch.mem_map;
+            uint64_t magic_region_start = INVALID_PADDR;
+            uint64_t magic_region_size = GUEST_MAGIC_SIZE;
+            unsigned int i;
+
+            if ( !avail_magic_regions )
+                return -ENOMEM;
+
+            ret = find_unused_memory(d, kinfo, avail_magic_regions);
+            if ( ret )
+            {
+                printk(XENLOG_WARNING
+                       "%pd: failed to find a region for domain magic pages\n",
+                      d);
+                goto err;
+            }
+
+            magic_region_start = avail_magic_regions->bank[0].start;
+
+            /*
+             * Register the magic region as reserved mem to make sure this
+             * region will not be counted when allocating extended regions.
+             */
+            rsrv_mem->bank[rsrv_mem->nr_banks].start = magic_region_start;
+            rsrv_mem->bank[rsrv_mem->nr_banks].size = magic_region_size;
+            rsrv_mem->bank[rsrv_mem->nr_banks].type = MEMBANK_DEFAULT;
+            rsrv_mem->nr_banks++;
+
+            /* Update the domain memory map. */
+            for ( i = 0; i < mem_map->nr_mem_regions; i++ )
+            {
+                if ( mem_map->regions[i].type == GUEST_MEM_REGION_MAGIC )
+                {
+                    mem_map->regions[i].start = magic_region_start;
+                    mem_map->regions[i].size = magic_region_size;
+                }
+            }
+        }
+
         ret = make_hypervisor_node(d, kinfo, addrcells, sizecells);
         if ( ret )
             goto err;
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 085d88671e..b36b98ee7d 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1110,6 +1110,24 @@ static int __init find_domU_holes(const struct kernel_info *kinfo,
     return res;
 }
 
+int __init find_unused_memory(struct domain *d, const struct kernel_info *kinfo,
+                              struct meminfo *mem_region)
+{
+    int res;
+
+    if ( is_domain_direct_mapped(d) )
+    {
+        if ( !is_iommu_enabled(d) )
+            res = find_unallocated_memory(kinfo, mem_region);
+        else
+            res = find_memory_holes(kinfo, mem_region);
+    }
+    else
+        res = find_domU_holes(kinfo, mem_region);
+
+    return res;
+}
+
 int __init make_hypervisor_node(struct domain *d,
                                 const struct kernel_info *kinfo,
                                 int addrcells, int sizecells)
@@ -1161,17 +1179,7 @@ int __init make_hypervisor_node(struct domain *d,
         if ( !ext_regions )
             return -ENOMEM;
 
-        if ( is_domain_direct_mapped(d) )
-        {
-            if ( !is_iommu_enabled(d) )
-                res = find_unallocated_memory(kinfo, ext_regions);
-            else
-                res = find_memory_holes(kinfo, ext_regions);
-        }
-        else
-        {
-            res = find_domU_holes(kinfo, ext_regions);
-        }
+        res = find_unused_memory(d, kinfo, ext_regions);
 
         if ( res )
             printk(XENLOG_WARNING "%pd: failed to allocate extended regions\n",
diff --git a/xen/arch/arm/include/asm/domain_build.h b/xen/arch/arm/include/asm/domain_build.h
index da9e6025f3..4458012644 100644
--- a/xen/arch/arm/include/asm/domain_build.h
+++ b/xen/arch/arm/include/asm/domain_build.h
@@ -10,6 +10,8 @@ bool allocate_bank_memory(struct domain *d, struct kernel_info *kinfo,
                           gfn_t sgfn, paddr_t tot_size);
 int construct_domain(struct domain *d, struct kernel_info *kinfo);
 int domain_fdt_begin_node(void *fdt, const char *name, uint64_t unit);
+int find_unused_memory(struct domain *d, const struct kernel_info *kinfo,
+                       struct meminfo *mem_region);
 int make_chosen_node(const struct kernel_info *kinfo);
 int make_cpus_node(const struct domain *d, void *fdt);
 int make_hypervisor_node(struct domain *d, const struct kernel_info *kinfo,
