From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH 0/8] Use correctly the Xen memory terminologies in Linux Date: Tue, 28 Jul 2015 14:06:21 -0700 Message-ID: <55B7EECD.8050605@zytor.com> References: <1438095769-2560-1-git-send-email-julien.grall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: <1438095769-2560-1-git-send-email-julien.grall@citrix.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" To: Julien Grall , xen-devel@lists.xenproject.org Cc: linux-fbdev@vger.kernel.org, x86@kernel.org, netdev@vger.kernel.org, Jiri Slaby , Thomas Gleixner , Russell King , linux-scsi@vger.kernel.org, Tomi Valkeinen , stefano.stabellini@eu.citrix.com, Ingo Molnar , linux-input@vger.kernel.org, Jean-Christophe Plagniol-Villard , ian.campbell@citrix.com, Konrad Rzeszutek Wilk , "James E.J. Bottomley" , Boris Ostrovsky , linux-arm-kernel@lists.infradead.org, Juergen Gross , Wei Liu , Greg Kroah-Hartman , Dmitry Torokhov , linux-kernel@vger.kernel.org, David Vrabel , linux-api@vger.kernel.org, linuxppc-dev@lists.ozlabs.or List-Id: linux-api@vger.kernel.org T24gMDcvMjgvMjAxNSAwODowMiBBTSwgSnVsaWVuIEdyYWxsIHdyb3RlOgo+IEhpIGFsbCwKPiAK PiBUaGlzIHBhdGNoIHNlcmllcyBhaW1zIHRvIHVzZSB0aGUgbWVtb3J5IHRlcm1pbm9sb2dpZXMg ZGVzY3JpYmVkIGluCj4gaW5jbHVkZS9saW51eC9tbS5oIFsxXSBmb3IgTGludXggeGVuIGNvZGUu Cj4gCj4gTGludXggaXMgdXNpbmcgbWlzdGFrZW5seSBNRk4gd2hlbiBHRk4gaXMgbWVhbnQsIEkg c3VzcGVjdCB0aGlzIGlz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PiBhcyBw Zm5fdG9fZ2ZuKHBhZ2VfdG9fcGZuKC4uLikuCj4gCj4gTm90ZSB0aGUgb25lIHhlbi1ibGtmcm9u dCB3aWxsIGJlIGRyb3BwZWQgYnkgNjRLIHNlcmllcyBbMl0sIEkgY2FuIGluY2x1ZGUgaXQKPiBp ZiBuZWNlc3NhcnkuCj4gCgpDYW4gd2UgYWN0dWFsbHkgZ2V0IHNvbWUgZG9jdW1lbnRhdGlvbiBm b3IgWGVuIGJlZm9yZSBzdGFydGluZyB0byBjaGFuZ2UKbmFtZXMgYXJvdW5kPwoKCS1ocGEKCgpf X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpMaW51eHBwYy1k ZXYgbWFpbGluZyBsaXN0CkxpbnV4cHBjLWRldkBsaXN0cy5vemxhYnMub3JnCmh0dHBzOi8vbGlz dHMub3psYWJzLm9yZy9saXN0aW5mby9saW51eHBwYy1kZXY= From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Date: Tue, 28 Jul 2015 21:06:21 +0000 Subject: Re: [PATCH 0/8] Use correctly the Xen memory terminologies in Linux Message-Id: <55B7EECD.8050605@zytor.com> List-Id: References: <1438095769-2560-1-git-send-email-julien.grall@citrix.com> In-Reply-To: <1438095769-2560-1-git-send-email-julien.grall@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Julien Grall , xen-devel@lists.xenproject.org Cc: linux-fbdev@vger.kernel.org, x86@kernel.org, netdev@vger.kernel.org, Jiri Slaby , Thomas Gleixner , Russell King , linux-scsi@vger.kernel.org, Tomi Valkeinen , stefano.stabellini@eu.citrix.com, Ingo Molnar , linux-input@vger.kernel.org, Jean-Christophe Plagniol-Villard , ian.campbell@citrix.com, Konrad Rzeszutek Wilk , "James E.J. Bottomley" , Boris Ostrovsky , linux-arm-kernel@lists.infradead.org, Juergen Gross , Wei Liu , Greg Kroah-Hartman , Dmitry Torokhov , linux-kernel@vger.kernel.org, David Vrabel , linux-api@vger.kernel.org, linuxppc-dev@lists.ozlabs.or On 07/28/2015 08:02 AM, Julien Grall wrote: > Hi all, > > This patch series aims to use the memory terminologies described in > include/linux/mm.h [1] for Linux xen code. > > Linux is using mistakenly MFN when GFN is meant, I suspect this is because the > first support of Xen was for PV. This has brought some misimplementation > of memory helpers on ARM and make the developper confused about the expected > behavior. > > For instance, with pfn_to_mfn, we expect to get a MFN based on the name. > Although, if we look at the implementation on x86, it's returning a GFN. > Most of the callers are also using it this way. > > The first 2 patches of this series is ARM related in order to remove > PV specific helpers which should not be used and fixing the implementation of > pfn_to_mfn. > > The rest of the series is here rename most of the usage in the common code > of MFN to GFN. I also took the opportunity to replace most of the call to > pfn_to_gfn in the common code by page_to_gfn avoid construction such > as pfn_to_gfn(page_to_pfn(...). > > Note the one xen-blkfront will be dropped by 64K series [2], I can include it > if necessary. > Can we actually get some documentation for Xen before starting to change names around? -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.zytor.com (terminus.zytor.com [IPv6:2001:1868:205::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 8D08B1A023A for ; Wed, 29 Jul 2015 07:09:36 +1000 (AEST) Message-ID: <55B7EECD.8050605@zytor.com> Date: Tue, 28 Jul 2015 14:06:21 -0700 From: "H. Peter Anvin" MIME-Version: 1.0 To: Julien Grall , xen-devel@lists.xenproject.org CC: ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, linux-kernel@vger.kernel.org, Boris Ostrovsky , David Vrabel , Dmitry Torokhov , Greg Kroah-Hartman , Ingo Molnar , "James E.J. Bottomley" , Jean-Christophe Plagniol-Villard , Jiri Slaby , Juergen Gross , Konrad Rzeszutek Wilk , linux-api@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-input@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-scsi@vger.kernel.org, netdev@vger.kernel.org, =?UTF-8?B?Um9nZXIgUGF1IE1vbm7DqQ==?= , Russell King , Thomas Gleixner , Tomi Valkeinen , Wei Liu , x86@kernel.org Subject: Re: [PATCH 0/8] Use correctly the Xen memory terminologies in Linux References: <1438095769-2560-1-git-send-email-julien.grall@citrix.com> In-Reply-To: <1438095769-2560-1-git-send-email-julien.grall@citrix.com> Content-Type: text/plain; charset=utf-8 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 07/28/2015 08:02 AM, Julien Grall wrote: > Hi all, > > This patch series aims to use the memory terminologies described in > include/linux/mm.h [1] for Linux xen code. > > Linux is using mistakenly MFN when GFN is meant, I suspect this is because the > first support of Xen was for PV. This has brought some misimplementation > of memory helpers on ARM and make the developper confused about the expected > behavior. > > For instance, with pfn_to_mfn, we expect to get a MFN based on the name. > Although, if we look at the implementation on x86, it's returning a GFN. > Most of the callers are also using it this way. > > The first 2 patches of this series is ARM related in order to remove > PV specific helpers which should not be used and fixing the implementation of > pfn_to_mfn. > > The rest of the series is here rename most of the usage in the common code > of MFN to GFN. I also took the opportunity to replace most of the call to > pfn_to_gfn in the common code by page_to_gfn avoid construction such > as pfn_to_gfn(page_to_pfn(...). > > Note the one xen-blkfront will be dropped by 64K series [2], I can include it > if necessary. > Can we actually get some documentation for Xen before starting to change names around? -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 From: hpa@zytor.com (H. Peter Anvin) Date: Tue, 28 Jul 2015 14:06:21 -0700 Subject: [PATCH 0/8] Use correctly the Xen memory terminologies in Linux In-Reply-To: <1438095769-2560-1-git-send-email-julien.grall@citrix.com> References: <1438095769-2560-1-git-send-email-julien.grall@citrix.com> Message-ID: <55B7EECD.8050605@zytor.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 07/28/2015 08:02 AM, Julien Grall wrote: > Hi all, > > This patch series aims to use the memory terminologies described in > include/linux/mm.h [1] for Linux xen code. > > Linux is using mistakenly MFN when GFN is meant, I suspect this is because the > first support of Xen was for PV. This has brought some misimplementation > of memory helpers on ARM and make the developper confused about the expected > behavior. > > For instance, with pfn_to_mfn, we expect to get a MFN based on the name. > Although, if we look at the implementation on x86, it's returning a GFN. > Most of the callers are also using it this way. > > The first 2 patches of this series is ARM related in order to remove > PV specific helpers which should not be used and fixing the implementation of > pfn_to_mfn. > > The rest of the series is here rename most of the usage in the common code > of MFN to GFN. I also took the opportunity to replace most of the call to > pfn_to_gfn in the common code by page_to_gfn avoid construction such > as pfn_to_gfn(page_to_pfn(...). > > Note the one xen-blkfront will be dropped by 64K series [2], I can include it > if necessary. > Can we actually get some documentation for Xen before starting to change names around? -hpa