Changeset 90622 in vbox
- Timestamp:
- Aug 11, 2021 9:05:03 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r90379 r90622 1919 1919 PCCPUMCTX pCtx = &pVCpu->cpum.GstCtx; 1920 1920 1921 /** @todo Figure out stepping with nested-guest. */ 1922 if (CPUMIsGuestInSvmNestedHwVirtMode(pCtx)) 1923 { 1924 /* 1925 * We don't want to always intercept DRx read/writes for nested-guests as it causes 1926 * problems when the nested hypervisor isn't intercepting them, see @bugref{10080}. 1927 * Instead, they are strictly only requested when the nested hypervisor intercepts 1928 * them -- handled while merging VMCB controls. 1929 * 1930 * If neither the outer nor the nested-hypervisor is intercepting DRx read/writes, 1931 * then the nested-guest debug state should be actively loaded on the host so that 1932 * nested-guest reads/writes its own debug registers without causing VM-exits. 1933 */ 1934 if ( ( pVmcb->ctrl.u16InterceptRdDRx != 0xffff 1935 || pVmcb->ctrl.u16InterceptWrDRx != 0xffff) 1936 && !CPUMIsGuestDebugStateActive(pVCpu)) 1937 { 1938 CPUMR0LoadGuestDebugState(pVCpu, true /* include DR6 */); 1939 STAM_COUNTER_INC(&pVCpu->hm.s.StatDRxArmed); 1940 Assert(!CPUMIsHyperDebugStateActive(pVCpu)); 1941 Assert(CPUMIsGuestDebugStateActive(pVCpu)); 1942 } 1943 1944 pVmcb->guest.u64DR6 = pCtx->dr[6]; 1945 pVmcb->guest.u64DR7 = pCtx->dr[7]; 1946 return; 1947 } 1948 1921 1949 /* 1922 1950 * Anyone single stepping on the host side? If so, we'll have to use the … … 2222 2250 } 2223 2251 2224 /** @todo Figure out debugging with nested-guests, till then just intercept 2225 * all DR[0-15] accesses. */ 2226 pVmcbNstGstCtrl->u16InterceptRdDRx |= 0xffff; 2227 pVmcbNstGstCtrl->u16InterceptWrDRx |= 0xffff; 2252 /* Merge the guest's DR intercepts into the nested-guest VMCB. */ 2253 pVmcbNstGstCtrl->u16InterceptRdDRx |= pVmcb->ctrl.u16InterceptRdDRx; 2254 pVmcbNstGstCtrl->u16InterceptWrDRx |= pVmcb->ctrl.u16InterceptWrDRx; 2228 2255 2229 2256 /* … … 2635 2662 2636 2663 if (pVCpu->hm.s.fCtxChanged & HM_CHANGED_GUEST_DR_MASK) 2637 { 2638 /** @todo Figure out stepping with nested-guest. */ 2639 PCCPUMCTX pCtx = &pVCpu->cpum.GstCtx; 2640 if (!CPUMIsGuestInSvmNestedHwVirtMode(pCtx)) 2641 hmR0SvmExportSharedDebugState(pVCpu, pVmcb); 2642 else 2643 { 2644 pVmcb->guest.u64DR6 = pCtx->dr[6]; 2645 pVmcb->guest.u64DR7 = pCtx->dr[7]; 2646 } 2647 } 2664 hmR0SvmExportSharedDebugState(pVCpu, pVmcb); 2648 2665 2649 2666 pVCpu->hm.s.fCtxChanged &= ~HM_CHANGED_GUEST_DR_MASK; … … 4213 4230 VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_EXEC); /* Indicate the start of guest execution. */ 4214 4231 4215 PVMCC pVM 4232 PVMCC pVM = pVCpu->CTX_SUFF(pVM); 4216 4233 PSVMVMCB pVmcb = pSvmTransient->pVmcb; 4217 4234
Note:
See TracChangeset
for help on using the changeset viewer.