Changeset 82159 in vbox
- Timestamp:
- Nov 25, 2019 10:18:41 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r82026 r82159 5805 5805 * executing guest code so they'll trigger at the right time. 5806 5806 */ 5807 HMVMX_CPUMCTX_ASSERT(pVCpu, CPUMCTX_EXTRN_DR7); 5807 5808 if (pVCpu->cpum.GstCtx.dr[7] & (X86_DR7_ENABLED_MASK | X86_DR7_GD)) 5808 5809 { … … 8820 8821 AssertRC(rc); 8821 8822 } 8822 else if (pVCpu->cpum.GstCtx.eflags.u32 & X86_EFL_TF)8823 else 8823 8824 { 8824 8825 /* 8825 * We must not deliver a debug exception when single-stepping in the hypervisor debugger 8826 * using EFLAGS.T. Instead, clear interrupt inhibition. 8826 * We must not deliver a debug exception when single-stepping over STI/Mov-SS in the 8827 * hypervisor debugger using EFLAGS.TF but rather clear interrupt inhibition. However, 8828 * we take care of this case in hmR0VmxExportSharedDebugState and also the case if 8829 * we use MTF, so just make sure it's called before executing guest-code. 8827 8830 */ 8828 Assert(!(pVCpu->CTX_SUFF(pVM)->hm.s.vmx.Msrs.ProcCtls.n.allowed1 & VMX_PROC_CTLS_MONITOR_TRAP_FLAG)); 8829 fIntrState = 0; 8831 ASMAtomicUoOrU64(&pVCpu->hm.s.fCtxChanged, HM_CHANGED_GUEST_DR_MASK); 8830 8832 } 8831 8833 } … … 10828 10830 hmR0VmxReadAllRoFieldsVmcs(pVmxTransient); 10829 10831 #endif 10830 #if defined(HMVMX_ALWAYS_SYNC_FULL_GUEST_STATE) || defined(HMVMX_ALWAYS_SAVE_FULL_GUEST_STATE) 10831 rc = hmR0VmxImportGuestState(pVCpu, pVmcsInfo, HMVMX_CPUMCTX_EXTRN_ALL); 10832 AssertRC(rc); 10833 #elif defined(HMVMX_ALWAYS_SAVE_GUEST_RFLAGS) 10834 rc = hmR0VmxImportGuestState(pVCpu, pVmcsInfo, HMVMX_CPUMCTX_EXTRN_RFLAGS); 10835 AssertRC(rc); 10836 #else 10832 10837 10833 /* 10838 10834 * Import the guest-interruptibility state always as we need it while evaluating … … 10843 10839 * mode changes wrt CR0 are intercepted. 10844 10840 */ 10845 rc = hmR0VmxImportGuestState(pVCpu, pVmcsInfo, CPUMCTX_EXTRN_HM_VMX_INT_STATE); 10841 uint64_t const fImportMask = CPUMCTX_EXTRN_HM_VMX_INT_STATE 10842 #if defined(HMVMX_ALWAYS_SYNC_FULL_GUEST_STATE) || defined(HMVMX_ALWAYS_SAVE_FULL_GUEST_STATE) 10843 | HMVMX_CPUMCTX_EXTRN_ALL 10844 #elif defined(HMVMX_ALWAYS_SAVE_GUEST_RFLAGS) 10845 | CPUMCTX_EXTRN_RFLAGS 10846 #endif 10847 ; 10848 rc = hmR0VmxImportGuestState(pVCpu, pVmcsInfo, fImportMask); 10846 10849 AssertRC(rc); 10847 #endif10848 10850 10849 10851 /* … … 13740 13742 PCPUMCTX pCtx = &pVCpu->cpum.GstCtx; 13741 13743 if (!pVmxTransient->fIsNestedGuest) 13744 { 13742 13745 rc = DBGFRZTrap01Handler(pVCpu->CTX_SUFF(pVM), pVCpu, CPUMCTX2CORE(pCtx), uDR6, pVCpu->hm.s.fSingleInstruction); 13746 13747 /* 13748 * Prevents stepping twice over the same instruction when the guest is stepping using 13749 * EFLAGS.TF and the hypervisor debugger is stepping using MTF. 13750 * Testcase: DOSQEMM, break (using "ba x 1") at cs:rip 0x70:0x774 and step (using "t"). 13751 */ 13752 if ( rc == VINF_EM_DBG_STEPPED 13753 && (pVmxTransient->pVmcsInfo->u32ProcCtls & VMX_PROC_CTLS_MONITOR_TRAP_FLAG)) 13754 { 13755 Assert(pVCpu->hm.s.fSingleInstruction); 13756 rc = VINF_EM_RAW_GUEST_TRAP; 13757 } 13758 } 13743 13759 else 13744 13760 rc = VINF_EM_RAW_GUEST_TRAP;
Note:
See TracChangeset
for help on using the changeset viewer.