From: kaf24@scramble.cl.cam.ac.uk Date: Thu, 13 May 2004 16:42:38 +0000 (+0000) Subject: bitkeeper revision 1.891.1.17 (40a3a57esEQK6wY-v_0LLZhFK4ZGUA) X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~18216^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=49c6b7cad5d16552fcc86a7aac8e2a505abd12a3;p=xen.git bitkeeper revision 1.891.1.17 (40a3a57esEQK6wY-v_0LLZhFK4ZGUA) Now the Xen exit code is totally fixed! --- 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)