From: Ian Campbell Subject: Re: [PATCH v3 08/13] xen/arm: implement map_domain_page_global and unmap_domain_page_global Date: Thu, 25 Apr 2013 11:43:35 +0100 Message-ID: <1366886615.20256.475.camel@zakaz.uk.xensource.com> References: <1366830463-12153-8-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: <1366830463-12153-8-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: Julien Grall , "xen-devel@lists.xensource.com" , "Tim (Xen.org)" , Jan Beulich List-Id: xen-devel@lists.xenproject.org On Wed, 2013-04-24 at 20:07 +0100, Stefano Stabellini wrote: > The implementation uses vmap and vunmap. It seems a little bit too good to be true ;-) I've CCd Jan as vmap author to make sure we've not missed something! > Signed-off-by: Stefano Stabellini Acked-by: Ian Campbell Although since Jan wants x86 to eventually use it this seems like it could be implemented in xen/domain_page.h with a CONFIG_DOMAIN_PAGE_VMAP. Up to Jan... > > Changes in v3: > - use vmap/vunmap to implement un/map_domain_page_global. > --- > xen/arch/arm/mm.c | 11 +++++++++++ > 1 files changed, 11 insertions(+), 0 deletions(-) > > diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c > index 240904e..6f561f6 100644 > --- a/xen/arch/arm/mm.c > +++ b/xen/arch/arm/mm.c > @@ -36,6 +36,7 @@ > #include > #include > #include > +#include > #include > > struct domain *dom_xen, *dom_io, *dom_cow; > @@ -131,6 +132,16 @@ void clear_fixmap(unsigned map) > flush_xen_data_tlb_range_va(FIXMAP_ADDR(map), PAGE_SIZE); > } > > +void *map_domain_page_global(unsigned long mfn) > +{ > + return vmap(&mfn, 1); > +} > + > +void unmap_domain_page_global(const void *va) > +{ > + vunmap(va); > +} > + > /* Map a page of domheap memory */ > void *map_domain_page(unsigned long mfn) > {