|
@@ -85,6 +85,10 @@ static inline unsigned long mfn_to_pfn(unsigned long mfn)
|
|
|
if (xen_feature(XENFEAT_auto_translated_physmap))
|
|
|
return mfn;
|
|
|
|
|
|
+ if (unlikely((mfn >> machine_to_phys_order) != 0)) {
|
|
|
+ pfn = ~0;
|
|
|
+ goto try_override;
|
|
|
+ }
|
|
|
pfn = 0;
|
|
|
/*
|
|
|
* The array access can fail (e.g., device space beyond end of RAM).
|
|
@@ -92,7 +96,7 @@ static inline unsigned long mfn_to_pfn(unsigned long mfn)
|
|
|
* but we must handle the fault without crashing!
|
|
|
*/
|
|
|
__get_user(pfn, &machine_to_phys_mapping[mfn]);
|
|
|
-
|
|
|
+try_override:
|
|
|
/*
|
|
|
* If this appears to be a foreign mfn (because the pfn
|
|
|
* doesn't map back to the mfn), then check the local override
|