diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-10 16:56:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-10 16:56:56 -0500 |
commit | bdccc4edeb03ad68c55053b0260bdaaac547bbd9 (patch) | |
tree | c9fdce7c6bb13632f5a64925a1fb3fa306b7cfe1 /arch/x86/include | |
parent | 98368ab436538103a557fc1f15f54afd8aab6712 (diff) | |
parent | 72978b2fe2f2cdf9f319c6c6dcdbe92b38de2be2 (diff) |
Merge tag 'stable/for-linus-3.20-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen features and fixes from David Vrabel:
- Reworked handling for foreign (grant mapped) pages to simplify the
code, enable a number of additional use cases and fix a number of
long-standing bugs.
- Prefer the TSC over the Xen PV clock when dom0 (and the TSC is
stable).
- Assorted other cleanup and minor bug fixes.
* tag 'stable/for-linus-3.20-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (25 commits)
xen/manage: Fix USB interaction issues when resuming
xenbus: Add proper handling of XS_ERROR from Xenbus for transactions.
xen/gntdev: provide find_special_page VMA operation
xen/gntdev: mark userspace PTEs as special on x86 PV guests
xen-blkback: safely unmap grants in case they are still in use
xen/gntdev: safely unmap grants in case they are still in use
xen/gntdev: convert priv->lock to a mutex
xen/grant-table: add a mechanism to safely unmap pages that are in use
xen-netback: use foreign page information from the pages themselves
xen: mark grant mapped pages as foreign
xen/grant-table: add helpers for allocating pages
x86/xen: require ballooned pages for grant maps
xen: remove scratch frames for ballooned pages and m2p override
xen/grant-table: pre-populate kernel unmap ops for xen_gnttab_unmap_refs()
mm: add 'foreign' alias for the 'pinned' page flag
mm: provide a find_special_page vma operation
x86/xen: cleanup arch/x86/xen/mmu.c
x86/xen: add some __init annotations in arch/x86/xen/mmu.c
x86/xen: add some __init and static annotations in arch/x86/xen/setup.c
x86/xen: use correct types for addresses in arch/x86/xen/setup.c
...
Diffstat (limited to 'arch/x86/include')
-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; |