From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC PATCH 2/3] arch, arm32: add the XEN_DOMCTL_memory_mapping hypercall Date: Thu, 06 Mar 2014 11:41:15 +0800 Message-ID: <5317EE5B.6070602@linaro.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53172DBF.7010900@gmail.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: Arianna Avanzini , 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 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. Regards, -- Julien Grall