From: Ian Campbell Subject: Re: [PATCH v2 3/6] xen/arm: implement page reference and grant table functions needed by grant_table.c Date: Tue, 24 Jul 2012 11:41:27 +0100 Message-ID: <1343126487.18971.5.camel@zakaz.uk.xensource.com> References: <1342796758-4958-1-git-send-email-stefano.stabellini@eu.citrix.com> <1342796758-4958-3-git-send-email-stefano.stabellini@eu.citrix.com> <1343059389.5797.70.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: 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" , "Tim.Deegan@xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, 2012-07-24 at 11:25 +0100, Stefano Stabellini wrote: > On Mon, 23 Jul 2012, Ian Campbell wrote: > > On Fri, 2012-07-20 at 16:05 +0100, Stefano Stabellini wrote: > > > The implementation is strongly "inspired" by their x86 counterparts, > > > except that we assume paging_mode_external and paging_mode_translate. > > > > > > TODO: read_only mappings and gnttab_mark_dirty. > > > > Can we add ASSERT(0) or BUG() or something on those paths, so it becomes > > obvious when we start hitting them. > > > > ... > > > > Having read the patch I now see that some of them return errors, but > > others don't and I think they should do something noisy... > > The only path that is unimplemented is in create_grant_host_mapping, it is > marked with "XXX", and prints an error message and returns an error. What about gnttab_mark_dirty? > > > > > diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c > > > index 1832e7f..01a6781 100644 > > > --- a/xen/arch/arm/mm.c > > > +++ b/xen/arch/arm/mm.c > > > + rc = -ENOMEM; > > > + page = alloc_domheap_page(d, 0); > > > + if ( page == NULL ) { > > > + printk("p2m_populate_ram: failed to allocate page\n"); > > > > Should be a gdprintk or something, since a guest can indirectly trigger > > this path. > > yes, good idea.