ia64/xen-unstable

changeset 9463:47dda4fa5d11

Simplify the failsafe callback handler in x86/64 linux. It doesn't
need to try reloading segment selectors (unlike i386 linux).

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Mar 28 10:01:35 2006 +0100 (2006-03-28)
parents 272a0a971ca3
children 2604abf98ede
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	Tue Mar 28 09:57:48 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S	Tue Mar 28 10:01:35 2006 +0100
     1.3 @@ -855,32 +855,12 @@ ecrit:  /**** END OF CRITICAL REGION ***
     1.4  # i.e. it just resumes from the next instruction interrupted with the same context. 
     1.5  	
     1.6  # Hypervisor uses this for application faults while it executes.
     1.7 +# Unlike i386 there is no need to reload the saved segment selectors:
     1.8 +# Xen already reloaded all valid ones and zeroed the others.
     1.9  ENTRY(failsafe_callback)
    1.10 -	addq $0x10,%rsp /* skip rcx and r11 */	
    1.11 -1:	mov  (%rsp),%ds
    1.12 -2:	mov  8(%rsp),%es
    1.13 -3:	mov  16(%rsp),%fs
    1.14 -4:	mov  24(%rsp),%gs
    1.15 -	addq $0x20,%rsp /* skip the above selectors */		
    1.16 +	addq $0x30,%rsp /* skip %rcx,%r11,%ds,%es,%fs,%gs */
    1.17  	SAVE_ALL
    1.18  	jmp  error_exit
    1.19 -.section .fixup,"ax";	\
    1.20 -6:	movq $0,(%rsp);	\
    1.21 -	jmp 1b;		\
    1.22 -7:	movq $0,8(%rsp);	\
    1.23 -	jmp 2b;		\
    1.24 -8:	movq $0,16(%rsp);	\
    1.25 -	jmp 3b;		\
    1.26 -9:	movq $0,24(%rsp);	\
    1.27 -	jmp 4b;		\
    1.28 -.previous;		\
    1.29 -.section __ex_table,"a";\
    1.30 -	.align 16;	\
    1.31 -	.quad 1b,6b;	\
    1.32 -	.quad 2b,7b;	\
    1.33 -	.quad 3b,8b;	\
    1.34 -	.quad 4b,9b;	\
    1.35 -.previous
    1.36   
    1.37  #if 0	      
    1.38          .section __ex_table,"a"