- Timestamp:
- Aug 12, 2013 2:03:08 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r47671 r47673 3380 3380 } 3381 3381 /* 3382 * If no debugging enabled, we'll lazy load DR0-3. 3382 * If no debugging enabled, we'll lazy load DR0-3. Unlike on AMD-V, we 3383 * must intercept #DB in order to maintain a correct DR6 guest value. 3383 3384 */ 3384 3385 else if (!CPUMIsGuestDebugStateActive(pVCpu)) 3386 { 3385 3387 fInterceptMovDRx = true; 3388 fInterceptDB = true; 3389 } 3386 3390 3387 3391 rc = VMXWriteVmcs32(VMX_VMCS_GUEST_DR7, pMixedCtx->dr[7]); … … 6037 6041 6038 6042 /* Restore host debug registers if necessary and resync on next R0 reentry. */ 6039 if (CPUMIsGuestDebugStateActive(pVCpu)) 6040 { 6041 CPUMR0DebugStateMaybeSaveGuestAndRestoreHost(pVCpu, false /* save DR6 */); 6043 #ifdef VBOX_STRICT 6044 if (CPUMIsHyperDebugStateActive(pVCpu)) 6045 Assert(pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_MOV_DR_EXIT); 6046 #endif 6047 if (CPUMR0DebugStateMaybeSaveGuestAndRestoreHost(pVCpu, true /* save DR6 */)) 6042 6048 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_DEBUG; 6043 }6044 else if (CPUMIsHyperDebugStateActive(pVCpu))6045 {6046 CPUMR0DebugStateMaybeSaveGuestAndRestoreHost(pVCpu, false /* save DR6 */);6047 Assert(pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_MOV_DR_EXIT);6048 }6049 6049 Assert(!CPUMIsGuestDebugStateActive(pVCpu)); 6050 6050 Assert(!CPUMIsHyperDebugStateActive(pVCpu)); … … 9373 9373 && !CPUMIsHyperDebugStateActive(pVCpu)) 9374 9374 { 9375 /* Don't intercept MOV DRx . */9375 /* Don't intercept MOV DRx and #DB any more. */ 9376 9376 pVCpu->hm.s.vmx.u32ProcCtls &= ~VMX_VMCS_CTRL_PROC_EXEC_MOV_DR_EXIT; 9377 9377 rc = VMXWriteVmcs32(VMX_VMCS32_CTRL_PROC_EXEC, pVCpu->hm.s.vmx.u32ProcCtls); 9378 9378 AssertRCReturn(rc, rc); 9379 9380 if (!pVCpu->hm.s.vmx.RealMode.fRealOnV86Active) 9381 { 9382 #ifndef HMVMX_ALWAYS_TRAP_ALL_XCPTS 9383 pVCpu->hm.s.vmx.u32XcptBitmap &= ~RT_BIT(X86_XCPT_DB); 9384 rc = VMXWriteVmcs32(VMX_VMCS32_CTRL_EXCEPTION_BITMAP, pVCpu->hm.s.vmx.u32XcptBitmap); 9385 AssertRCReturn(rc, rc); 9386 #endif 9387 } 9379 9388 9380 9389 /* Save the host & load the guest debug state, restart execution of the MOV DRx instruction. */ … … 9621 9630 HMVMX_VALIDATE_EXIT_XCPT_HANDLER_PARAMS(); 9622 9631 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitGuestDB); 9632 Log6(("XcptDB\n")); 9623 9633 9624 9634 /*
Note:
See TracChangeset
for help on using the changeset viewer.