summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/paravirt_types.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/paravirt_types.h
parent53c9d9240944088274aadbbbafc6138ca462db4f (diff)
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/paravirt_types.h')
-rw-r--r--arch/x86/include/asm/paravirt_types.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
index 130f428b0cc8..0169365f1403 100644
--- a/arch/x86/include/asm/paravirt_types.h
+++ b/arch/x86/include/asm/paravirt_types.h
@@ -156,14 +156,6 @@ struct pv_cpu_ops {
u64 (*read_pmc)(int counter);
- /*
- * Switch to usermode gs and return to 64-bit usermode using
- * sysret. Only used in 64-bit kernels to return to 64-bit
- * processes. Usermode register state, including %rsp, must
- * already be restored.
- */
- void (*usergs_sysret64)(void);
-
/* Normal iret. Jump to this with the standard iret stack
frame set up. */
void (*iret)(void);