ia64/xen-unstable

changeset 16957:af5d189df051

vmx realmode: Exception delivery clears interrupt shadow.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jan 31 13:01:08 2008 +0000 (2008-01-31)
parents 938446025b5b
children f3b418afc6be
files xen/arch/x86/hvm/vmx/realmode.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/realmode.c	Thu Jan 31 11:05:14 2008 +0000
     1.2 +++ b/xen/arch/x86/hvm/vmx/realmode.c	Thu Jan 31 13:01:08 2008 +0000
     1.3 @@ -109,6 +109,13 @@ static void realmode_deliver_exception(
     1.4      csr->base = (uint32_t)csr->sel << 4;
     1.5      regs->eip = (uint16_t)cs_eip;
     1.6      regs->eflags &= ~(X86_EFLAGS_TF | X86_EFLAGS_IF | X86_EFLAGS_RF);
     1.7 +
     1.8 +    /* Exception delivery clears STI and MOV-SS blocking. */
     1.9 +    if ( rm_ctxt->intr_shadow & (VMX_INTR_SHADOW_STI|VMX_INTR_SHADOW_MOV_SS) )
    1.10 +    {
    1.11 +        rm_ctxt->intr_shadow &= ~(VMX_INTR_SHADOW_STI|VMX_INTR_SHADOW_MOV_SS);
    1.12 +        __vmwrite(GUEST_INTERRUPTIBILITY_INFO, rm_ctxt->intr_shadow);
    1.13 +    }
    1.14  }
    1.15  
    1.16  static int
    1.17 @@ -655,7 +662,7 @@ void vmx_realmode(struct cpu_user_regs *
    1.18  {
    1.19      struct vcpu *curr = current;
    1.20      struct realmode_emulate_ctxt rm_ctxt;
    1.21 -    unsigned long intr_info;
    1.22 +    unsigned long intr_info = __vmread(VM_ENTRY_INTR_INFO);
    1.23      int i;
    1.24  
    1.25      rm_ctxt.ctxt.regs = regs;
    1.26 @@ -674,7 +681,6 @@ void vmx_realmode(struct cpu_user_regs *
    1.27           curr->arch.hvm_vmx.real_mode_io_completed )
    1.28          realmode_emulate_one(&rm_ctxt);
    1.29  
    1.30 -    intr_info = __vmread(VM_ENTRY_INTR_INFO);
    1.31      if ( intr_info & INTR_INFO_VALID_MASK )
    1.32      {
    1.33          realmode_deliver_exception((uint8_t)intr_info, 0, &rm_ctxt);