arm: allocate top level p2m page for all non-idle domains
authorIan Campbell <ian.campbell@citrix.com>
Tue, 26 Jun 2012 15:23:43 +0000 (16:23 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 26 Jun 2012 15:23:43 +0000 (16:23 +0100)
Not just dom0.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/domain.c
xen/arch/arm/p2m.c

index 570239945f649688ccd4eed89193808661b89a61..4b3879078e86eeb2b9cec7ecb16574f05ea35eb4 100644 (file)
@@ -201,6 +201,9 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags)
         clear_page(d->shared_info);
         share_xen_page_with_guest(
                 virt_to_page(d->shared_info), d, XENSHARE_writable);
+
+        if ( (rc = p2m_alloc_table(d)) != 0 )
+            goto fail;
     }
 
     d->max_vcpus = 8;
index 051a0e89ddf34aa9cb2066cf21e948228a96a368..4f624d8a6716943a1d182d00be2ecda0d9a6f995 100644 (file)
@@ -203,7 +203,7 @@ int p2m_alloc_table(struct domain *d)
     void *p;
 
     /* First level P2M is 2 consecutive pages */
-    page = alloc_domheap_pages(d, 1, 0);
+    page = alloc_domheap_pages(NULL, 1, 0);
     if ( page == NULL )
         return -ENOMEM;