]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/mm/pgtable.c
x86-32: Fix possible incomplete TLB invalidate with PAE pagetables
[karo-tx-linux.git] / arch / x86 / mm / pgtable.c
index e27fbf887f3ba2b0fb41595710a9d8d9882aed1f..395b3b4a7c43f072dbb36a4bade78c300112f21c 100644 (file)
@@ -58,6 +58,13 @@ void ___pte_free_tlb(struct mmu_gather *tlb, struct page *pte)
 void ___pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd)
 {
        paravirt_release_pmd(__pa(pmd) >> PAGE_SHIFT);
+       /*
+        * NOTE! For PAE, any changes to the top page-directory-pointer-table
+        * entries need a full cr3 reload to flush.
+        */
+#ifdef CONFIG_X86_PAE
+       tlb->need_flush_all = 1;
+#endif
        tlb_remove_page(tlb, virt_to_page(pmd));
 }