]> www.infradead.org Git - users/jedix/linux-maple.git/commit
arm/xen: implement correctly pfn_to_mfn
authorJulien Grall <julien.grall@citrix.com>
Fri, 7 Aug 2015 16:34:36 +0000 (17:34 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 30 Nov 2015 19:50:37 +0000 (14:50 -0500)
commitfe6b942823ba2dfceb321b4008bb74ee61628dcb
tree3f87cf8f4153d602058dcccb8949112703c297df
parent1fbf5a202f3330e0779b4dc00ff35cec7e0b2fe7
arm/xen: implement correctly pfn_to_mfn

After the commit introducing convertion between DMA and guest addresses,
all the callers of pfn_to_mfn are expecting to get a GFN (Guest Frame
Number). On ARM, all the guests are auto-translated so the GFN is equal
to the Linux PFN (Pseudo-physical Frame Number).

The current implementation may return an MFN if the caller is passing a
PFN associated to a mapped foreign grant. In pratice, I haven't seen
the problem on running guest but we should fix it for the sake of
correctness.

Correct the implementation by always returning the pfn passed in parameter.

A follow-up patch will take care to rename pfn_to_mfn to a suitable
name.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
(cherry picked from commit 5192b35de47e47a0f736fe30da199f32030680e7)
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/arm/include/asm/xen/page.h