# HG changeset patch # User kaf24@scramble.cl.cam.ac.uk # Date 1101493299 0 # Node ID a46548db5e52293f155f0c41f5d641ee14093241 # Parent d0daec09aa8b65976060e491b20702752b257c00 bitkeeper revision 1.1159.187.20 (41a77433rez_BGuifdBbTI3Y34kiag) Deal with exception from guest context with real interrupts disabled. This can happen because IOPL != 0 and even a well-behaved guest may execute random BIOS code if it is a privileged hardware-controlling domain (e.g., DOM0 X server). diff -r d0daec09aa8b -r a46548db5e52 xen/arch/x86/x86_32/entry.S --- a/xen/arch/x86/x86_32/entry.S Thu Nov 25 22:09:38 2004 +0000 +++ b/xen/arch/x86/x86_32/entry.S Fri Nov 26 18:21:39 2004 +0000 @@ -339,7 +339,7 @@ error_code: SET_XEN_SEGMENTS(a) testb $X86_EFLAGS_IF>>8,XREGS_eflags+1(%esp) jz exception_with_ints_disabled - sti # re-enable interrupts +1: sti # re-enable interrupts xorl %eax,%eax movw XREGS_entry_vector(%esp),%ax movl %esp,%edx @@ -354,8 +354,8 @@ error_code: exception_with_ints_disabled: movb XREGS_cs(%esp),%al - testb $3,%al # interrupts disabled outside Xen? - jnz FATAL_exception_with_ints_disabled + testb $3,%al # interrupts disabled outside Xen? + jnz 1b # it really does happen! (e.g., DOM0 X server) pushl XREGS_eip(%esp) call search_pre_exception_table addl $4,%esp