From: Ian Campbell Subject: Re: [PATCH v2 1/5] arm: shared_info page allocation and mapping Date: Fri, 24 Feb 2012 13:04:22 +0000 Message-ID: <1330088662.8557.201.camel@zakaz.uk.xensource.com> References: <1330021293-21554-1-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1330021293-21554-1-git-send-email-stefano.stabellini@eu.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: Stefano Stabellini Cc: "xen-devel@lists.xensource.com" , David Vrabel , "Tim Deegan (3P)" List-Id: xen-devel@lists.xenproject.org On Thu, 2012-02-23 at 18:21 +0000, Stefano Stabellini wrote: > Allocate the shared_info page at domain creation. > > Implement arch_memory_op, only for XENMEM_add_to_physmap with space == > XENMAPSPACE_shared_info, so that the guest can map the shared_info page. > > Signed-off-by: Stefano Stabellini > --- > xen/arch/arm/domain.c | 8 ++++ > xen/arch/arm/mm.c | 98 +++++++++++++++++++++++++++++++++++++++++++-- > xen/arch/arm/p2m.c | 15 ++++++- > xen/include/asm-arm/mm.h | 4 ++ > xen/include/asm-arm/p2m.h | 2 + > 5 files changed, 122 insertions(+), 5 deletions(-) > > diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c > index 0b55934..0ee96b9 100644 > --- a/xen/arch/arm/domain.c > +++ b/xen/arch/arm/domain.c > @@ -235,6 +235,14 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags) > if ( (rc = p2m_init(d)) != 0 ) > goto fail; > > + rc = -ENOMEM; > + if ( (d->shared_info = alloc_xenheap_pages(0, MEMF_bits(32))) == NULL ) > + goto fail; No reason to limit this to 32 bit (I think). Also you can avoid it in the idle domain case. Ian.