diff options
author | Arvind Sankar <nivedita@alum.mit.edu> | 2020-11-11 11:09:45 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-16 10:56:58 +0100 |
commit | 6346ed69bc7c84161c07875bf3e0f5523b4bca8d (patch) | |
tree | 6c83377f619cad649319f6458c450ea3fff06754 /arch/x86/kernel/apic/vector.c | |
parent | 258d646f006b1f5ab1b43b6eefefd0b5648fa89a (diff) |
x86/mm/mem_encrypt: Fix definition of PMD_FLAGS_DEC_WP
commit 29ac40cbed2bc06fa218ca25d7f5e280d3d08a25 upstream.
The PAT bit is in different locations for 4k and 2M/1G page table
entries.
Add a definition for _PAGE_LARGE_CACHE_MASK to represent the three
caching bits (PWT, PCD, PAT), similar to _PAGE_CACHE_MASK for 4k pages,
and use it in the definition of PMD_FLAGS_DEC_WP to get the correct PAT
index for write-protected pages.
Fixes: 6ebcb060713f ("x86/mm: Add support to encrypt the kernel in-place")
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by: Tom Lendacky <thomas.lendacky@amd.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20201111160946.147341-1-nivedita@alum.mit.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/kernel/apic/vector.c')
0 files changed, 0 insertions, 0 deletions