]> git.baikalelectronics.ru Git - kernel.git/commit
xen: make sure stray alias mappings are gone before pinning
authorJeremy Fitzhardinge <jeremy@goop.org>
Tue, 28 Oct 2008 08:23:06 +0000 (19:23 +1100)
committerIngo Molnar <mingo@elte.hu>
Fri, 7 Nov 2008 09:05:59 +0000 (10:05 +0100)
commitc649473a832e10b2ada60d212a0ff2afcc2e4173
treeabf6541cdd9e19f17eab6c73c4ffb09a23f0826e
parentd1644e1ecaa935420e06a5eef5d2d5fa94aeb54c
xen: make sure stray alias mappings are gone before pinning

Xen requires that all mappings of pagetable pages are read-only, so
that they can't be updated illegally.  As a result, if a page is being
turned into a pagetable page, we need to make sure all its mappings
are RO.

If the page had been used for ioremap or vmalloc, it may still have
left over mappings as a result of not having been lazily unmapped.
This change makes sure we explicitly mop them all up before pinning
the page.

Unlike aliases created by kmap, the there can be vmalloc aliases even
for non-high pages, so we must do the flush unconditionally.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Linux Memory Management List <linux-mm@kvack.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/xen/enlighten.c
arch/x86/xen/mmu.c