diff options
author | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2004-05-13 16:42:38 +0000 |
---|---|---|
committer | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2004-05-13 16:42:38 +0000 |
commit | 49c6b7cad5d16552fcc86a7aac8e2a505abd12a3 (patch) | |
tree | 8915c70fdddc3ceabc2bbbe0a1381887571197b3 /xen | |
parent | cde62b6cc81b19067a739d6f59faf0b1cf49cace (diff) | |
download | xen-49c6b7cad5d16552fcc86a7aac8e2a505abd12a3.tar.gz xen-49c6b7cad5d16552fcc86a7aac8e2a505abd12a3.tar.bz2 xen-49c6b7cad5d16552fcc86a7aac8e2a505abd12a3.zip |
bitkeeper revision 1.891.1.17 (40a3a57esEQK6wY-v_0LLZhFK4ZGUA)
Now the Xen exit code is totally fixed!
Diffstat (limited to 'xen')
-rw-r--r-- | xen/arch/i386/entry.S | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/xen/arch/i386/entry.S b/xen/arch/i386/entry.S index 4e9163a75d..1d55a51617 100644 --- a/xen/arch/i386/entry.S +++ b/xen/arch/i386/entry.S @@ -247,10 +247,6 @@ restore_all_guest: movsl movsl movsl - # Third, reenable interrupts. They will definitely be reenabled by IRET - # in any case. They could be disabled here if we are returning from an - # interrupt. We need interrupts enabled if we take a fault. - sti # Finally, restore guest registers -- faults will cause failsafe popl %ebx popl %ecx @@ -541,11 +537,14 @@ error_code: movl %edx,%es movl %edx,%fs movl %edx,%gs - movl EFLAGS(%esp),%edx - testl $0x200,%edx # Is IF asserted in saved EFLAGS? - jz 1f # Don't STI if it isn't. + # We force a STI here. In most cases it is illegal to fault with + # interrupts disabled, so no need to check EFLAGS. There is one + # case when it /is/ valid -- on final return to guest context, we + # CLI so we can atomically check for events to notify guest about and + # return, all in one go. If we fault it is necessary to STI and the + # worst that will happen is that our return code is no longer atomic. + # This will do -- noone will ever notice. :-) sti -1: movl %esp,%edx pushl %esi # push the error code pushl %edx # push the pt_regs pointer GET_CURRENT(%ebx) |