linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/9] Use correctly the Xen memory terminologies
@ 2015-08-07 16:34 Julien Grall
  2015-08-07 16:34 ` [PATCH v3 1/9] arm/xen: Remove helpers which are PV specific Julien Grall
                   ` (9 more replies)
  0 siblings, 10 replies; 14+ messages in thread
From: Julien Grall @ 2015-08-07 16:34 UTC (permalink / raw)
  To: xen-devel
  Cc: ian.campbell, stefano.stabellini, linux-kernel, Julien Grall,
	Boris Ostrovsky, David Vrabel, Dmitry Torokhov,
	Greg Kroah-Hartman, H. Peter Anvin, Ingo Molnar,
	James E.J. Bottomley, Jean-Christophe Plagniol-Villard,
	Jiri Slaby, Juergen Gross, Konrad Rzeszutek Wilk, linux-api,
	linux-arm-kernel, linux-fbdev, linux-input, linuxppc-dev,
	linux-scsi, netdev, Roger Pau Monné,
	Russell King, Thomas Gleixner, Tomi Valkeinen, Wei Liu, x86

Hi all,

This patch series aims to use the memory terminologies described in
include/xen/mm.h [1] for Linux xen code.

The differences from v2 is minor but I resent it because my 64K series depends
on this series.

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
here if necessary.

Major changes in v3:
    - More typoes
    - Rename page_to_gfn to xen_page_to_gfn to avoid confusing with the
    KVM function gfn_to_page

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 xentip for-linus-4.3 branch. A branch with all the
patches can be found here:
    git://xenbits.xen.org/people/julieng/linux-arm.git branch page-renaming-v3

It has been boot tested on ARM64 and ARM32 and only built for x86.
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@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "James E.J. Bottomley" <JBottomley@odin.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: linux-api@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-fbdev@vger.kernel.org
Cc: linux-input@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-scsi@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: x86@kernel.org



Julien Grall (9):
  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 correctly the Xen memory terminologies
  xen/tmem: Use xen_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
  xen/xenbus: Rename the variable xen_store_mfn to xen_store_gfn

 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         | 35 +++++++++++++++++++++-----
 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              | 12 +++++----
 drivers/scsi/xen-scsifront.c            | 10 ++++----
 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       | 16 ++++++------
 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, 191 insertions(+), 174 deletions(-)

-- 
2.1.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-08-11 17:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-07 16:34 [PATCH v3 0/9] Use correctly the Xen memory terminologies Julien Grall
2015-08-07 16:34 ` [PATCH v3 1/9] arm/xen: Remove helpers which are PV specific Julien Grall
2015-08-07 16:34 ` [PATCH v3 2/9] xen: Make clear that swiotlb and biomerge are dealing with DMA address Julien Grall
2015-08-07 16:34 ` [PATCH v3 3/9] arm/xen: implement correctly pfn_to_mfn Julien Grall
2015-08-07 16:34 ` [PATCH v3 4/9] xen: Use correctly the Xen memory terminologies Julien Grall
2015-08-07 16:34 ` [PATCH v3 5/9] xen/tmem: Use xen_page_to_gfn rather than pfn_to_gfn Julien Grall
2015-08-07 16:34 ` [PATCH v3 6/9] video/xen-fbfront: Further s/MFN/GFN clean-up Julien Grall
2015-08-07 16:34 ` [PATCH v3 7/9] hvc/xen: " Julien Grall
2015-08-07 16:34 ` [PATCH v3 8/9] xen/privcmd: Further s/MFN/GFN/ clean-up Julien Grall
2015-08-07 16:34 ` [PATCH v3 9/9] xen/xenbus: Rename the variable xen_store_mfn to xen_store_gfn Julien Grall
2015-08-07 21:33   ` Boris Ostrovsky
2015-08-10  9:59     ` [Xen-devel] " Julien Grall
2015-08-10 10:06   ` Stefano Stabellini
2015-08-11 17:37 ` [Xen-devel] [PATCH v3 0/9] Use correctly the Xen memory terminologies David Vrabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).