]> xenbits.xensource.com Git - people/aperard/xen-arm.git/commitdiff
nested vmx: fix DR access VM exit
authorDongxiao Xu <dongxiao.xu@intel.com>
Thu, 6 Dec 2012 16:56:49 +0000 (16:56 +0000)
committerDongxiao Xu <dongxiao.xu@intel.com>
Thu, 6 Dec 2012 16:56:49 +0000 (16:56 +0000)
For DR register, we use lazy restore mechanism when access
it. Therefore when receiving such VM exit, L0 should be responsible to
switch to the right DR values, then inject to L1 hypervisor.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Keir Fraser <keir@xen.org>
xen/arch/x86/hvm/vmx/vvmx.c

index dab955135898f03d4634cf3d859cec80aa0a6030..02a70522347baabe21d4699f1d1bcbaca111961e 100644 (file)
@@ -1641,7 +1641,8 @@ int nvmx_n2_vmexit_handler(struct cpu_user_regs *regs,
         break;
     case EXIT_REASON_DR_ACCESS:
         ctrl = __n2_exec_control(v);
-        if ( ctrl & CPU_BASED_MOV_DR_EXITING )
+        if ( (ctrl & CPU_BASED_MOV_DR_EXITING) &&
+            v->arch.hvm_vcpu.flag_dr_dirty )
             nvcpu->nv_vmexit_pending = 1;
         break;
     case EXIT_REASON_INVLPG: