[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1438711972-18752-1-git-send-email-julien.grall@citrix.com>
Date: Tue, 4 Aug 2015 19:12:44 +0100
From: Julien Grall <julien.grall@...rix.com>
To: <xen-devel@...ts.xenproject.org>
CC: <ian.campbell@...rix.com>, <stefano.stabellini@...citrix.com>,
<linux-kernel@...r.kernel.org>,
Julien Grall <julien.grall@...rix.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
David Vrabel <david.vrabel@...rix.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
"James E.J. Bottomley" <JBottomley@...n.com>,
Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
Jiri Slaby <jslaby@...e.com>, Juergen Gross <jgross@...e.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
<linux-api@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-fbdev@...r.kernel.org>, <linux-input@...r.kernel.org>,
<linuxppc-dev@...ts.ozlabs.org>, <linux-scsi@...r.kernel.org>,
<netdev@...r.kernel.org>,
Roger Pau Monné <roger.pau@...rix.com>,
Russell King <linux@....linux.org.uk>,
"Thomas Gleixner" <tglx@...utronix.de>,
Tomi Valkeinen <tomi.valkeinen@...com>,
"Wei Liu" <wei.liu2@...rix.com>, <x86@...nel.org>
Subject: [PATCH v2 0/8] Use correctly the Xen memory terminologies in Linux
Hi all,
This patch series aims to use the memory terminologies described in
include/xen/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.
Major changes in v2:
- Use bfn rather than dfn for the DMA address
- Re-introduced pfn_to_mfn for PV guests only
- Typoes
For all the changes see in each patch.
This series is based on linus's branch. A branch with all the patches
can be found here:
git://xenbits.xen.org/people/julieng/linux-arm.git branch page-renaming-v2
It was been boot tested on ARM64 and only built for x86 and ARM32.
I would be happy if someone can give a try on x86 as I don't have a x86
box setup with Xen.
Sincerely yours,
[1] http://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=e758ed14f390342513405dd766e874934573e6cb
[2] https://lkml.org/lkml/2015/7/9/628
Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc: David Vrabel <david.vrabel@...rix.com>
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: Ian Campbell <ian.campbell@...rix.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: "James E.J. Bottomley" <JBottomley@...n.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>
Cc: Jiri Slaby <jslaby@...e.com>
Cc: Juergen Gross <jgross@...e.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Cc: linux-api@...r.kernel.org
Cc: linux-arm-kernel@...ts.infradead.org
Cc: linux-fbdev@...r.kernel.org
Cc: linux-input@...r.kernel.org
Cc: linuxppc-dev@...ts.ozlabs.org
Cc: linux-scsi@...r.kernel.org
Cc: netdev@...r.kernel.org
Cc: "Roger Pau Monné" <roger.pau@...rix.com>
Cc: Russell King <linux@....linux.org.uk>
Cc: Stefano Stabellini <stefano.stabellini@...citrix.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Tomi Valkeinen <tomi.valkeinen@...com>
Cc: Wei Liu <wei.liu2@...rix.com>
Cc: x86@...nel.org
Julien Grall (8):
arm/xen: Remove helpers which are PV specific
xen: Make clear that swiotlb and biomerge are dealing with DMA address
arm/xen: implement correctly pfn_to_mfn
xen: Use the correctly the Xen memory terminologies
xen/tmem: Use page_to_gfn rather than pfn_to_gfn
video/xen-fbfront: Further s/MFN/GFN clean-up
hvc/xen: Further s/MFN/GFN clean-up
xen/privcmd: Further s/MFN/GFN/ clean-up
arch/arm/include/asm/xen/page.h | 44 ++++++++++++++++-----------------
arch/arm/xen/enlighten.c | 18 +++++++-------
arch/arm/xen/mm.c | 4 +--
arch/x86/include/asm/xen/page.h | 37 +++++++++++++++++++++------
arch/x86/xen/mmu.c | 32 ++++++++++++------------
arch/x86/xen/smp.c | 2 +-
drivers/block/xen-blkfront.c | 6 ++---
drivers/input/misc/xen-kbdfront.c | 4 +--
drivers/net/xen-netback/netback.c | 4 +--
drivers/net/xen-netfront.c | 8 +++---
drivers/scsi/xen-scsifront.c | 8 +++---
drivers/tty/hvc/hvc_xen.c | 18 ++++++--------
drivers/video/fbdev/xen-fbfront.c | 20 +++++++--------
drivers/xen/balloon.c | 2 +-
drivers/xen/biomerge.c | 6 ++---
drivers/xen/events/events_base.c | 2 +-
drivers/xen/events/events_fifo.c | 4 +--
drivers/xen/gntalloc.c | 3 ++-
drivers/xen/manage.c | 2 +-
drivers/xen/privcmd.c | 44 ++++++++++++++++-----------------
drivers/xen/swiotlb-xen.c | 16 ++++++------
drivers/xen/tmem.c | 21 ++++++----------
drivers/xen/xenbus/xenbus_client.c | 2 +-
drivers/xen/xenbus/xenbus_dev_backend.c | 2 +-
drivers/xen/xenbus/xenbus_probe.c | 8 +++---
drivers/xen/xlate_mmu.c | 18 +++++++-------
include/uapi/xen/privcmd.h | 4 +++
include/xen/page.h | 4 +--
include/xen/xen-ops.h | 10 ++++----
29 files changed, 183 insertions(+), 170 deletions(-)
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists