From: Ian Campbell Subject: Re: [PATCH v6 08/10] xen/arm: Add relinquish_p2m_mapping to remove reference on every mapped page Date: Wed, 18 Dec 2013 16:50:54 +0000 Message-ID: <1387385454.28680.70.camel@kazak.uk.xensource.com> References: <1387297678-17762-1-git-send-email-julien.grall@linaro.org> <1387297678-17762-9-git-send-email-julien.grall@linaro.org> <52B1D1E4.6060701@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VtKL8-0002J9-JB for xen-devel@lists.xenproject.org; Wed, 18 Dec 2013 16:51:18 +0000 In-Reply-To: <52B1D1E4.6060701@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, ian.jackson@eu.citrix.com, patches@linaro.org List-Id: xen-devel@lists.xenproject.org On Wed, 2013-12-18 at 16:48 +0000, Julien Grall wrote: > On 12/17/2013 04:27 PM, Julien Grall wrote: > > @@ -343,12 +353,35 @@ static int create_p2m_entries(struct domain *d, > > > > memset(&pte, 0x00, sizeof(pte)); > > write_pte(&third[third_table_offset(addr)], pte); > > + count++; > > } > > break; > > } > > > > if ( flush ) > > flush_tlb_all_local(); > > + > > + /* Preempt every 2MiB (mapped) or 32 MiB (unmapped) - arbitrary */ > > + if ( op == RELINQUISH && count >= 0x2000 ) > > + { > > + if ( hypercall_preempt_check() ) > > + { > > + p2m->next_gfn_to_relinquish = maddr >> PAGE_SHIFT; > > Oops, I made a mistake in this patch. > > It should be addr instead of maddr. > > As it's already in staging, I will send a fix right now. Yes please!