ia64/xen-unstable

changeset 18785:92d0e13b0ea3

vmx: Fix realmode exception delivery to correctly check stack pointer size.

Bug tracked down by Tim Deegan <tim.deegan@citrix.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Nov 11 11:10:59 2008 +0000 (2008-11-11)
parents 36bda0bb805f
children 7e8db19d72a5
files xen/arch/x86/hvm/vmx/realmode.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/realmode.c	Tue Nov 11 11:07:21 2008 +0000
     1.2 +++ b/xen/arch/x86/hvm/vmx/realmode.c	Tue Nov 11 11:10:59 2008 +0000
     1.3 @@ -69,7 +69,8 @@ static void realmode_deliver_exception(
     1.4      frame[1] = csr->sel;
     1.5      frame[2] = regs->eflags & ~X86_EFLAGS_RF;
     1.6  
     1.7 -    if ( hvmemul_ctxt->ctxt.sp_size == 32 )
     1.8 +    /* We can't test hvmemul_ctxt->ctxt.sp_size: it may not be initialised. */
     1.9 +    if ( hvmemul_ctxt->seg_reg[x86_seg_ss].attr.fields.db )
    1.10      {
    1.11          regs->esp -= 6;
    1.12          pstk = regs->esp;