Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753185AbbHEQwc (ORCPT ); Wed, 5 Aug 2015 12:52:32 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:34715 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751259AbbHEQw3 (ORCPT ); Wed, 5 Aug 2015 12:52:29 -0400 Date: Wed, 5 Aug 2015 09:52:25 -0700 From: Dmitry Torokhov To: Stefano Stabellini Cc: Julien Grall , xen-devel@lists.xenproject.org, ian.campbell@citrix.com, linux-kernel@vger.kernel.org, Russell King , Konrad Rzeszutek Wilk , Boris Ostrovsky , David Vrabel , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Roger Pau =?iso-8859-1?Q?Monn=E9?= , Wei Liu , Juergen Gross , "James E.J. Bottomley" , Greg Kroah-Hartman , Jiri Slaby , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , linux-input@vger.kernel.org, netdev@vger.kernel.org, linux-scsi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-fbdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies Message-ID: <20150805165225.GC3603@dtor-ws> References: <1438711972-18752-1-git-send-email-julien.grall@citrix.com> <1438711972-18752-5-git-send-email-julien.grall@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2916 Lines: 68 On Wed, Aug 05, 2015 at 11:08:55AM +0100, Stefano Stabellini wrote: > On Tue, 4 Aug 2015, Julien Grall wrote: > > Based on include/xen/mm.h [1], Linux is mistakenly using MFN when GFN > > is meant, I suspect this is because the first support for Xen was for > > PV. This resulted in some misimplementation of helpers on ARM and > > confused developers about the expected behavior. > > > > For instance, with pfn_to_mfn, we expect to get an MFN based on the name. > > Although, if we look at the implementation on x86, it's returning a GFN. > > > > For clarity and avoid new confusion, replace any reference to mfn with > > gfn in any helpers used by PV drivers. The x86 code will still keep some > > reference of pfn_to_mfn but exclusively for PV (a BUG_ON has been added > > to ensure this). No changes as been made in the hypercall field, even > > though they may be invalid, in order to keep the same as the defintion > > in xen repo. > > > > Take also the opportunity to simplify simple construction such > > as pfn_to_mfn(page_to_pfn(page)) into page_to_gfn. More complex clean up > > will come in follow-up patches. > > > > [1] http://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=e758ed14f390342513405dd766e874934573e6cb > > > > Signed-off-by: Julien Grall > > Cc: Stefano Stabellini > > Cc: Russell King > > Cc: Konrad Rzeszutek Wilk > > Cc: Boris Ostrovsky > > Cc: David Vrabel > > Cc: Thomas Gleixner > > Cc: Ingo Molnar > > Cc: "H. Peter Anvin" > > Cc: x86@kernel.org > > Cc: "Roger Pau Monn?" > > Cc: Dmitry Torokhov > > Cc: Ian Campbell > > Cc: Wei Liu > > Cc: Juergen Gross > > Cc: "James E.J. Bottomley" > > Cc: Greg Kroah-Hartman > > Cc: Jiri Slaby > > Cc: Jean-Christophe Plagniol-Villard > > Cc: Tomi Valkeinen > > Cc: linux-input@vger.kernel.org > > Cc: netdev@vger.kernel.org > > Cc: linux-scsi@vger.kernel.org > > Cc: linuxppc-dev@lists.ozlabs.org > > Cc: linux-fbdev@vger.kernel.org > > Cc: linux-arm-kernel@lists.infradead.org > > Aside from the x86 bits: > > Reviewed-by: Stefano Stabellini Not really important, but just in case anyone waits for my ack on input bits: Acked-by: Dmitry Torokhov Thanks. -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/