Changeset 90593 in vbox
- Timestamp:
- Aug 10, 2021 10:37:27 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 146204
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r90379 r90593 6080 6080 AssertRC(rc); 6081 6081 6082 /* Always intercept Mov DRx accesses for the nested-guest for now. */ 6083 pVmcsInfo->u32ProcCtls |= VMX_PROC_CTLS_MOV_DR_EXIT; 6084 rc = VMXWriteVmcs32(VMX_VMCS32_CTRL_PROC_EXEC, pVmcsInfo->u32ProcCtls); 6085 AssertRC(rc); 6082 /* 6083 * We don't want to always intercept MOV DRx for nested-guests as it causes 6084 * problems when the nested hypervisor isn't intercepting them, see @bugref{10080}. 6085 * Instead, they are strictly only requested when the nested hypervisor intercepts 6086 * them -- handled while merging VMCS controls. 6087 * 6088 * If neither the outer nor the nested-hypervisor is intercepting MOV DRx, 6089 * then the guest debug state should be actively loaded on the host so that 6090 * nested-guest reads its own debug registers without causing VM-exits. 6091 */ 6092 if ( !(pVmcsInfo->u32ProcCtls & VMX_PROC_CTLS_MOV_DR_EXIT) 6093 && !CPUMIsGuestDebugStateActive(pVCpu)) 6094 CPUMR0LoadGuestDebugState(pVCpu, true /* include DR6 */); 6086 6095 return VINF_SUCCESS; 6087 6096 } … … 10452 10461 | (pVmcsInfoGst->u32ProcCtls & ~( VMX_PROC_CTLS_INT_WINDOW_EXIT 10453 10462 | VMX_PROC_CTLS_NMI_WINDOW_EXIT 10463 | VMX_PROC_CTLS_MOV_DR_EXIT 10454 10464 | VMX_PROC_CTLS_USE_TPR_SHADOW 10455 10465 | VMX_PROC_CTLS_MONITOR_TRAP_FLAG)); … … 10820 10830 * guest to cause a VM-exit the next time they are ready to receive the event. 10821 10831 * 10822 * With nested-guests, evaluating pending events may cause VM-exits. Also, verify 10823 * that the event in TRPM that we will inject using hardware-assisted VMX is -not- 10824 * subject to interecption. Otherwise, we should have checked and injected them 10825 * manually elsewhere (IEM). 10832 * For nested-guests, verify that the TRPM event that we're about to inject using 10833 * hardware-assisted VMX is -not- subject to nested-hypervisor interception. 10834 * Otherwise, we should have checked and injected them manually elsewhere (IEM). 10826 10835 */ 10827 10836 if (TRPMHasTrap(pVCpu)) … … 11303 11312 11304 11313 Assert(VMMRZCallRing3IsEnabled(pVCpu)); 11314 Assert( pVmxTransient->fWasGuestDebugStateActive == false 11315 || pVmxTransient->fWasHyperDebugStateActive == false); 11305 11316 return; 11306 11317 } … … 16135 16146 PVMXVMCSINFO pVmcsInfo = pVmxTransient->pVmcsInfo; 16136 16147 16137 /* We might get this VM-exit if the nested-guest is not intercepting MOV DRx accesses. */ 16148 /* 16149 * We might also get this VM-exit if the nested-guest isn't intercepting MOV DRx accesses. 16150 * In such a case, rather than disabling MOV DRx intercepts and resuming execution, we 16151 * must emulate the MOV DRx access. 16152 */ 16138 16153 if (!pVmxTransient->fIsNestedGuest) 16139 16154 {
Note:
See TracChangeset
for help on using the changeset viewer.