- Timestamp:
- Jun 14, 2012 11:04:57 PM (13 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Disassembler/DisasmCore.cpp
r41727 r41728 743 743 { 744 744 pCpu->prefix &= ~DISPREFIX_LOCK; 745 pParam->base.reg_ctrl = USE_REG_CR8;745 pParam->base.reg_ctrl = DISCREG_CR8; 746 746 } 747 747 else -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r40235 r41728 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 1265 1265 { 1266 1266 uint64_t u64; 1267 int rc = CPUMGetGuestCRx(pVCpu, USE_REG_CR8, &u64);1267 int rc = CPUMGetGuestCRx(pVCpu, DISCREG_CR8, &u64); 1268 1268 if (RT_FAILURE(rc)) 1269 1269 u64 = 0; … … 1348 1348 switch (iReg) 1349 1349 { 1350 case USE_REG_CR0:1350 case DISCREG_CR0: 1351 1351 *pValue = pVCpu->cpum.s.Guest.cr0; 1352 1352 break; 1353 1353 1354 case USE_REG_CR2:1354 case DISCREG_CR2: 1355 1355 *pValue = pVCpu->cpum.s.Guest.cr2; 1356 1356 break; 1357 1357 1358 case USE_REG_CR3:1358 case DISCREG_CR3: 1359 1359 *pValue = pVCpu->cpum.s.Guest.cr3; 1360 1360 break; 1361 1361 1362 case USE_REG_CR4:1362 case DISCREG_CR4: 1363 1363 *pValue = pVCpu->cpum.s.Guest.cr4; 1364 1364 break; 1365 1365 1366 case USE_REG_CR8:1366 case DISCREG_CR8: 1367 1367 { 1368 1368 uint8_t u8Tpr; … … 1423 1423 VMMDECL(int) CPUMGetGuestDRx(PVMCPU pVCpu, uint32_t iReg, uint64_t *pValue) 1424 1424 { 1425 AssertReturn(iReg <= USE_REG_DR7, VERR_INVALID_PARAMETER);1425 AssertReturn(iReg <= DISDREG_DR7, VERR_INVALID_PARAMETER); 1426 1426 /* DR4 is an alias for DR6, and DR5 is an alias for DR7. */ 1427 1427 if (iReg == 4 || iReg == 5) … … 1970 1970 VMMDECL(int) CPUMSetGuestDRx(PVMCPU pVCpu, uint32_t iReg, uint64_t Value) 1971 1971 { 1972 AssertReturn(iReg <= USE_REG_DR7, VERR_INVALID_PARAMETER);1972 AssertReturn(iReg <= DISDREG_DR7, VERR_INVALID_PARAMETER); 1973 1973 /* DR4 is an alias for DR6, and DR5 is an alias for DR7. */ 1974 1974 if (iReg == 4 || iReg == 5) -
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r41727 r41728 2209 2209 switch (DestRegCrx) 2210 2210 { 2211 case USE_REG_CR0:2211 case DISCREG_CR0: 2212 2212 oldval = CPUMGetGuestCR0(pVCpu); 2213 2213 #ifdef IN_RC … … 2262 2262 return rc2 == VINF_SUCCESS ? rc : rc2; 2263 2263 2264 case USE_REG_CR2:2264 case DISCREG_CR2: 2265 2265 rc = CPUMSetGuestCR2(pVCpu, val); AssertRC(rc); 2266 2266 return VINF_SUCCESS; 2267 2267 2268 case USE_REG_CR3:2268 case DISCREG_CR3: 2269 2269 /* Reloading the current CR3 means the guest just wants to flush the TLBs */ 2270 2270 rc = CPUMSetGuestCR3(pVCpu, val); AssertRC(rc); … … 2277 2277 return rc; 2278 2278 2279 case USE_REG_CR4:2279 case DISCREG_CR4: 2280 2280 oldval = CPUMGetGuestCR4(pVCpu); 2281 2281 rc = CPUMSetGuestCR4(pVCpu, val); AssertRC(rc); … … 2315 2315 return rc2 == VINF_SUCCESS ? rc : rc2; 2316 2316 2317 case USE_REG_CR8:2317 case DISCREG_CR8: 2318 2318 return PDMApicSetTPR(pVCpu, val << 4); /* cr8 bits 3-0 correspond to bits 7-4 of the task priority mmio register. */ 2319 2319 2320 2320 default: 2321 2321 AssertFailed(); 2322 case USE_REG_CR1: /* illegal op */2322 case DISCREG_CR1: /* illegal op */ 2323 2323 break; 2324 2324 } … … 2377 2377 | (u16Data & (X86_CR0_PE | X86_CR0_MP | X86_CR0_EM | X86_CR0_TS)); 2378 2378 2379 return emUpdateCRx(pVM, pVCpu, pRegFrame, USE_REG_CR0, NewCr0);2379 return emUpdateCRx(pVM, pVCpu, pRegFrame, DISCREG_CR0, NewCr0); 2380 2380 } 2381 2381 -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r41727 r41728 4169 4169 Assert( !pVM->hwaccm.s.fNestedPaging 4170 4170 || !CPUMIsGuestInPagedProtectedModeEx(pCtx) 4171 || VMX_EXIT_QUALIFICATION_CRX_REGISTER(exitQualification) != USE_REG_CR3);4171 || VMX_EXIT_QUALIFICATION_CRX_REGISTER(exitQualification) != DISCREG_CR3); 4172 4172 4173 4173 /* CR8 reads only cause an exit when the TPR shadow feature isn't present. */ -
trunk/src/VBox/VMM/VMMR3/EMRaw.cpp
r41727 r41728 994 994 //read 995 995 Assert(Cpu.param2.fUse & DISUSE_REG_CR); 996 Assert(Cpu.param2.base.reg_ctrl <= USE_REG_CR4);996 Assert(Cpu.param2.base.reg_ctrl <= DISCREG_CR4); 997 997 STAM_COUNTER_INC(&pStats->StatMovReadCR[Cpu.param2.base.reg_ctrl]); 998 998 } … … 1001 1001 //write 1002 1002 Assert(Cpu.param1.fUse & DISUSE_REG_CR); 1003 Assert(Cpu.param1.base.reg_ctrl <= USE_REG_CR4);1003 Assert(Cpu.param1.base.reg_ctrl <= DISCREG_CR4); 1004 1004 STAM_COUNTER_INC(&pStats->StatMovWriteCR[Cpu.param1.base.reg_ctrl]); 1005 1005 } -
trunk/src/VBox/VMM/VMMR3/PATMPatch.cpp
r41727 r41728 1151 1151 { 1152 1152 int rc = VINF_SUCCESS; 1153 intreg, mod, rm, dbgreg;1153 unsigned reg, mod, rm, dbgreg; 1154 1154 uint32_t offset; 1155 1155 … … 1183 1183 pPB[1] = MAKE_MODRM(mod, reg, rm); 1184 1184 1185 AssertReturn(dbgreg <= USE_REG_DR7, VERR_INVALID_PARAMETER);1185 AssertReturn(dbgreg <= DISDREG_DR7, VERR_INVALID_PARAMETER); 1186 1186 offset = RT_OFFSETOF(CPUMCTX, dr[dbgreg]); 1187 1187 … … 1235 1235 switch (ctrlreg) 1236 1236 { 1237 case USE_REG_CR0:1237 case DISCREG_CR0: 1238 1238 offset = RT_OFFSETOF(CPUMCTX, cr0); 1239 1239 break; 1240 case USE_REG_CR2:1240 case DISCREG_CR2: 1241 1241 offset = RT_OFFSETOF(CPUMCTX, cr2); 1242 1242 break; 1243 case USE_REG_CR3:1243 case DISCREG_CR3: 1244 1244 offset = RT_OFFSETOF(CPUMCTX, cr3); 1245 1245 break; 1246 case USE_REG_CR4:1246 case DISCREG_CR4: 1247 1247 offset = RT_OFFSETOF(CPUMCTX, cr4); 1248 1248 break; -
trunk/src/VBox/VMM/include/EMInternal.h
r41692 r41728 272 272 STAMCOUNTER StatInvlpg; 273 273 STAMCOUNTER StatHlt; 274 STAMCOUNTER StatMovReadCR[ USE_REG_CR4 + 1];275 STAMCOUNTER StatMovWriteCR[ USE_REG_CR4 + 1];274 STAMCOUNTER StatMovReadCR[DISCREG_CR4 + 1]; 275 STAMCOUNTER StatMovWriteCR[DISCREG_CR4 + 1]; 276 276 STAMCOUNTER StatMovDRx; 277 277 STAMCOUNTER StatIret;
Note:
See TracChangeset
for help on using the changeset viewer.