[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Use common IRET macro for all exits from XenLinux. Currently



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID c646586d10651e94c2b56a370e3f737c19883726
# Parent  49c02a7a92dd501cac68b8cb9a47e62e6b2e3200
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@xxxxxxxxxxxxx>

diff -r 49c02a7a92dd -r c646586d1065 
linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S       Thu Feb 23 
17:30:43 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S       Thu Feb 23 
17:40:08 2006
@@ -325,7 +325,7 @@
        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 @@
        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 @@
        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)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.