From: dmitry.torokhov@gmail•com (Dmitry Torokhov)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies
Date: Wed, 5 Aug 2015 09:52:25 -0700 [thread overview]
Message-ID: <20150805165225.GC3603@dtor-ws> (raw)
In-Reply-To: <alpine.DEB.2.02.1508051108100.11337@kaball.uk.xensource.com>
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 <julien.grall@citrix•com>
> > Cc: Stefano Stabellini <stefano.stabellini@eu•citrix.com>
> > Cc: Russell King <linux@arm•linux.org.uk>
> > Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle•com>
> > Cc: Boris Ostrovsky <boris.ostrovsky@oracle•com>
> > Cc: David Vrabel <david.vrabel@citrix•com>
> > Cc: Thomas Gleixner <tglx@linutronix•de>
> > Cc: Ingo Molnar <mingo@redhat•com>
> > Cc: "H. Peter Anvin" <hpa@zytor•com>
> > Cc: x86 at kernel.org
> > Cc: "Roger Pau Monn?" <roger.pau@citrix•com>
> > Cc: Dmitry Torokhov <dmitry.torokhov@gmail•com>
> > Cc: Ian Campbell <ian.campbell@citrix•com>
> > Cc: Wei Liu <wei.liu2@citrix•com>
> > Cc: Juergen Gross <jgross@suse•com>
> > Cc: "James E.J. Bottomley" <JBottomley@odin•com>
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation•org>
> > Cc: Jiri Slaby <jslaby@suse•com>
> > Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft•com>
> > Cc: Tomi Valkeinen <tomi.valkeinen@ti•com>
> > Cc: linux-input at vger.kernel.org
> > Cc: netdev at vger.kernel.org
> > Cc: linux-scsi at vger.kernel.org
> > Cc: linuxppc-dev at lists.ozlabs.org
> > Cc: linux-fbdev at vger.kernel.org
> > Cc: linux-arm-kernel at lists.infradead.org
>
> Aside from the x86 bits:
>
> Reviewed-by: Stefano Stabellini <stefano.stabellini@eu•citrix.com>
Not really important, but just in case anyone waits for my ack on input
bits:
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail•com>
Thanks.
--
Dmitry
next prev parent reply other threads:[~2015-08-05 16:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-04 18:12 [PATCH v2 0/8] Use correctly the Xen memory terminologies in Linux Julien Grall
2015-08-04 18:12 ` [PATCH v2 1/8] arm/xen: Remove helpers which are PV specific Julien Grall
2015-08-04 18:12 ` [PATCH v2 2/8] xen: Make clear that swiotlb and biomerge are dealing with DMA address Julien Grall
2015-08-05 9:49 ` Stefano Stabellini
2015-08-05 10:31 ` Julien Grall
2015-08-04 18:12 ` [PATCH v2 3/8] arm/xen: implement correctly pfn_to_mfn Julien Grall
2015-08-05 9:52 ` Stefano Stabellini
2015-08-04 18:12 ` [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies Julien Grall
2015-08-04 23:16 ` Boris Ostrovsky
2015-08-05 10:07 ` Stefano Stabellini
2015-08-05 10:51 ` Julien Grall
2015-08-05 12:19 ` Boris Ostrovsky
2015-08-05 12:33 ` [Xen-devel] " Julien Grall
2015-08-05 12:44 ` Boris Ostrovsky
2015-08-05 10:08 ` Stefano Stabellini
2015-08-05 16:52 ` Dmitry Torokhov [this message]
2015-08-05 17:01 ` Wei Liu
2015-08-06 11:00 ` [Xen-devel] " Julien Grall
2015-08-06 11:06 ` Stefano Stabellini
2015-08-06 11:17 ` Julien Grall
2015-08-06 14:20 ` Stefano Stabellini
2015-08-04 18:12 ` [PATCH v2 8/8] xen/privcmd: Further s/MFN/GFN/ clean-up Julien Grall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150805165225.GC3603@dtor-ws \
--to=dmitry.torokhov@gmail$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox