[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] vmx: Fix realmode exception delivery to correctly check stack pointer size.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1226401859 0
# Node ID 92d0e13b0ea365f019116450910bb0f3819c109c
# Parent  36bda0bb805f12e3abafa889070f0646a2b10a2e
vmx: Fix realmode exception delivery to correctly check stack pointer size.

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

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/realmode.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r 36bda0bb805f -r 92d0e13b0ea3 xen/arch/x86/hvm/vmx/realmode.c
--- a/xen/arch/x86/hvm/vmx/realmode.c   Tue Nov 11 11:07:21 2008 +0000
+++ b/xen/arch/x86/hvm/vmx/realmode.c   Tue Nov 11 11:10:59 2008 +0000
@@ -69,7 +69,8 @@ static void realmode_deliver_exception(
     frame[1] = csr->sel;
     frame[2] = regs->eflags & ~X86_EFLAGS_RF;
 
-    if ( hvmemul_ctxt->ctxt.sp_size == 32 )
+    /* We can't test hvmemul_ctxt->ctxt.sp_size: it may not be initialised. */
+    if ( hvmemul_ctxt->seg_reg[x86_seg_ss].attr.fields.db )
     {
         regs->esp -= 6;
         pstk = regs->esp;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.