From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arianna Avanzini Subject: Re: [PATCH v7 07/10] xen/common: move the memory_mapping DOMCTL hypercall to common code Date: Sat, 10 May 2014 03:20:05 +0200 Message-ID: <536D7EC5.1090807@gmail.com> References: <1399305254-3695-1-git-send-email-avanzini.arianna@gmail.com> <1399305254-3695-8-git-send-email-avanzini.arianna@gmail.com> <536913C0.3090206@linaro.org> Reply-To: Arianna Avanzini Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <536913C0.3090206@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 , xen-devel@lists.xen.org Cc: julien.grall@citrix.com, paolo.valente@unimore.it, keir@xen.org, stefano.stabellini@eu.citrix.com, tim@xen.org, dario.faggioli@citrix.com, Ian.Jackson@eu.citrix.com, Ian.Campbell@eu.citrix.com, etrudeau@broadcom.com, JBeulich@suse.com, andrew.cooper3@citrix.com, viktor.kleinik@globallogic.com List-Id: xen-devel@lists.xenproject.org On 05/06/2014 06:54 PM, Julien Grall wrote: > Hi Arianna, > > On 05/05/2014 04:54 PM, Arianna Avanzini wrote: >> + ret = iomem_permit_access(d, mfn, mfn_end); >> + if ( !ret ) >> + { >> + ret = map_mmio_regions(d, gfn, nr_mfns, _mfn(mfn)); > > The code of map_mmio_regions differs between x86 on ARM. > > On the former architecture, if Xen fails to map a page, it will unmap > all the previous page. It's not the case on ARM. > The map_mmio_regions() implementation for x86 (factored out from the x86-specific code in patch 0006) includes also unmapping the pages in the case of an error (even if I just realized that I made a mistake there by still using the end gfn instead of the number of gfns). The ARM implementation is still the original one, calling apply_p2m_changes(). > Regards, > -- /* * Arianna Avanzini * avanzini.arianna@gmail.com * 73628@studenti.unimore.it */