Use common IRET macro for all exits from XenLinux. Currently

uses slow iret path every time (but most returns will do that
anyway, since they'll be to userspace). Fast return (to kernel)
can be implemented inside the macro and respect the 
supervisor_mode_kernel feature flag.

Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2006-02-23 18:40:08 +01:00
1 parent 3eaf2dff37
commit e16b78bf48
1 file changed
+2 -13
@@ -325,7 +325,7 @@ ENTRY(int_ret_from_sys_call)
testb $3,CS-ARGOFFSET(%rsp)
jnz 1f
/* Need to set the proper %ss (not NULL) for ring 3 iretq */
movl $__KERNEL_DS|3,SS-ARGOFFSET(%rsp)
movl $__KERNEL_DS,SS-ARGOFFSET(%rsp)
jmp retint_restore_args # retrun from ring3 kernel
1:
movl $_TIF_ALLWORK_MASK,%edi
@@ -510,13 +510,7 @@ retint_restore_args:
jnz restore_all_enable_events # != 0 => reenable event delivery
XEN_PUT_VCPU_INFO(%rsi)
RESTORE_ARGS 0,8,0
testb $3,8(%rsp) # check CS
jnz user_mode
kernel_mode:
orb $3,1*8(%rsp)
iretq
user_mode:
RESTORE_ARGS 0,8,0
HYPERVISOR_IRET 0
/* edi: workmask, edx: work */
@@ -826,11 +820,6 @@ scrit: /**** START OF CRITICAL REGION ****/
jnz 14f # process more events if necessary...
XEN_PUT_VCPU_INFO(%rsi)
RESTORE_ARGS 0,8,0
testb $3,8(%rsp) # check CS
jnz crit_user_mode
orb $3,1*8(%rsp)
iretq
crit_user_mode:
HYPERVISOR_IRET 0
14: XEN_LOCKED_BLOCK_EVENTS(%rsi)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.