aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/xen-asm.S
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@xensource.com>2008-04-17 11:40:51 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:40:51 -0400
commit81e103f1f1bb0d35000f0e99626bf7abf864b486 (patch)
tree24c630827ecd534f4bf0219e2d1b511d9dec147a /arch/x86/xen/xen-asm.S
parentc9cf39ae64a6c86872e580f921afec64ab9770f8 (diff)
xen: use iret instruction all the time
Change iret implementation to not be dependent on direct-access vcpu structure. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/xen/xen-asm.S')
-rw-r--r--arch/x86/xen/xen-asm.S11
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/x86/xen/xen-asm.S b/arch/x86/xen/xen-asm.S
index 6b7190449d07..fe161ed4b01e 100644
--- a/arch/x86/xen/xen-asm.S
+++ b/arch/x86/xen/xen-asm.S
@@ -135,13 +135,8 @@ ENDPATCH(xen_restore_fl_direct)
135 current stack state in whatever form its in, we keep things 135 current stack state in whatever form its in, we keep things
136 simple by only using a single register which is pushed/popped 136 simple by only using a single register which is pushed/popped
137 on the stack. 137 on the stack.
138
139 Non-direct iret could be done in the same way, but it would
140 require an annoying amount of code duplication. We'll assume
141 that direct mode will be the common case once the hypervisor
142 support becomes commonplace.
143 */ 138 */
144ENTRY(xen_iret_direct) 139ENTRY(xen_iret)
145 /* test eflags for special cases */ 140 /* test eflags for special cases */
146 testl $(X86_EFLAGS_VM | XEN_EFLAGS_NMI), 8(%esp) 141 testl $(X86_EFLAGS_VM | XEN_EFLAGS_NMI), 8(%esp)
147 jnz hyper_iret 142 jnz hyper_iret
@@ -155,9 +150,9 @@ ENTRY(xen_iret_direct)
155 GET_THREAD_INFO(%eax) 150 GET_THREAD_INFO(%eax)
156 movl TI_cpu(%eax),%eax 151 movl TI_cpu(%eax),%eax
157 movl __per_cpu_offset(,%eax,4),%eax 152 movl __per_cpu_offset(,%eax,4),%eax
158 lea per_cpu__xen_vcpu_info(%eax),%eax 153 mov per_cpu__xen_vcpu(%eax),%eax
159#else 154#else
160 movl $per_cpu__xen_vcpu_info, %eax 155 movl per_cpu__xen_vcpu, %eax
161#endif 156#endif
162 157
163 /* check IF state we're restoring */ 158 /* check IF state we're restoring */