提交 d6c8103b 编写于 作者: B Borislav Petkov 提交者: Ingo Molnar

x86/CPU: Align CR3 defines

Align them vertically for better readability and use BIT_ULL() macro.

No functionality change.
Signed-off-by: NBorislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Link: http://lkml.kernel.org/r/20170821080651.4527-1-bp@alien8.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
上级 ce0fa3e5
...@@ -34,17 +34,17 @@ ...@@ -34,17 +34,17 @@
*/ */
#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(0x7FFFFFFFFFFFF000ull)
#define CR3_PCID_MASK 0xFFFull #define CR3_PCID_MASK 0xFFFull
#define CR3_NOFLUSH (1UL << 63) #define CR3_NOFLUSH BIT_ULL(63)
#else #else
/* /*
* CR3_ADDR_MASK needs at least bits 31:5 set on PAE systems, and we save * CR3_ADDR_MASK needs at least bits 31:5 set on PAE systems, and we save
* a tiny bit of code size by setting all the bits. * a tiny bit of code size by setting all the bits.
*/ */
#define CR3_ADDR_MASK 0xFFFFFFFFull #define CR3_ADDR_MASK 0xFFFFFFFFull
#define CR3_PCID_MASK 0ull #define CR3_PCID_MASK 0ull
#define CR3_NOFLUSH 0 #define CR3_NOFLUSH 0
#endif #endif
#endif /* _ASM_X86_PROCESSOR_FLAGS_H */ #endif /* _ASM_X86_PROCESSOR_FLAGS_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册