[Devel,rh7] x86/mm: Use dirty bit for non-linear files ptes

Submitted by Andrey Ryabinin on Oct. 3, 2016, 8:46 a.m.


Message ID 1475484414-28651-1-git-send-email-aryabinin@virtuozzo.com
State New
Series "x86/mm: Use dirty bit for non-linear files ptes"
Headers show

Commit Message

Andrey Ryabinin Oct. 3, 2016, 8:46 a.m.
backported patchset "Workaround for Xeon Phi PTE A/D bits erratum"

_PAGE_BIT_FILE is not present in upstream but still present
in RHEL7 kernel, so they did this:
   /* Pick a bit unaffected by the "KNL4 erratum": */

   Which conflicts with ours code:

So, as temporary fix restore old value for _PAGE_FILE.
If we care about supporting Xeon Phi we could backport
remap_file_pages() emulation from upstream which removes uses _PAGE_FILE.


Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
 arch/x86/include/asm/pgtable_types.h | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
index 6e43ed0..5828193 100644
--- a/arch/x86/include/asm/pgtable_types.h
+++ b/arch/x86/include/asm/pgtable_types.h
@@ -29,12 +29,8 @@ 
 /* - if the user mapped it with PROT_NONE; pte_present gives true */
 /* - set: nonlinear file mapping, saved PTE; unset:swap */
-#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
-/* Pick a bit unaffected by the "KNL4 erratum": */
+/* TODO: FIX: The following bit is affected by the "KNL4 erratum": */
 #define _PAGE_PRESENT	(_AT(pteval_t, 1) << _PAGE_BIT_PRESENT)
 #define _PAGE_RW	(_AT(pteval_t, 1) << _PAGE_BIT_RW)