提交 80d0969a 编写于 作者: K Kirill A. Shutemov 提交者: Dave Hansen

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: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: NDave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: NRick Edgecombe <rick.p.edgecombe@intel.com>
Reviewed-by: NAlexander Potapenko <glider@google.com>
Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: NAlexander Potapenko <glider@google.com>
Link: https://lore.kernel.org/all/20221109165140.9137-2-kirill.shutemov%40linux.intel.com
上级 82328227
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
*/ */
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
/* Mask off the address space ID and SME encryption bits. */ /* Mask off the address space ID and SME encryption bits. */
#define CR3_ADDR_MASK __sme_clr(0x7FFFFFFFFFFFF000ull) #define CR3_ADDR_MASK __sme_clr(PHYSICAL_PAGE_MASK)
#define CR3_PCID_MASK 0xFFFull #define CR3_PCID_MASK 0xFFFull
#define CR3_NOFLUSH BIT_ULL(63) #define CR3_NOFLUSH BIT_ULL(63)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册