From: Ian Campbell Subject: Re: [PATCH v2 1/5] arm: shared_info page allocation and mapping Date: Fri, 24 Feb 2012 12:46:59 +0000 Message-ID: <1330087619.8557.198.camel@zakaz.uk.xensource.com> References: <1330021293-21554-1-git-send-email-stefano.stabellini@eu.citrix.com> <1330078948.8557.158.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1330078948.8557.158.camel@zakaz.uk.xensource.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 > > @@ -172,6 +177,14 @@ int map_mmio_regions(struct domain *d, > > return create_p2m_entries(d, 0, start_gaddr, end_gaddr, maddr); > > } > > > > +int guest_physmap_add_page(struct domain *d, unsigned long gpfn, > > + unsigned long mfn) Should these be either paddr_t or xen_pfn_t? > > +{ > > + return create_p2m_entries(d, 0, gpfn << PAGE_SHIFT, > > + (gpfn + 1) << PAGE_SHIFT, > > + mfn << PAGE_SHIFT); As it stands you need to cast to paddr_t first so the shift won't overflow. Ian.