Changeset 47328 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Jul 22, 2013 10:50:49 PM (12 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r47242 r47328 2202 2202 * Straight forward code, not optimized/minimized in any way. 2203 2203 */ 2204 RTGCUINTREG uNewDr7 = X86_DR7_GE | X86_DR7_LE | X86_DR7_ MB1_MASK;2204 RTGCUINTREG uNewDr7 = X86_DR7_GE | X86_DR7_LE | X86_DR7_RA1_MASK; 2205 2205 2206 2206 /* bp 0 */ -
trunk/src/VBox/VMM/VMMAll/DBGFAll.cpp
r44528 r47328 35 35 VMM_INT_DECL(RTGCUINTREG) DBGFBpGetDR7(PVM pVM) 36 36 { 37 RTGCUINTREG uDr7 = X86_DR7_GD | X86_DR7_GE | X86_DR7_LE | X86_DR7_ MB1_MASK;37 RTGCUINTREG uDr7 = X86_DR7_GD | X86_DR7_GE | X86_DR7_LE | X86_DR7_RA1_MASK; 38 38 PDBGFBP pBp = &pVM->dbgf.s.aHwBreakpoints[0]; 39 39 unsigned cLeft = RT_ELEMENTS(pVM->dbgf.s.aHwBreakpoints); -
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r47327 r47328 8460 8460 CHECK_FIELD(dr[3]); 8461 8461 CHECK_FIELD(dr[6]); 8462 if ((pOrgCtx->dr[7] & ~X86_DR7_ MB1_MASK) != (pDebugCtx->dr[7] & ~X86_DR7_MB1_MASK)) /* REM 'mov drX,greg' bug.*/8462 if ((pOrgCtx->dr[7] & ~X86_DR7_RA1_MASK) != (pDebugCtx->dr[7] & ~X86_DR7_RA1_MASK)) /* REM 'mov drX,greg' bug.*/ 8463 8463 CHECK_FIELD(dr[7]); 8464 8464 CHECK_FIELD(gdtr.cbGdt); -
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r47327 r47328 3836 3836 case 4: 3837 3837 drX = pCtx->dr[6]; 3838 drX &= ~RT_BIT_32(12);3839 drX |= UINT32_C(0xffff0ff0);3838 drX |= X86_DR6_RA1_MASK; 3839 drX &= ~X86_DR6_RAZ_MASK; 3840 3840 break; 3841 3841 case 7: 3842 3842 case 5: 3843 3843 drX = pCtx->dr[7]; 3844 drX &= ~(RT_BIT_32(11) | RT_BIT_32(12) | RT_BIT_32(14) | RT_BIT_32(15));3845 drX |= RT_BIT_32(10);3844 drX |=X86_DR7_RA1_MASK; 3845 drX &= ~X86_DR7_RAZ_MASK; 3846 3846 break; 3847 3847 IEM_NOT_REACHED_DEFAULT_CASE_RET(); /* call checks */ … … 3875 3875 Assert(!pCtx->eflags.Bits.u1VM); 3876 3876 3877 if ( (iDrReg == 4 || iDrReg == 5) 3878 && (pCtx->cr4 & X86_CR4_DE) ) 3879 { 3880 Log(("mov dr%u,r%u: CR4.DE=1 -> #GP(0)\n", iDrReg, iGReg)); 3881 return iemRaiseGeneralProtectionFault0(pIemCpu); 3877 if (iDrReg == 4 || iDrReg == 5) 3878 { 3879 if (pCtx->cr4 & X86_CR4_DE) 3880 { 3881 Log(("mov dr%u,r%u: CR4.DE=1 -> #GP(0)\n", iDrReg, iGReg)); 3882 return iemRaiseGeneralProtectionFault0(pIemCpu); 3883 } 3884 iDrReg += 2; 3882 3885 } 3883 3886 … … 3913 3916 3914 3917 case 6: 3915 case 4: 3916 if (uNewDrX & UINT64_C(0xffffffff00000000)) 3918 if (uNewDrX & X86_DR6_MBZ_MASK) 3917 3919 { 3918 3920 Log(("mov dr%u,%#llx: DR6 high bits are not zero -> #GP(0)\n", iDrReg, uNewDrX)); 3919 3921 return iemRaiseGeneralProtectionFault0(pIemCpu); 3920 3922 } 3921 uNewDrX &= ~RT_BIT_32(12);3922 uNewDrX |= UINT32_C(0xffff0ff0);3923 uNewDrX |= X86_DR6_RA1_MASK; 3924 uNewDrX &= ~X86_DR6_RAZ_MASK; 3923 3925 break; 3924 3926 3925 3927 case 7: 3926 case 5: 3927 if (uNewDrX & UINT64_C(0xffffffff00000000)) 3928 if (uNewDrX & X86_DR7_MBZ_MASK) 3928 3929 { 3929 3930 Log(("mov dr%u,%#llx: DR7 high bits are not zero -> #GP(0)\n", iDrReg, uNewDrX)); 3930 3931 return iemRaiseGeneralProtectionFault0(pIemCpu); 3931 3932 } 3932 uNewDrX &= ~(RT_BIT_32(11) | RT_BIT_32(12) | RT_BIT_32(14) | RT_BIT_32(15));3933 uNewDrX |= RT_BIT_32(10);3933 uNewDrX |= X86_DR7_RA1_MASK; 3934 uNewDrX &= ~X86_DR7_RAZ_MASK; 3934 3935 break; 3935 3936
Note:
See TracChangeset
for help on using the changeset viewer.