aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/ia32
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-06-25 00:19:28 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 07:15:52 -0400
commit2be29982a08009c731307f4a39053b70ac4700da (patch)
treef01fcf847f36b9da5cd87cefa7ee6c13d193077d /arch/x86/ia32
parentc7245da6ae7e5208504ff027c4e0eec69b788651 (diff)
x86/paravirt: add sysret/sysexit pvops for returning to 32-bit compatibility userspace
In a 64-bit system, we need separate sysret/sysexit operations to return to a 32-bit userspace. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citirx.com> Cc: xen-devel <xen-devel@lists.xensource.com> Cc: Stephen Tweedie <sct@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/ia32')
-rw-r--r--arch/x86/ia32/ia32entry.S21
1 files changed, 15 insertions, 6 deletions
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index 3aefbce2de48..2a4c42427d9a 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -61,6 +61,19 @@
61 CFI_UNDEFINED r15 61 CFI_UNDEFINED r15
62 .endm 62 .endm
63 63
64#ifdef CONFIG_PARAVIRT
65ENTRY(native_usergs_sysret32)
66 swapgs
67 sysretl
68ENDPROC(native_usergs_sysret32)
69
70ENTRY(native_irq_enable_sysexit)
71 swapgs
72 sti
73 sysexit
74ENDPROC(native_irq_enable_sysexit)
75#endif
76
64/* 77/*
65 * 32bit SYSENTER instruction entry. 78 * 32bit SYSENTER instruction entry.
66 * 79 *
@@ -151,10 +164,7 @@ sysenter_do_call:
151 CFI_ADJUST_CFA_OFFSET -8 164 CFI_ADJUST_CFA_OFFSET -8
152 CFI_REGISTER rsp,rcx 165 CFI_REGISTER rsp,rcx
153 TRACE_IRQS_ON 166 TRACE_IRQS_ON
154 swapgs 167 ENABLE_INTERRUPTS_SYSEXIT32
155 sti /* sti only takes effect after the next instruction */
156 /* sysexit */
157 .byte 0xf, 0x35
158 168
159sysenter_tracesys: 169sysenter_tracesys:
160 CFI_RESTORE_STATE 170 CFI_RESTORE_STATE
@@ -254,8 +264,7 @@ cstar_do_call:
254 TRACE_IRQS_ON 264 TRACE_IRQS_ON
255 movl RSP-ARGOFFSET(%rsp),%esp 265 movl RSP-ARGOFFSET(%rsp),%esp
256 CFI_RESTORE rsp 266 CFI_RESTORE rsp
257 swapgs 267 USERGS_SYSRET32
258 sysretl
259 268
260cstar_tracesys: 269cstar_tracesys:
261 CFI_RESTORE_STATE 270 CFI_RESTORE_STATE