diff options
Diffstat (limited to 'arch/x86/include/asm/xen/page.h')
-rw-r--r-- | arch/x86/include/asm/xen/page.h | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/arch/x86/include/asm/xen/page.h b/arch/x86/include/asm/xen/page.h index 5eea09915a15..358dcd338915 100644 --- a/arch/x86/include/asm/xen/page.h +++ b/arch/x86/include/asm/xen/page.h | |||
@@ -55,9 +55,8 @@ extern int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops, | |||
55 | struct gnttab_map_grant_ref *kmap_ops, | 55 | struct gnttab_map_grant_ref *kmap_ops, |
56 | struct page **pages, unsigned int count); | 56 | struct page **pages, unsigned int count); |
57 | extern int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops, | 57 | extern int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops, |
58 | struct gnttab_map_grant_ref *kmap_ops, | 58 | struct gnttab_unmap_grant_ref *kunmap_ops, |
59 | struct page **pages, unsigned int count); | 59 | struct page **pages, unsigned int count); |
60 | extern unsigned long m2p_find_override_pfn(unsigned long mfn, unsigned long pfn); | ||
61 | 60 | ||
62 | /* | 61 | /* |
63 | * Helper functions to write or read unsigned long values to/from | 62 | * Helper functions to write or read unsigned long values to/from |
@@ -154,21 +153,12 @@ static inline unsigned long mfn_to_pfn(unsigned long mfn) | |||
154 | return mfn; | 153 | return mfn; |
155 | 154 | ||
156 | pfn = mfn_to_pfn_no_overrides(mfn); | 155 | pfn = mfn_to_pfn_no_overrides(mfn); |
157 | if (__pfn_to_mfn(pfn) != mfn) { | 156 | if (__pfn_to_mfn(pfn) != mfn) |
158 | /* | 157 | pfn = ~0; |
159 | * If this appears to be a foreign mfn (because the pfn | ||
160 | * doesn't map back to the mfn), then check the local override | ||
161 | * table to see if there's a better pfn to use. | ||
162 | * | ||
163 | * m2p_find_override_pfn returns ~0 if it doesn't find anything. | ||
164 | */ | ||
165 | pfn = m2p_find_override_pfn(mfn, ~0); | ||
166 | } | ||
167 | 158 | ||
168 | /* | 159 | /* |
169 | * pfn is ~0 if there are no entries in the m2p for mfn or if the | 160 | * pfn is ~0 if there are no entries in the m2p for mfn or the |
170 | * entry doesn't map back to the mfn and m2p_override doesn't have a | 161 | * entry doesn't map back to the mfn. |
171 | * valid entry for it. | ||
172 | */ | 162 | */ |
173 | if (pfn == ~0 && __pfn_to_mfn(mfn) == IDENTITY_FRAME(mfn)) | 163 | if (pfn == ~0 && __pfn_to_mfn(mfn) == IDENTITY_FRAME(mfn)) |
174 | pfn = mfn; | 164 | pfn = mfn; |