- Timestamp:
- Nov 14, 2013 12:56:30 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 90629
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r49407 r49478 6870 6870 6871 6871 /* Delivery pending debug exception if the guest is single-stepping. Evaluate and set the BS bit. */ 6872 int rc2 = VINF_SUCCESS; 6873 if ( fBlockSti 6874 || fBlockMovSS) 6875 { 6876 if ( !pVCpu->hm.s.fSingleInstruction 6877 && !DBGFIsStepping(pVCpu)) 6878 { 6879 Assert(pVCpu->hm.s.vmx.fUpdatedGuestState & HMVMX_UPDATED_GUEST_RFLAGS); 6880 if (pMixedCtx->eflags.Bits.u1TF) /* We don't have any IA32_DEBUGCTL MSR for guests. Treat as all bits 0. */ 6881 { 6882 /* 6883 * The pending-debug exceptions field is cleared on all VM-exits except VMX_EXIT_TPR_BELOW_THRESHOLD, 6884 * VMX_EXIT_MTF, VMX_EXIT_APIC_WRITE and VMX_EXIT_VIRTUALIZED_EOI. 6885 * See Intel spec. 27.3.4 "Saving Non-Register State". 6886 */ 6887 rc2 = VMXWriteVmcs32(VMX_VMCS_GUEST_PENDING_DEBUG_EXCEPTIONS, VMX_VMCS_GUEST_DEBUG_EXCEPTIONS_BS); 6888 AssertRCReturn(rc, rc); 6889 } 6890 } 6891 else 6892 { 6893 /* We are single-stepping in the hypervisor debugger, clear interrupt inhibition as setting the BS bit would mean 6894 delivering a #DB to the guest upon VM-entry when it shouldn't be. */ 6895 uIntrState = 0; 6896 } 6872 if ( !pVCpu->hm.s.fSingleInstruction 6873 && !DBGFIsStepping(pVCpu)) 6874 { 6875 int rc2 = hmR0VmxSaveGuestRflags(pVCpu, pMixedCtx); 6876 AssertRCReturn(rc2, rc2); 6877 if (pMixedCtx->eflags.Bits.u1TF) /* We don't have any IA32_DEBUGCTL MSR for guests. Treat as all bits 0. */ 6878 { 6879 /* 6880 * The pending-debug exceptions field is cleared on all VM-exits except VMX_EXIT_TPR_BELOW_THRESHOLD, 6881 * VMX_EXIT_MTF, VMX_EXIT_APIC_WRITE and VMX_EXIT_VIRTUALIZED_EOI. 6882 * See Intel spec. 27.3.4 "Saving Non-Register State". 6883 */ 6884 rc2 = VMXWriteVmcs32(VMX_VMCS_GUEST_PENDING_DEBUG_EXCEPTIONS, VMX_VMCS_GUEST_DEBUG_EXCEPTIONS_BS); 6885 AssertRCReturn(rc2, rc2); 6886 } 6887 } 6888 else 6889 { 6890 /* We are single-stepping in the hypervisor debugger, clear interrupt inhibition as setting the BS bit would mean 6891 delivering a #DB to the guest upon VM-entry when it shouldn't be. */ 6892 uIntrState = 0; 6897 6893 } 6898 6894 … … 6901 6897 * VT-x clears the valid bit on every VM-exit. See Intel spec. 24.8.3 "VM-Entry Controls for Event Injection". 6902 6898 */ 6903 rc2 = hmR0VmxLoadGuestIntrState(pVCpu, uIntrState);6899 int rc2 = hmR0VmxLoadGuestIntrState(pVCpu, uIntrState); 6904 6900 AssertRC(rc2); 6905 6901
Note:
See TracChangeset
for help on using the changeset viewer.