VirtualBox

Ignore:
Timestamp:
Jan 21, 2021 11:42:23 AM (4 years ago)
Author:
vboxsync
Message:

VMM/CPUM: Dropped the fForceHyper parameter of CPUMRecalcHyperDRx. It seems to stem from some confusion in the HM implementation about how to handle DRx registers. The DBGF breakpoints shall always take precedence over the guest ones.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp

    r87345 r87346  
    10801080{
    10811081    pVCpu->cpum.s.Guest.dr[0] = uDr0;
    1082     return CPUMRecalcHyperDRx(pVCpu, 0, false);
     1082    return CPUMRecalcHyperDRx(pVCpu, 0);
    10831083}
    10841084
     
    10871087{
    10881088    pVCpu->cpum.s.Guest.dr[1] = uDr1;
    1089     return CPUMRecalcHyperDRx(pVCpu, 1, false);
     1089    return CPUMRecalcHyperDRx(pVCpu, 1);
    10901090}
    10911091
     
    10941094{
    10951095    pVCpu->cpum.s.Guest.dr[2] = uDr2;
    1096     return CPUMRecalcHyperDRx(pVCpu, 2, false);
     1096    return CPUMRecalcHyperDRx(pVCpu, 2);
    10971097}
    10981098
     
    11011101{
    11021102    pVCpu->cpum.s.Guest.dr[3] = uDr3;
    1103     return CPUMRecalcHyperDRx(pVCpu, 3, false);
     1103    return CPUMRecalcHyperDRx(pVCpu, 3);
    11041104}
    11051105
     
    11171117    pVCpu->cpum.s.Guest.dr[7] = uDr7;
    11181118    pVCpu->cpum.s.Guest.fExtrn &= ~CPUMCTX_EXTRN_DR7;
    1119     return CPUMRecalcHyperDRx(pVCpu, 7, false);
     1119    return CPUMRecalcHyperDRx(pVCpu, 7);
    11201120}
    11211121
     
    11281128        iReg += 2;
    11291129    pVCpu->cpum.s.Guest.dr[iReg] = Value;
    1130     return CPUMRecalcHyperDRx(pVCpu, iReg, false);
     1130    return CPUMRecalcHyperDRx(pVCpu, iReg);
    11311131}
    11321132
     
    11591159 * @param   iGstReg     The guest debug register number that was modified.
    11601160 *                      UINT8_MAX if not guest register.
    1161  * @param   fForceHyper Used in HM to force hyper registers because of single
    1162  *                      stepping.
    1163  */
    1164 VMMDECL(int) CPUMRecalcHyperDRx(PVMCPUCC pVCpu, uint8_t iGstReg, bool fForceHyper)
     1161 */
     1162VMMDECL(int) CPUMRecalcHyperDRx(PVMCPUCC pVCpu, uint8_t iGstReg)
    11651163{
    11661164    PVM pVM = pVCpu->CTX_SUFF(pVM);
     
    11871185
    11881186    const RTGCUINTREG uDbgfDr7 = DBGFBpGetDR7(pVM);
    1189 
    1190     /** @todo r=bird: I'm totally confused by fForceHyper! */
    1191 #ifdef IN_RING0
    1192     if (!fForceHyper && (pVCpu->cpum.s.fUseFlags & CPUM_USED_DEBUG_REGS_HYPER))
    1193         fForceHyper = true;
    1194 #endif
    1195     if ((!fForceHyper ? uDbgfDr7 : (uGstDr7 | uDbgfDr7)) & X86_DR7_ENABLED_MASK)
     1187    if ((uGstDr7 | uDbgfDr7) & X86_DR7_ENABLED_MASK)
    11961188    {
    11971189        Assert(!CPUMIsGuestDebugStateActive(pVCpu));
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette