debuggers.hg

diff xen/arch/x86/x86_32/entry.S @ 3198:a46548db5e52

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).
author kaf24@scramble.cl.cam.ac.uk
date Fri Nov 26 18:21:39 2004 +0000 (2004-11-26)
parents b013a6b30d9e
children 20290eb62e95 861d3cdc1dc5
line diff
     1.1 --- a/xen/arch/x86/x86_32/entry.S	Thu Nov 25 22:09:38 2004 +0000
     1.2 +++ b/xen/arch/x86/x86_32/entry.S	Fri Nov 26 18:21:39 2004 +0000
     1.3 @@ -339,7 +339,7 @@ error_code:
     1.4          SET_XEN_SEGMENTS(a)
     1.5          testb $X86_EFLAGS_IF>>8,XREGS_eflags+1(%esp)
     1.6          jz    exception_with_ints_disabled
     1.7 -        sti                             # re-enable interrupts
     1.8 +1:      sti                             # re-enable interrupts
     1.9          xorl  %eax,%eax
    1.10          movw  XREGS_entry_vector(%esp),%ax
    1.11          movl  %esp,%edx
    1.12 @@ -354,8 +354,8 @@ error_code:
    1.13  
    1.14  exception_with_ints_disabled:
    1.15          movb  XREGS_cs(%esp),%al
    1.16 -	testb $3,%al                    # interrupts disabled outside Xen?
    1.17 -	jnz   FATAL_exception_with_ints_disabled
    1.18 +	testb $3,%al   # interrupts disabled outside Xen?
    1.19 +	jnz   1b       # it really does happen! (e.g., DOM0 X server)
    1.20          pushl XREGS_eip(%esp)
    1.21          call  search_pre_exception_table
    1.22          addl  $4,%esp