ia64/xen-unstable

changeset 1380:d2776001835f

bitkeeper revision 1.891.1.17 (40a3a57esEQK6wY-v_0LLZhFK4ZGUA)

Now the Xen exit code is totally fixed!
author kaf24@scramble.cl.cam.ac.uk
date Thu May 13 16:42:38 2004 +0000 (2004-05-13)
parents 6364e3c99d29
children e8e20ed30675 362ebd8f741f
files xen/arch/i386/entry.S
line diff
     1.1 --- a/xen/arch/i386/entry.S	Thu May 13 15:09:41 2004 +0000
     1.2 +++ b/xen/arch/i386/entry.S	Thu May 13 16:42:38 2004 +0000
     1.3 @@ -247,10 +247,6 @@ restore_all_guest:
     1.4          movsl
     1.5          movsl
     1.6          movsl
     1.7 -        # Third, reenable interrupts. They will definitely be reenabled by IRET
     1.8 -        # in any case. They could be disabled here if we are returning from an
     1.9 -        # interrupt. We need interrupts enabled if we take a fault.
    1.10 -        sti
    1.11          # Finally, restore guest registers -- faults will cause failsafe
    1.12          popl %ebx
    1.13  	popl %ecx
    1.14 @@ -541,11 +537,14 @@ error_code:
    1.15  	movl  %edx,%es
    1.16  	movl  %edx,%fs
    1.17  	movl  %edx,%gs
    1.18 -	movl  EFLAGS(%esp),%edx
    1.19 -	testl $0x200,%edx               # Is IF asserted in saved EFLAGS?
    1.20 -	jz    1f                        # Don't STI if it isn't.
    1.21 +        # We force a STI here. In most cases it is illegal to fault with
    1.22 +        # interrupts disabled, so no need to check EFLAGS. There is one
    1.23 +        # case when it /is/ valid -- on final return to guest context, we
    1.24 +        # CLI so we can atomically check for events to notify guest about and
    1.25 +        # return, all in one go. If we fault it is necessary to STI and the
    1.26 +        # worst that will happen is that our return code is no longer atomic.
    1.27 +        # This will do -- noone will ever notice. :-)
    1.28  	sti
    1.29 -1:	movl  %esp,%edx
    1.30  	pushl %esi			# push the error code
    1.31  	pushl %edx			# push the pt_regs pointer
    1.32  	GET_CURRENT(%ebx)