From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v5 2/8] arch, arm: add consistency check to REMOVE p2m changes Date: Tue, 22 Apr 2014 20:27:46 +0100 Message-ID: <5356C2B2.1040009@linaro.org> References: <1396827120-30617-1-git-send-email-avanzini.arianna@gmail.com> <1396827120-30617-3-git-send-email-avanzini.arianna@gmail.com> <53428695.6060204@linaro.org> <1397050797.6275.57.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1397050797.6275.57.camel@kazak.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: Ian Campbell Cc: paolo.valente@unimore.it, keir@xen.org, stefano.stabellini@eu.citrix.com, tim@xen.org, dario.faggioli@citrix.com, Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org, julien.grall@citrix.com, etrudeau@broadcom.com, JBeulich@suse.com, Arianna Avanzini , viktor.kleinik@globallogic.com List-Id: xen-devel@lists.xenproject.org On 09/04/14 14:39, Ian Campbell wrote: > On Mon, 2014-04-07 at 12:05 +0100, Julien Grall wrote: >> count is only used for RELINQUISH mapping, you don't need to update here. > > Not related to this patch, but the current code is: > > if ( !pte.p2m.valid ) > { > count++; > break; > } > > count += 0x10; > > memset(&pte, 0x00, sizeof(pte)); > write_pte(&third[third_table_offset(addr)], pte); > count++; > } > > It seems like that final count++ is unnecessary/wrong. Right. I will send a patch to fix it. Regards, -- Julien Grall