Skip to content

Commit 80d0969

Browse files
kirylhansendc
authored andcommitted
x86/mm: Fix CR3_ADDR_MASK
The mask must not include bits above physical address mask. These bits are reserved and can be used for other things. Bits 61 and 62 are used for Linear Address Masking. Signed-off-by: Kirill A. Shutemov <[email protected]> Signed-off-by: Dave Hansen <[email protected]> Reviewed-by: Rick Edgecombe <[email protected]> Reviewed-by: Alexander Potapenko <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Tested-by: Alexander Potapenko <[email protected]> Link: https://lore.kernel.org/all/20221109165140.9137-2-kirill.shutemov%40linux.intel.com
1 parent 8232822 commit 80d0969

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/include/asm/processor-flags.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
*/
3636
#ifdef CONFIG_X86_64
3737
/* Mask off the address space ID and SME encryption bits. */
38-
#define CR3_ADDR_MASK __sme_clr(0x7FFFFFFFFFFFF000ull)
38+
#define CR3_ADDR_MASK __sme_clr(PHYSICAL_PAGE_MASK)
3939
#define CR3_PCID_MASK 0xFFFull
4040
#define CR3_NOFLUSH BIT_ULL(63)
4141

0 commit comments

Comments
 (0)