diff options
author | Juergen Gross <jgross@suse.com> | 2021-01-20 14:55:44 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-02-10 12:25:49 +0100 |
commit | 53c9d9240944088274aadbbbafc6138ca462db4f (patch) | |
tree | 240f2116356d20534a96f21db21b469abcd64978 /arch/x86/kernel/asm-offsets_64.c | |
parent | x86/xen: Use specific Xen pv interrupt entry for DF (diff) | |
download | linux-53c9d9240944088274aadbbbafc6138ca462db4f.tar.xz linux-53c9d9240944088274aadbbbafc6138ca462db4f.zip |
x86/pv: Switch SWAPGS to ALTERNATIVE
SWAPGS is used only for interrupts coming from user mode or for
returning to user mode. So there is no reason to use the PARAVIRT
framework, as it can easily be replaced by an ALTERNATIVE depending
on X86_FEATURE_XENPV.
There are several instances using the PV-aware SWAPGS macro in paths
which are never executed in a Xen PV guest. Replace those with the
plain swapgs instruction. For SWAPGS_UNSAFE_STACK the same applies.
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Andy Lutomirski <luto@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210120135555.32594-5-jgross@suse.com
Diffstat (limited to 'arch/x86/kernel/asm-offsets_64.c')
-rw-r--r-- | arch/x86/kernel/asm-offsets_64.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c index 828be792231e..1354bc30614d 100644 --- a/arch/x86/kernel/asm-offsets_64.c +++ b/arch/x86/kernel/asm-offsets_64.c @@ -15,7 +15,6 @@ int main(void) #ifdef CONFIG_PARAVIRT_XXL OFFSET(PV_CPU_usergs_sysret64, paravirt_patch_template, cpu.usergs_sysret64); - OFFSET(PV_CPU_swapgs, paravirt_patch_template, cpu.swapgs); #ifdef CONFIG_DEBUG_ENTRY OFFSET(PV_IRQ_save_fl, paravirt_patch_template, irq.save_fl); #endif |