Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234173
b: refs/heads/master
c: 146c4e5
h: refs/heads/master
i:
  234171: 148758f
v: v3
  • Loading branch information
Konrad Rzeszutek Wilk committed Mar 14, 2011
1 parent 61681fc commit aac6945
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fc25151d9ac7d809239fe68de0a1490b504bb94a
refs/heads/master: 146c4e511717e581065800938537b276173d8548
6 changes: 5 additions & 1 deletion trunk/arch/x86/include/asm/xen/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,18 @@ 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).
* In such cases it doesn't matter what we return (we return garbage),
* 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
Expand Down

0 comments on commit aac6945

Please sign in to comment.