From: Ian Campbell Subject: Re: [PATCH] arm: allocate top level p2m page for all non-idle VCPUs Date: Thu, 15 Mar 2012 12:02:34 +0000 Message-ID: <1331812954.26979.86.camel@zakaz.uk.xensource.com> References: <1331812887-22009-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1331812887-22009-1-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "xen-devel@lists.xen.org" Cc: Stefano Stabellini List-Id: xen-devel@lists.xenproject.org BTW this depends on Stefano's "arm: shared_info page allocation and mapping". I'm happy to hold on to it until then but thought I'd send for review now... On Thu, 2012-03-15 at 12:01 +0000, Ian Campbell wrote: > Not just dom0. > > Signed-off-by: Ian Campbell > --- > xen/arch/arm/domain.c | 3 +++ > xen/arch/arm/domain_build.c | 3 --- > xen/arch/arm/p2m.c | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c > index 5702399..4b38790 100644 > --- a/xen/arch/arm/domain.c > +++ b/xen/arch/arm/domain.c > @@ -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; > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c > index 15632f7..6687e50 100644 > --- a/xen/arch/arm/domain_build.c > +++ b/xen/arch/arm/domain_build.c > @@ -93,9 +93,6 @@ int construct_dom0(struct domain *d) > > d->max_pages = ~0U; > > - if ( (rc = p2m_alloc_table(d)) != 0 ) > - return rc; > - > printk("Populate P2M %#llx->%#llx\n", kinfo.ram_start, kinfo.ram_end); > p2m_populate_ram(d, kinfo.ram_start, kinfo.ram_end); > > diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c > index 051a0e8..4f624d8 100644 > --- a/xen/arch/arm/p2m.c > +++ b/xen/arch/arm/p2m.c > @@ -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; >