]> xenbits.xensource.com Git - people/sstabellini/linux-pvhvm-deprecated.git/commitdiff
xen: mask_rw_pte mark RO all pagetable pages up to pgt_buf_top
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Wed, 30 Mar 2011 16:26:31 +0000 (16:26 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Wed, 6 Apr 2011 16:07:06 +0000 (16:07 +0000)
mask_rw_pte is currently checking if a pfn is a pagetable page if it
falls in the range pgt_buf_start - pgt_buf_end but that is incorrect
because pgt_buf_end is a moving target: pgt_buf_top is the real
boundary.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
arch/x86/xen/mmu.c

index c82df6c9c0f0a4a1bbc61f1ea881ebdd37fecdef..6b833dba0d4694d987b68e606b2feb4581066c97 100644 (file)
@@ -1491,7 +1491,7 @@ static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte)
         * it is RO.
         */
        if (((!is_early_ioremap_ptep(ptep) &&
-                       pfn >= pgt_buf_start && pfn < pgt_buf_end)) ||
+                       pfn >= pgt_buf_start && pfn < pgt_buf_top)) ||
                        (is_early_ioremap_ptep(ptep) && pfn != (pgt_buf_end - 1)))
                pte = pte_wrprotect(pte);