ia64/xen-unstable

changeset 8989:c646586d1065

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>
author kaf24@firebug.cl.cam.ac.uk
date Thu Feb 23 18:40:08 2006 +0100 (2006-02-23)
parents 49c02a7a92dd
children 407a50974a46
files linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S	Thu Feb 23 18:30:43 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S	Thu Feb 23 18:40:08 2006 +0100
     1.3 @@ -325,7 +325,7 @@ ENTRY(int_ret_from_sys_call)
     1.4  	testb $3,CS-ARGOFFSET(%rsp)
     1.5          jnz 1f
     1.6          /* Need to set the proper %ss (not NULL) for ring 3 iretq */
     1.7 -        movl $__KERNEL_DS|3,SS-ARGOFFSET(%rsp)
     1.8 +        movl $__KERNEL_DS,SS-ARGOFFSET(%rsp)
     1.9          jmp retint_restore_args   # retrun from ring3 kernel
    1.10  1:              
    1.11  	movl $_TIF_ALLWORK_MASK,%edi
    1.12 @@ -510,13 +510,7 @@ retint_restore_args:
    1.13  	jnz restore_all_enable_events	# != 0 => reenable event delivery      
    1.14          XEN_PUT_VCPU_INFO(%rsi)
    1.15  		
    1.16 -	RESTORE_ARGS 0,8,0						
    1.17 -	testb $3,8(%rsp)                # check CS
    1.18 -	jnz  user_mode
    1.19 -kernel_mode:
    1.20 -        orb   $3,1*8(%rsp)
    1.21 -	iretq
    1.22 -user_mode:
    1.23 +	RESTORE_ARGS 0,8,0
    1.24  	HYPERVISOR_IRET 0
    1.25  	
    1.26  	/* edi: workmask, edx: work */
    1.27 @@ -826,11 +820,6 @@ scrit:	/**** START OF CRITICAL REGION **
    1.28  	jnz  14f			# process more events if necessary...
    1.29  	XEN_PUT_VCPU_INFO(%rsi)
    1.30          RESTORE_ARGS 0,8,0
    1.31 -        testb $3,8(%rsp)                # check CS
    1.32 -        jnz  crit_user_mode
    1.33 -        orb   $3,1*8(%rsp)
    1.34 -        iretq
    1.35 -crit_user_mode:
    1.36          HYPERVISOR_IRET 0
    1.37          
    1.38  14:	XEN_LOCKED_BLOCK_EVENTS(%rsi)