Changeset 47714 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Aug 13, 2013 11:43:24 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 87953
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r47706 r47714 2157 2157 { 2158 2158 pVCpu->cpum.s.Guest.dr[0] = uDr0; 2159 return CPUMRecalcHyperDRx(pVCpu, 0 );2159 return CPUMRecalcHyperDRx(pVCpu, 0, false); 2160 2160 } 2161 2161 … … 2164 2164 { 2165 2165 pVCpu->cpum.s.Guest.dr[1] = uDr1; 2166 return CPUMRecalcHyperDRx(pVCpu, 1 );2166 return CPUMRecalcHyperDRx(pVCpu, 1, false); 2167 2167 } 2168 2168 … … 2171 2171 { 2172 2172 pVCpu->cpum.s.Guest.dr[2] = uDr2; 2173 return CPUMRecalcHyperDRx(pVCpu, 2 );2173 return CPUMRecalcHyperDRx(pVCpu, 2, false); 2174 2174 } 2175 2175 … … 2178 2178 { 2179 2179 pVCpu->cpum.s.Guest.dr[3] = uDr3; 2180 return CPUMRecalcHyperDRx(pVCpu, 3 );2180 return CPUMRecalcHyperDRx(pVCpu, 3, false); 2181 2181 } 2182 2182 … … 2192 2192 { 2193 2193 pVCpu->cpum.s.Guest.dr[7] = uDr7; 2194 return CPUMRecalcHyperDRx(pVCpu, 7 );2194 return CPUMRecalcHyperDRx(pVCpu, 7, false); 2195 2195 } 2196 2196 … … 2203 2203 iReg += 2; 2204 2204 pVCpu->cpum.s.Guest.dr[iReg] = Value; 2205 return CPUMRecalcHyperDRx(pVCpu, iReg );2205 return CPUMRecalcHyperDRx(pVCpu, iReg, false); 2206 2206 } 2207 2207 … … 2234 2234 * @param iGstReg The guest debug register number that was modified. 2235 2235 * UINT8_MAX if not guest register. 2236 */ 2237 VMMDECL(int) CPUMRecalcHyperDRx(PVMCPU pVCpu, uint8_t iGstReg) 2236 * @param fForceHyper Used in HM to force hyper registers because of single 2237 * stepping. 2238 */ 2239 VMMDECL(int) CPUMRecalcHyperDRx(PVMCPU pVCpu, uint8_t iGstReg, bool fForceHyper) 2238 2240 { 2239 2241 PVM pVM = pVCpu->CTX_SUFF(pVM); … … 2256 2258 2257 2259 const RTGCUINTREG uDbgfDr7 = DBGFBpGetDR7(pVM); 2258 if ((HMIsEnabled(pVCpu->CTX_SUFF(pVM)) ? uDbgfDr7 : (uGstDr7 | uDbgfDr7)) & X86_DR7_ENABLED_MASK) 2260 2261 #ifdef IN_RING0 2262 if (!fForceHyper && (pVCpu->cpum.s.fUseFlags & CPUM_USED_DEBUG_REGS_HYPER)) 2263 fForceHyper = true; 2264 #endif 2265 if (( HMIsEnabled(pVCpu->CTX_SUFF(pVM)) && !fForceHyper ? uDbgfDr7 : (uGstDr7 | uDbgfDr7)) & X86_DR7_ENABLED_MASK) 2259 2266 { 2260 2267 Assert(!CPUMIsGuestDebugStateActive(pVCpu)); … … 2426 2433 * No active debug state any more. In raw-mode this means we have to 2427 2434 * make sure DR7 has everything disabled now, if we armed it already. 2428 * 2429 * In the ring-0 this only happens when we decided to lazy load the 2430 * debug state because it wasn't active, and that didn't change with 2431 * the latest changes, so nothing to do here. 2435 * In ring-0 we might end up here when just single stepping. 2432 2436 */ 2433 #if defined(IN_RC) 2437 #if defined(IN_RC) || defined(IN_RING0) 2434 2438 if (pVCpu->cpum.s.fUseFlags & CPUM_USED_DEBUG_REGS_HYPER) 2435 2439 { 2440 # ifdef IN_RC 2436 2441 ASMSetDR7(X86_DR7_INIT_VAL); 2442 # endif 2437 2443 if (pVCpu->cpum.s.Hyper.dr[0]) 2438 2444 ASMSetDR0(0); … … 2445 2451 pVCpu->cpum.s.fUseFlags &= ~CPUM_USED_DEBUG_REGS_HYPER; 2446 2452 } 2447 2448 #elif defined(IN_RING0)2449 Assert(!CPUMIsHyperDebugStateActive(pVCpu)); /* (can only change while in ring-3) */2450 2453 #endif 2451 2454 pVCpu->cpum.s.fUseFlags &= ~CPUM_USE_DEBUG_REGS_HYPER; -
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r47700 r47714 1413 1413 /* Recheck the guest DRx values in raw-mode. */ 1414 1414 for (VMCPUID iCpu = 0; iCpu < pVM->cCpus; iCpu++) 1415 CPUMRecalcHyperDRx(&pVM->aCpus[iCpu], UINT8_MAX );1415 CPUMRecalcHyperDRx(&pVM->aCpus[iCpu], UINT8_MAX, false); 1416 1416 } 1417 1417 -
trunk/src/VBox/VMM/VMMR3/DBGFBp.cpp
r47660 r47714 566 566 { 567 567 NOREF(pVM); NOREF(pvUser); 568 return CPUMRecalcHyperDRx(pVCpu, UINT8_MAX );568 return CPUMRecalcHyperDRx(pVCpu, UINT8_MAX, false); 569 569 } 570 570
Note:
See TracChangeset
for help on using the changeset viewer.