ia64/xen-unstable

changeset 5431:ed8174531c13

bitkeeper revision 1.1705.1.17 (42a9c29fxaDTWROFphY2UjU8IBagWw)

Fix NULL-handler check when propagating faults to guest kernels.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Jun 10 16:41:03 2005 +0000 (2005-06-10)
parents bd865b72e7ab
children 9e1e2d648dce
files xen/arch/x86/x86_32/entry.S xen/arch/x86/x86_64/entry.S
line diff
     1.1 --- a/xen/arch/x86/x86_32/entry.S	Fri Jun 10 16:17:11 2005 +0000
     1.2 +++ b/xen/arch/x86/x86_32/entry.S	Fri Jun 10 16:41:03 2005 +0000
     1.3 @@ -176,10 +176,10 @@ vmx_process_softirqs:
     1.4  restore_all_guest:
     1.5          testl $X86_EFLAGS_VM,UREGS_eflags(%esp)
     1.6          jnz  restore_all_vm86
     1.7 -FLT1:   mov UREGS_ds(%esp),%ds
     1.8 -FLT2:   mov UREGS_es(%esp),%es
     1.9 -FLT3:   mov UREGS_fs(%esp),%fs
    1.10 -FLT4:   mov UREGS_gs(%esp),%gs
    1.11 +FLT1:   mov  UREGS_ds(%esp),%ds
    1.12 +FLT2:   mov  UREGS_es(%esp),%es
    1.13 +FLT3:   mov  UREGS_fs(%esp),%fs
    1.14 +FLT4:   mov  UREGS_gs(%esp),%gs
    1.15  restore_all_vm86:
    1.16          popl %ebx
    1.17          popl %ecx
    1.18 @@ -306,7 +306,7 @@ create_bounce_frame:
    1.19          testl $(2|X86_EFLAGS_VM),%ecx
    1.20          jz   ring1 /* jump if returning to an existing ring-1 activation */
    1.21          movl VCPU_kernel_sp(%ebx),%esi
    1.22 -FLT6:   mov VCPU_kernel_ss(%ebx),%gs
    1.23 +FLT6:   mov  VCPU_kernel_ss(%ebx),%gs
    1.24          testl $X86_EFLAGS_VM,UREGS_eflags+4(%esp)
    1.25          jz   nvm86_1
    1.26          subl $16,%esi       /* push ES/DS/FS/GS (VM86 stack frame) */
    1.27 @@ -326,13 +326,11 @@ FLT12:  movl %eax,%gs:4(%esi)
    1.28          jmp 1f
    1.29  ring1:  /* obtain ss/esp from oldss/oldesp -- a ring-1 activation exists */
    1.30          movl UREGS_esp+4(%esp),%esi
    1.31 -FLT13:  mov UREGS_ss+4(%esp),%gs 
    1.32 +FLT13:  mov  UREGS_ss+4(%esp),%gs 
    1.33  1:      /* Construct a stack frame: EFLAGS, CS/EIP */
    1.34          movb TRAPBOUNCE_flags(%edx),%cl
    1.35          subl $12,%esi
    1.36          movl UREGS_eip+4(%esp),%eax
    1.37 -        test %eax,%eax
    1.38 -        jz   domain_crash_synchronous
    1.39  FLT14:  movl %eax,%gs:(%esi) 
    1.40          movl VCPU_vcpu_info(%ebx),%eax
    1.41          pushl VCPUINFO_upcall_mask(%eax)
    1.42 @@ -383,11 +381,13 @@ 2:      testl $X86_EFLAGS_VM,UREGS_eflag
    1.43  nvm86_3:/* Rewrite our stack frame and return to ring 1. */
    1.44          /* IA32 Ref. Vol. 3: TF, VM, RF and NT flags are cleared on trap. */
    1.45          andl $0xfffcbeff,UREGS_eflags+4(%esp)
    1.46 -        mov %gs,UREGS_ss+4(%esp)
    1.47 +        mov  %gs,UREGS_ss+4(%esp)
    1.48          movl %esi,UREGS_esp+4(%esp)
    1.49          movzwl TRAPBOUNCE_cs(%edx),%eax
    1.50          movl %eax,UREGS_cs+4(%esp)
    1.51          movl TRAPBOUNCE_eip(%edx),%eax
    1.52 +        test %eax,%eax
    1.53 +        jz   domain_crash_synchronous
    1.54          movl %eax,UREGS_eip+4(%esp)
    1.55          movb $0,TRAPBOUNCE_flags(%edx)
    1.56          ret
    1.57 @@ -670,7 +670,7 @@ do_switch_vm86:
    1.58  
    1.59          # GS:ESI == Ring-1 stack activation
    1.60          movl UREGS_esp(%esp),%esi
    1.61 -VFLT1:  mov UREGS_ss(%esp),%gs
    1.62 +VFLT1:  mov  UREGS_ss(%esp),%gs
    1.63  
    1.64          # ES:EDI == Ring-0 stack activation
    1.65          leal UREGS_eip(%esp),%edi
     2.1 --- a/xen/arch/x86/x86_64/entry.S	Fri Jun 10 16:17:11 2005 +0000
     2.2 +++ b/xen/arch/x86/x86_64/entry.S	Fri Jun 10 16:41:03 2005 +0000
     2.3 @@ -320,8 +320,6 @@ FLT4:   movq  %rax,16(%rsi)             
     2.4          movw  UREGS_cs+8(%rsp),%ax      # Bits  0-15: CS
     2.5  FLT5:   movq  %rax,8(%rsi)              # CS/saved_upcall_mask
     2.6          movq  UREGS_rip+8(%rsp),%rax
     2.7 -        testq %rax,%rax
     2.8 -        jz    domain_crash_synchronous
     2.9  FLT6:   movq  %rax,(%rsi)               # RIP
    2.10          testb $TBF_EXCEPTION_ERRCODE,%cl
    2.11          jz    1f
    2.12 @@ -357,6 +355,8 @@ FLT14:  movq  %rax,(%rsi)               
    2.13          movq  %rsi,UREGS_rsp+8(%rsp)
    2.14          movq  $__GUEST_CS,UREGS_cs+8(%rsp)
    2.15          movq  TRAPBOUNCE_eip(%rdx),%rax
    2.16 +        testq %rax,%rax
    2.17 +        jz    domain_crash_synchronous
    2.18          movq  %rax,UREGS_rip+8(%rsp)
    2.19          movb  $0,TRAPBOUNCE_flags(%rdx)
    2.20          ret