mirror of https://gitee.com/openkylin/linux.git
xen/arm: pfn_to_mfn and mfn_to_pfn return the argument if nothing is in the p2m
Some common Xen drivers, like balloon.c, call pfn_to_mfn and mfn_to_pfn
even for autotranslate guests, expecting the argument back.
The following commit broke these drivers by changing the behavior of
pfn_to_mfn and mfn_to_pfn:
commit 4a19138c65
Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Date: Thu Oct 17 16:22:27 2013 +0000
arm/xen,arm64/xen: introduce p2m
They now return INVALID_P2M_ENTRY if Linux doesn't actually know what is
the mfn backing a pfn or what is the pfn corresponding to an mfn.
Fix the regression by switching to the old behavior.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Tested-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
parent
ffc555be09
commit
18c51e1a3f
|
@ -46,10 +46,7 @@ static inline unsigned long pfn_to_mfn(unsigned long pfn)
|
||||||
return mfn;
|
return mfn;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xen_initial_domain())
|
|
||||||
return pfn;
|
return pfn;
|
||||||
else
|
|
||||||
return INVALID_P2M_ENTRY;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned long mfn_to_pfn(unsigned long mfn)
|
static inline unsigned long mfn_to_pfn(unsigned long mfn)
|
||||||
|
@ -62,10 +59,7 @@ static inline unsigned long mfn_to_pfn(unsigned long mfn)
|
||||||
return pfn;
|
return pfn;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xen_initial_domain())
|
|
||||||
return mfn;
|
return mfn;
|
||||||
else
|
|
||||||
return INVALID_P2M_ENTRY;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define mfn_to_local_pfn(mfn) mfn_to_pfn(mfn)
|
#define mfn_to_local_pfn(mfn) mfn_to_pfn(mfn)
|
||||||
|
|
Loading…
Reference in New Issue