From aac694517f8f81b1be6bc0fbc5d53d4d68032459 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Fri, 14 Jan 2011 17:55:44 -0500 Subject: [PATCH] --- yaml --- r: 234173 b: refs/heads/master c: 146c4e511717e581065800938537b276173d8548 h: refs/heads/master i: 234171: 148758fdc34f6356383d52c75c62bc7cbc0a213a v: v3 --- [refs] | 2 +- trunk/arch/x86/include/asm/xen/page.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 82d94ebb6dc5..9261f88475ac 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fc25151d9ac7d809239fe68de0a1490b504bb94a +refs/heads/master: 146c4e511717e581065800938537b276173d8548 diff --git a/trunk/arch/x86/include/asm/xen/page.h b/trunk/arch/x86/include/asm/xen/page.h index 78ebbeb88d9c..195707060493 100644 --- a/trunk/arch/x86/include/asm/xen/page.h +++ b/trunk/arch/x86/include/asm/xen/page.h @@ -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