diff options
| author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2013-11-11 07:50:30 -0500 |
|---|---|---|
| committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-11-11 12:48:58 -0500 |
| commit | 18c51e1a3fabb455ff1f5cd610097d89f577b8f7 (patch) | |
| tree | 5489d46bea7ecd8fc8713d8c59cde17372d96068 | |
| parent | ffc555be09bd2603abdbc6f8b64c6a7477facc48 (diff) | |
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 4a19138c6505e224d9f4cc2fe9ada9188d7100ea
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>
| -rw-r--r-- | arch/arm/include/asm/xen/page.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h index 71bb779f2761..75579a9d6f76 100644 --- a/arch/arm/include/asm/xen/page.h +++ b/arch/arm/include/asm/xen/page.h | |||
| @@ -46,10 +46,7 @@ static inline unsigned long pfn_to_mfn(unsigned long pfn) | |||
| 46 | return mfn; | 46 | return mfn; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | if (xen_initial_domain()) | 49 | return pfn; |
| 50 | return pfn; | ||
| 51 | else | ||
| 52 | return INVALID_P2M_ENTRY; | ||
| 53 | } | 50 | } |
| 54 | 51 | ||
| 55 | static inline unsigned long mfn_to_pfn(unsigned long mfn) | 52 | static inline unsigned long mfn_to_pfn(unsigned long mfn) |
| @@ -62,10 +59,7 @@ static inline unsigned long mfn_to_pfn(unsigned long mfn) | |||
| 62 | return pfn; | 59 | return pfn; |
| 63 | } | 60 | } |
| 64 | 61 | ||
| 65 | if (xen_initial_domain()) | 62 | return mfn; |
| 66 | return mfn; | ||
| 67 | else | ||
| 68 | return INVALID_P2M_ENTRY; | ||
| 69 | } | 63 | } |
| 70 | 64 | ||
| 71 | #define mfn_to_local_pfn(mfn) mfn_to_pfn(mfn) | 65 | #define mfn_to_local_pfn(mfn) mfn_to_pfn(mfn) |
