summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c52e55a)
raw | patch | inline | side by side (parent: c52e55a)
author | Hugh Dickins <hughd@google.com> | |
Sun, 10 Sep 2017 00:31:18 +0000 (17:31 -0700) | ||
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
Fri, 5 Jan 2018 14:44:24 +0000 (15:44 +0100) |
There's a 0x1000 in various places, which looks better with a name.
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/entry/entry_64.S | patch | blob | history | |
arch/x86/include/asm/kaiser.h | patch | blob | history |
index 0942aa6d16a8b9f84c2b96760168a5c071821463..82661cd1cd1373d98518b73e9b17fac6e21cf52e 100644 (file)
movq %cr3, %rax
pushq %rax
#ifdef CONFIG_KAISER_REAL_SWITCH
- andq $(~0x1000), %rax
+ andq $(~KAISER_SHADOW_PGD_OFFSET), %rax
#endif
movq %rax, %cr3
#endif
movq %cr3, %rax
pushq %rax
#ifdef CONFIG_KAISER_REAL_SWITCH
- andq $(~0x1000), %rax
+ andq $(~KAISER_SHADOW_PGD_OFFSET), %rax
#endif
movq %rax, %cr3
#endif
index 7394ba9f995107070dfbb1fe79ca6721a537d180..051acf678cda3761c893ddc501b46ea3c93801a9 100644 (file)
* A minimalistic kernel mapping holds the parts needed to be mapped in user
* mode, such as the entry/exit functions of the user space, or the stacks.
*/
+
+#define KAISER_SHADOW_PGD_OFFSET 0x1000
+
#ifdef __ASSEMBLY__
#ifdef CONFIG_KAISER
.macro _SWITCH_TO_KERNEL_CR3 reg
movq %cr3, \reg
#ifdef CONFIG_KAISER_REAL_SWITCH
-andq $(~0x1000), \reg
+andq $(~KAISER_SHADOW_PGD_OFFSET), \reg
#endif
movq \reg, %cr3
.endm
.macro _SWITCH_TO_USER_CR3 reg
movq %cr3, \reg
#ifdef CONFIG_KAISER_REAL_SWITCH
-orq $(0x1000), \reg
+orq $(KAISER_SHADOW_PGD_OFFSET), \reg
#endif
movq \reg, %cr3
.endm