aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/irqflags.h
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2021-01-20 14:55:45 +0100
committerBorislav Petkov <bp@suse.de>2021-02-10 12:32:07 +0100
commitafd30525a659ac0ae0904f0cb4a2ca75522c3123 (patch)
treece45cda82fac21a848509aa29661353e634d45d6 /arch/x86/include/asm/irqflags.h
parentx86/pv: Switch SWAPGS to ALTERNATIVE (diff)
downloadlinux-dev-afd30525a659ac0ae0904f0cb4a2ca75522c3123.tar.xz
linux-dev-afd30525a659ac0ae0904f0cb4a2ca75522c3123.zip
x86/xen: Drop USERGS_SYSRET64 paravirt call
USERGS_SYSRET64 is used to return from a syscall via SYSRET, but a Xen PV guest will nevertheless use the IRET hypercall, as there is no sysret PV hypercall defined. So instead of testing all the prerequisites for doing a sysret and then mangling the stack for Xen PV again for doing an iret just use the iret exit from the beginning. This can easily be done via an ALTERNATIVE like it is done for the sysenter compat case already. It should be noted that this drops the optimization in Xen for not restoring a few registers when returning to user mode, but it seems as if the saved instructions in the kernel more than compensate for this drop (a kernel build in a Xen PV guest was slightly faster with this patch applied). While at it remove the stale sysret32 remnants. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20210120135555.32594-6-jgross@suse.com
Diffstat (limited to 'arch/x86/include/asm/irqflags.h')
-rw-r--r--arch/x86/include/asm/irqflags.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h
index 8c86edefa115..e585a4705b8d 100644
--- a/arch/x86/include/asm/irqflags.h
+++ b/arch/x86/include/asm/irqflags.h
@@ -132,12 +132,6 @@ static __always_inline unsigned long arch_local_irq_save(void)
#endif
#define INTERRUPT_RETURN jmp native_iret
-#define USERGS_SYSRET64 \
- swapgs; \
- sysretq;
-#define USERGS_SYSRET32 \
- swapgs; \
- sysretl
#else
#define INTERRUPT_RETURN iret