From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v3] x86/arm/mm: use gfn instead of pfn in p2m_get_mem_access/p2m_set_mem_access Date: Fri, 26 Jun 2015 17:54:26 +0200 Message-ID: <558D75B2.4090405@citrix.com> References: <1435331830-7704-1-git-send-email-vkuznets@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1435331830-7704-1-git-send-email-vkuznets@redhat.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: Vitaly Kuznetsov , xen-devel@lists.xen.org Cc: Keir Fraser , Ian Campbell , Razvan Cojocaru , Andrew Cooper , Tim Deegan , Stefano Stabellini , Jan Beulich , Tamas K Lengyel List-Id: xen-devel@lists.xenproject.org Hi, On 26/06/2015 17:17, Vitaly Kuznetsov wrote: > 'pfn' and 'start_pfn' are ambiguous, both these functions expect GFNs as input. > > On x86 the interface of p2m_set_mem_access() in p2m.c doesn't match the > declaration in p2m-common.h as 'pfn' is being used instead of 'start_pfn'. > > On ARM both p2m_set_mem_access and p2m_get_mem_access interfaces don't match > declarations from p2m-common.h: p2m_set_mem_access uses 'pfn' instead of > 'start_pfn' and p2m_get_mem_access uses 'gpfn' instead of 'pfn'. > > There is also an issue in p2m_get_mem_access on x86: 'gfn' parameter passed to > gfn_lock/gfn_unlock is not defined. This code compiles only because of a > coincidence: gfn_lock/gfn_unlock are currently macros which don't use their > second argument. > > Signed-off-by: Vitaly Kuznetsov > --- > Changes since v2: > - Instead of adding start_ prefix on ARM remove it on x86 [Jan Beulich, > Ian Campbell, Razvan Cojocaru] > > Changes since v1: > - This patch is a successor of '[PATCH] x86/mm: use existing 'pfn' in > p2m_get_mem_access', instead of fixing gfn_lock/gfn_unlock arguments we do > s/pfn/gfn/g for both p2m_get_mem_access/p2m_set_mem_access [Andrew Cooper, > Jan Beulich] > > P.S. > - The patch was compile-tested on x86 only. compiled-tested on ARM is not difficult, you just need to install a ARM cross-compiler and build it [1]. Most of distributions have a package for it. I have build-tested and the patch looks good for to me. For the ARM part: Reviewed-by: Julien Grall Regards, [1] http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions#Cross_Compiling -- Julien Grall