]> xenbits.xensource.com Git - people/julieng/linux-arm.git/commit
arm/xen: implement correctly pfn_to_mfn
authorJulien Grall <julien.grall@citrix.com>
Fri, 24 Jul 2015 15:08:22 +0000 (16:08 +0100)
committerJulien Grall <julien.grall@citrix.com>
Tue, 28 Jul 2015 13:58:22 +0000 (14:58 +0100)
commit1475a2338c47a8ecb027fd06707fdcdbf4d4e55d
tree9a5154c400ec662891a14b462ec4495a43202444
parent203d4fac21efa6bb306baf4cdf3d04a63f25d2c1
arm/xen: implement correctly pfn_to_mfn

After the commit introducing convertion between DMA and guest address,
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 pratical, 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>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
arch/arm/include/asm/xen/page.h