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

[Xen-changelog] [xen-unstable] vmx realmode: Exception delivery clears interrupt shadow.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1201784468 0
# Node ID af5d189df05117d4be376f03fe41530fd217835c
# Parent  938446025b5b8fd8719f9796fd556a0e811bdca6
vmx realmode: Exception delivery clears interrupt shadow.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/realmode.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff -r 938446025b5b -r af5d189df051 xen/arch/x86/hvm/vmx/realmode.c
--- a/xen/arch/x86/hvm/vmx/realmode.c   Thu Jan 31 11:05:14 2008 +0000
+++ b/xen/arch/x86/hvm/vmx/realmode.c   Thu Jan 31 13:01:08 2008 +0000
@@ -109,6 +109,13 @@ static void realmode_deliver_exception(
     csr->base = (uint32_t)csr->sel << 4;
     regs->eip = (uint16_t)cs_eip;
     regs->eflags &= ~(X86_EFLAGS_TF | X86_EFLAGS_IF | X86_EFLAGS_RF);
+
+    /* Exception delivery clears STI and MOV-SS blocking. */
+    if ( rm_ctxt->intr_shadow & (VMX_INTR_SHADOW_STI|VMX_INTR_SHADOW_MOV_SS) )
+    {
+        rm_ctxt->intr_shadow &= ~(VMX_INTR_SHADOW_STI|VMX_INTR_SHADOW_MOV_SS);
+        __vmwrite(GUEST_INTERRUPTIBILITY_INFO, rm_ctxt->intr_shadow);
+    }
 }
 
 static int
@@ -655,7 +662,7 @@ void vmx_realmode(struct cpu_user_regs *
 {
     struct vcpu *curr = current;
     struct realmode_emulate_ctxt rm_ctxt;
-    unsigned long intr_info;
+    unsigned long intr_info = __vmread(VM_ENTRY_INTR_INFO);
     int i;
 
     rm_ctxt.ctxt.regs = regs;
@@ -674,7 +681,6 @@ void vmx_realmode(struct cpu_user_regs *
          curr->arch.hvm_vmx.real_mode_io_completed )
         realmode_emulate_one(&rm_ctxt);
 
-    intr_info = __vmread(VM_ENTRY_INTR_INFO);
     if ( intr_info & INTR_INFO_VALID_MASK )
     {
         realmode_deliver_exception((uint8_t)intr_info, 0, &rm_ctxt);

_______________________________________________
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®.