direct-io.hg

changeset 10484:4105520841b3

[HVM][VMX] Safer treatment of VM_EXEC_CONTROL when dealing w/ PENDING_INTERRUPT vmexit.
Signed-off-by: George Dunlap <dunlapg@umich.edu>
author kaf24@firebug.cl.cam.ac.uk
date Tue Jun 27 09:41:09 2006 +0100 (2006-06-27)
parents 1e2ea40078f2
children 81bfa15a071e
files xen/arch/x86/hvm/vmx/vmx.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Tue Jun 27 09:33:35 2006 +0100
     1.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Tue Jun 27 09:41:09 2006 +0100
     1.3 @@ -2148,9 +2148,17 @@ asmlinkage void vmx_vmexit_handler(struc
     1.4          vmx_vmexit_do_extint(&regs);
     1.5          break;
     1.6      case EXIT_REASON_PENDING_INTERRUPT:
     1.7 +        /*
     1.8 +         * Not sure exactly what the purpose of this is.  The only bits set
     1.9 +         * and cleared at this point are CPU_BASED_VIRTUAL_INTR_PENDING.
    1.10 +         * (in io.c:{enable,disable}_irq_window().  So presumably we want to
    1.11 +         * set it to the original value...
    1.12 +         */
    1.13 +        v->arch.hvm_vcpu.u.vmx.exec_control &= ~CPU_BASED_VIRTUAL_INTR_PENDING;
    1.14 +        v->arch.hvm_vcpu.u.vmx.exec_control |=
    1.15 +            (MONITOR_CPU_BASED_EXEC_CONTROLS & CPU_BASED_VIRTUAL_INTR_PENDING);
    1.16          __vmwrite(CPU_BASED_VM_EXEC_CONTROL,
    1.17 -                  MONITOR_CPU_BASED_EXEC_CONTROLS);
    1.18 -        v->arch.hvm_vcpu.u.vmx.exec_control = MONITOR_CPU_BASED_EXEC_CONTROLS;
    1.19 +                  v->arch.hvm_vcpu.u.vmx.exec_control);
    1.20          break;
    1.21      case EXIT_REASON_TASK_SWITCH:
    1.22          __hvm_bug(&regs);