Changeset 45650 in vbox for trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
- Timestamp:
- Apr 19, 2013 5:19:29 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r45648 r45650 5941 5941 if (pMixedCtx->eflags.Bits.u1TF) /* We don't have any IA32_DEBUGCTL MSR for guests. Treat as all bits 0. */ 5942 5942 { 5943 /* This field is cleared on all VM-exits except (VMX_EXIT_TPR_BELOW_THRESHOLD, VMX_EXIT_APIC_WRITE, 5944 VMX_EXIT_VIRTUALIZED_EOI, VMX_EXIT_MTF). See Intel spec. 27.3.4 "Saving Non-Register State". */ 5945 rc2 = VMXWriteVmcsGstN(VMX_VMCS_GUEST_PENDING_DEBUG_EXCEPTIONS, VMX_VMCS_GUEST_DEBUG_EXCEPTIONS_BS); 5943 /* 5944 * The pending-debug exceptions field is cleared on all VM-exits except VMX_EXIT_TPR_BELOW_THRESHOLD, VMX_EXIT_MTF 5945 * VMX_EXIT_APIC_WRITE, VMX_EXIT_VIRTUALIZED_EOI. See Intel spec. 27.3.4 "Saving Non-Register State". 5946 */ 5947 #ifndef HMVMX_TRAP_ALL_EXCEPTIONS 5948 /* Don't intercept the #DB resulting from the pending-debug exception. */ 5949 pVCpu->hm.s.vmx.u32XcptBitmap &= ~RT_BIT(X86_XCPT_DB); 5950 rc2 = VMXWriteVmcs32(VMX_VMCS32_CTRL_EXCEPTION_BITMAP, pVCpu->hm.s.vmx.u32XcptBitmap); 5951 #endif 5952 rc2 |= VMXWriteVmcsGstN(VMX_VMCS_GUEST_PENDING_DEBUG_EXCEPTIONS, VMX_VMCS_GUEST_DEBUG_EXCEPTIONS_BS); 5946 5953 } 5947 5954 } … … 8509 8516 rc |= VMXWriteVmcsGstN(VMX_VMCS_GUEST_DR7, pMixedCtx->dr[7]); 8510 8517 AssertRCReturn(rc,rc); 8511 } 8512 8513 /* 8514 * If the #DB exception was meant for the guest, reflect it to the guest upon VM-reentry. If our hypervisor is 8515 * simultaneously single-stepping with the guest, return to the debugger but also reflect #DB to the guest upon VM-reentry. 8516 */ 8517 if ( rc == VINF_EM_RAW_GUEST_TRAP 8518 || rc == VINF_EM_DBG_STEPPED) 8519 { 8518 8520 8519 int rc2 = hmR0VmxReadExitIntrInfoVmcs(pVCpu, pVmxTransient); 8521 8520 rc2 |= hmR0VmxReadExitInstrLenVmcs(pVCpu, pVmxTransient); … … 8524 8523 hmR0VmxSetPendingEvent(pVCpu, VMX_VMCS_CTRL_ENTRY_IRQ_INFO_FROM_EXIT_INT_INFO(pVmxTransient->uExitIntrInfo), 8525 8524 pVmxTransient->cbInstr, pVmxTransient->uExitIntrErrorCode, 0 /* GCPtrFaultAddress */); 8526 if (rc == VINF_EM_RAW_GUEST_TRAP)8527 rc = VINF_SUCCESS;8528 } 8525 rc = VINF_SUCCESS; 8526 } 8527 8529 8528 return rc; 8530 8529 }
Note:
See TracChangeset
for help on using the changeset viewer.