• Jeremy Fitzhardinge's avatar
    xen: make sure stray alias mappings are gone before pinning · d05fdf31
    Jeremy Fitzhardinge authored
    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: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
    Cc: Linux Memory Management List <linux-mm@kvack.org>
    Cc: Nick Piggin <nickpiggin@yahoo.com.au>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    d05fdf31
enlighten.c 40 KB