ia64/xen-unstable

changeset 5420:8c95b4009c7f

bitkeeper revision 1.1705.1.10 (42a95ea6cCTdfA7-Kmu3_gnUMEq0gw)

user -> kernel syscall path must enable interrupts after all, since
it calls create_bounce_frame which can potentially fault. Thus we must
also test_all_events.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Jun 10 09:34:30 2005 +0000 (2005-06-10)
parents 38e4b3dc8b9c
children 509905cdbafe
files xen/arch/x86/x86_64/entry.S
line diff
     1.1 --- a/xen/arch/x86/x86_64/entry.S	Fri Jun 10 09:10:18 2005 +0000
     1.2 +++ b/xen/arch/x86/x86_64/entry.S	Fri Jun 10 09:34:30 2005 +0000
     1.3 @@ -19,15 +19,16 @@
     1.4          movq (reg),reg;
     1.5  
     1.6          ALIGN
     1.7 -/* %rbx: struct vcpu, interrupts disabled */
     1.8 +/* %rbx: struct vcpu */
     1.9  switch_to_kernel:
    1.10          leaq  VCPU_trap_bounce(%rbx),%rdx
    1.11          movq  VCPU_syscall_addr(%rbx),%rax
    1.12          movq  %rax,TRAPBOUNCE_eip(%rdx)
    1.13          movw  $0,TRAPBOUNCE_flags(%rdx)
    1.14          call  create_bounce_frame
    1.15 +        jmp   test_all_events
    1.16  
    1.17 -/* %rbx: struct vcpu */
    1.18 +/* %rbx: struct vcpu, interrupts disabled */
    1.19  restore_all_guest:
    1.20          RESTORE_ALL
    1.21          testw $TRAP_syscall,4(%rsp)
    1.22 @@ -38,7 +39,6 @@ restore_all_guest:
    1.23          popq  %r11                    # CS
    1.24          cmpw  $__GUEST_CS32,%r11
    1.25          popq  %r11                    # RFLAGS
    1.26 -        cli                           # No interrupts after stack switch
    1.27          popq  %rsp                    # RSP
    1.28          je    1f
    1.29          sysretq
    1.30 @@ -107,6 +107,7 @@ restore_all_xen:
    1.31   */
    1.32          ALIGN
    1.33  ENTRY(syscall_enter)
    1.34 +        sti
    1.35          movl  $__GUEST_SS,24(%rsp)
    1.36          pushq %rcx
    1.37          pushq $0
    1.38 @@ -117,7 +118,6 @@ ENTRY(syscall_enter)
    1.39          jz    switch_to_kernel
    1.40  
    1.41  /*hypercall:*/
    1.42 -        sti
    1.43          movq  %r10,%rcx
    1.44          andq  $(NR_hypercalls-1),%rax
    1.45          leaq  hypercall_table(%rip),%r10