From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arianna Avanzini Subject: Re: [RFC PATCH 2/3] arch, arm32: add the XEN_DOMCTL_memory_mapping hypercall Date: Fri, 07 Mar 2014 01:57:46 +0100 Message-ID: <5319198A.3040605@gmail.com> References: <1393721365-22458-1-git-send-email-avanzini.arianna@gmail.com> <1393721365-22458-3-git-send-email-avanzini.arianna@gmail.com> <53130053.9050801@linaro.org> <53172DBF.7010900@gmail.com> <5317EE5B.6070602@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: <5317EE5B.6070602@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: paolo.valente@unimore.it, Ian Campbell , stefano.stabellini@eu.citrix.com, dario.faggioli@citrix.com, Tim Deegan , julien.grall@citrix.com, etrudeau@broadcom.com, viktor.kleinik@globallogic.com List-Id: xen-devel@lists.xenproject.org On 03/06/2014 04:41 AM, Julien Grall wrote: > > > On 05/03/14 21:59, Arianna Avanzini wrote: >> Hello, > > Hello Arianna, > >>> The comment "1:1 iomem mapping (gfn == mfn)" seems wrong here. The >>> implementation you wrote allow gfn != mfn. >>> >> >> Right, thank you. >> Sorry if I bother you with one more question about this hunk; aside from the >> error pointed out by Eric with the usage of pfn instead of paddr_t, is it OK to >> map the address range all at once with map_mmio_regions() as proposed? I noticed >> that the x86-related code seems to map the range one mfn at a time with >> set_mmio_p2m_entry(), and I wonder if this different approach has any benefit I >> didn't think about. > > map_mmio_regions will take p2m lock and do MMU management (e.g TLB flush...). > For the latter the code has been written to only do TLB flush, if needed, once > per call. More the range is large, better it is. > > So, it's better to call the function only once for the whole range. > OK, thank you for the clear explanation. > Regards, > -- /* * Arianna Avanzini * avanzini.arianna@gmail.com * 73628@studenti.unimore.it */