aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/entry/entry_64_compat.S
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-02-14 22:26:50 +0100
committerThomas Gleixner <tglx@linutronix.de>2019-02-14 22:26:50 +0100
commitd869f86645fc07dc83b89b68f1a22d91ebe29439 (patch)
treea3c2c1167bb34c8d0367d77e1a5734fc842d9f30 /arch/x86/entry/entry_64_compat.S
parent030fc443aef663df71cd834331fd8f1ec10c30c0 (diff)
parent74e96711e3379fc66630f2a1d184947f80cf2c48 (diff)
downloadlinux-d869f86645fc07dc83b89b68f1a22d91ebe29439.tar.gz
Merge branch 'linus' into irq/core
Pick up upstream changes to avoid conflicts for pending patches.
Diffstat (limited to 'arch/x86/entry/entry_64_compat.S')
-rw-r--r--arch/x86/entry/entry_64_compat.S6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/entry/entry_64_compat.S b/arch/x86/entry/entry_64_compat.S
index 8eaf8952c408..39913770a44d 100644
--- a/arch/x86/entry/entry_64_compat.S
+++ b/arch/x86/entry/entry_64_compat.S
@@ -361,7 +361,8 @@ ENTRY(entry_INT80_compat)
/* Need to switch before accessing the thread stack. */
SWITCH_TO_KERNEL_CR3 scratch_reg=%rdi
- movq %rsp, %rdi
+ /* In the Xen PV case we already run on the thread stack. */
+ ALTERNATIVE "movq %rsp, %rdi", "jmp .Lint80_keep_stack", X86_FEATURE_XENPV
movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp
pushq 6*8(%rdi) /* regs->ss */
@@ -370,8 +371,9 @@ ENTRY(entry_INT80_compat)
pushq 3*8(%rdi) /* regs->cs */
pushq 2*8(%rdi) /* regs->ip */
pushq 1*8(%rdi) /* regs->orig_ax */
-
pushq (%rdi) /* pt_regs->di */
+.Lint80_keep_stack:
+
pushq %rsi /* pt_regs->si */
xorl %esi, %esi /* nospec si */
pushq %rdx /* pt_regs->dx */