]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xen/p2m: Check for auto-xlat when doing mfn_to_local_pfn.
authorMukesh Rathor <mukesh.rathor@oracle.com>
Fri, 13 Dec 2013 17:09:28 +0000 (12:09 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 3 Jan 2014 19:57:01 +0000 (14:57 -0500)
commitf01a8c64469fa5c277f9174d1bf3ab1884614c28
tree17f5409e80ec00de6fc97ee28d9061129f3cb5e4
parent545e06eb657dd3f8664938ea2c7a61a1a398478f
xen/p2m: Check for auto-xlat when doing mfn_to_local_pfn.

Most of the functions in page.h are prefaced with
if (xen_feature(XENFEAT_auto_translated_physmap))
return mfn;

Except the mfn_to_local_pfn. At a first sight, the function
should work without this patch - as the 'mfn_to_mfn' has
a similar check. But there are no such check in the
'get_phys_to_machine' function - so we would crash in there.

This fixes it by following the convention of having the
check for auto-xlat in these static functions.

Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
arch/x86/include/asm/xen/page.h