kernel_optimize_test/drivers/xen
Julien Grall 0df4f266b3 xen: Use correctly the Xen memory terminologies
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 which may be used by all kind of guests
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.

Note that page_to_mfn has been renamed to xen_page_to_gfn to avoid a
name to close to the KVM function gfn_to_page.

Take also the opportunity to simplify simple construction such
as pfn_to_mfn(page_to_pfn(page)) into xen_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>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
2015-09-08 18:03:49 +01:00
..
events xen: Use correctly the Xen memory terminologies 2015-09-08 18:03:49 +01:00
xen-pciback
xenbus xen: Use correctly the Xen memory terminologies 2015-09-08 18:03:49 +01:00
xenfs xen: xensyms support 2015-08-20 12:24:25 +01:00
acpi.c
balloon.c xen: Use correctly the Xen memory terminologies 2015-09-08 18:03:49 +01:00
biomerge.c xen: Make clear that swiotlb and biomerge are dealing with DMA address 2015-09-08 17:10:52 +01:00
cpu_hotplug.c
dbgp.c
efi.c
evtchn.c
fallback.c
features.c
gntalloc.c xen: Use correctly the Xen memory terminologies 2015-09-08 18:03:49 +01:00
gntdev.c
grant-table.c
Kconfig xen/PMU: Sysfs interface for setting Xen PMU mode 2015-08-20 12:24:26 +01:00
Makefile
manage.c xen: Use correctly the Xen memory terminologies 2015-09-08 18:03:49 +01:00
mcelog.c
pci.c
pcpu.c
platform-pci.c
preempt.c xen/preempt: use need_resched() instead of should_resched() 2015-08-20 12:24:14 +01:00
privcmd.c
privcmd.h
swiotlb-xen.c xen: Make clear that swiotlb and biomerge are dealing with DMA address 2015-09-08 17:10:52 +01:00
sys-hypervisor.c xen/PMU: Sysfs interface for setting Xen PMU mode 2015-08-20 12:24:26 +01:00
tmem.c xen: Use correctly the Xen memory terminologies 2015-09-08 18:03:49 +01:00
xen-acpi-cpuhotplug.c
xen-acpi-memhotplug.c
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c
xen-scsiback.c
xen-selfballoon.c
xen-stub.c
xlate_mmu.c