vbox的更動 18927 路徑 trunk/src/VBox/VMM/TRPM.cpp
- 時間撮記:
- 2009-4-16 上午11:41:38 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/TRPM.cpp
r18617 r18927 570 570 VMMR3DECL(void) TRPMR3Relocate(PVM pVM, RTGCINTPTR offDelta) 571 571 { 572 /* Only applies to raw mode which supports only 1 VCPU. */ 573 PVMCPU pVCpu = &pVM->aCpus[0]; 574 572 575 LogFlow(("TRPMR3Relocate\n")); 573 576 /* … … 592 595 AssertReleaseMsgRC(rc, ("Couldn't find TRPMGCHandlerTrap12 in VMMGC.gc!\n")); 593 596 594 RTSEL SelCS = CPUMGetHyperCS(pV M);597 RTSEL SelCS = CPUMGetHyperCS(pVCpu); 595 598 596 599 /* … … 639 642 * Update IDTR (limit is including!). 640 643 */ 641 CPUMSetHyperIDTR(pV M, VM_RC_ADDR(pVM, &pVM->trpm.s.aIdt[0]), sizeof(pVM->trpm.s.aIdt)-1);644 CPUMSetHyperIDTR(pVCpu, VM_RC_ADDR(pVM, &pVM->trpm.s.aIdt[0]), sizeof(pVM->trpm.s.aIdt)-1); 642 645 643 646 if (!pVM->trpm.s.fDisableMonitoring) … … 903 906 * @returns VBox status code. 904 907 * @param pVM The VM handle. 905 */ 906 VMMR3DECL(int) TRPMR3SyncIDT(PVM pVM) 908 * @param pVCpu The VMCPU handle. 909 */ 910 VMMR3DECL(int) TRPMR3SyncIDT(PVM pVM, PVMCPU pVCpu) 907 911 { 908 912 STAM_PROFILE_START(&pVM->trpm.s.StatSyncIDT, a); … … 932 936 */ 933 937 VBOXIDTR IDTR; 934 IDTR.pIdt = CPUMGetGuestIDTR(pV M, &IDTR.cbIdt);938 IDTR.pIdt = CPUMGetGuestIDTR(pVCpu, &IDTR.cbIdt); 935 939 if (!IDTR.cbIdt) 936 940 { … … 985 989 */ 986 990 X86DESC Idte3; 987 rc = PGMPhysSimpleReadGCPtr(pV M, &Idte3, IDTR.pIdt + sizeof(Idte3) * 3, sizeof(Idte3));991 rc = PGMPhysSimpleReadGCPtr(pVCpu, &Idte3, IDTR.pIdt + sizeof(Idte3) * 3, sizeof(Idte3)); 988 992 if (RT_FAILURE(rc)) 989 993 { … … 1078 1082 VMMR3DECL(int) trpmR3ClearPassThroughHandler(PVM pVM, unsigned iTrap) 1079 1083 { 1084 /* Only applies to raw mode which supports only 1 VCPU. */ 1085 PVMCPU pVCpu = &pVM->aCpus[0]; 1086 1080 1087 /** @todo cleanup trpmR3ClearPassThroughHandler()! */ 1081 1088 RTRCPTR aGCPtrs[TRPM_HANDLER_MAX]; … … 1098 1105 ASMBitClear(&pVM->trpm.s.au32IdtPatched[0], iTrap); 1099 1106 1100 RTSEL SelCS = CPUMGetHyperCS(pV M);1107 RTSEL SelCS = CPUMGetHyperCS(pVCpu); 1101 1108 PVBOXIDTE pIdte = &pVM->trpm.s.aIdt[iTrap]; 1102 1109 PVBOXIDTE_GENERIC pIdteTemplate = &g_aIdt[iTrap]; … … 1182 1189 VMMR3DECL(int) TRPMR3SetGuestTrapHandler(PVM pVM, unsigned iTrap, RTRCPTR pHandler) 1183 1190 { 1191 /* Only valid in raw mode which implies 1 VCPU */ 1192 Assert(PATMIsEnabled(pVM) && pVM->cCPUs == 1); 1193 PVMCPU pVCpu = &pVM->aCpus[0]; 1194 1184 1195 /* 1185 1196 * Validate. … … 1194 1205 1195 1206 uint16_t cbIDT; 1196 RTGCPTR GCPtrIDT = CPUMGetGuestIDTR(pV M, &cbIDT);1207 RTGCPTR GCPtrIDT = CPUMGetGuestIDTR(pVCpu, &cbIDT); 1197 1208 if (iTrap * sizeof(VBOXIDTE) >= cbIDT) 1198 1209 return VERR_INVALID_PARAMETER; /* Silently ignore out of range requests. */ … … 1209 1220 */ 1210 1221 VBOXIDTE GuestIdte; 1211 int rc = PGMPhysSimpleReadGCPtr(pV M, &GuestIdte, GCPtrIDT + iTrap * sizeof(GuestIdte), sizeof(GuestIdte));1222 int rc = PGMPhysSimpleReadGCPtr(pVCpu, &GuestIdte, GCPtrIDT + iTrap * sizeof(GuestIdte), sizeof(GuestIdte)); 1212 1223 if (RT_FAILURE(rc)) 1213 1224 { … … 1301 1312 VMMR3DECL(bool) TRPMR3IsGateHandler(PVM pVM, RTRCPTR GCPtr) 1302 1313 { 1314 /* Only valid in raw mode which implies 1 VCPU */ 1315 Assert(PATMIsEnabled(pVM) && pVM->cCPUs == 1); 1316 PVMCPU pVCpu = &pVM->aCpus[0]; 1317 1303 1318 /* 1304 1319 * Read IDTR and calc last entry. 1305 1320 */ 1306 1321 uint16_t cbIDT; 1307 RTGCPTR GCPtrIDTE = CPUMGetGuestIDTR(pV M, &cbIDT);1322 RTGCPTR GCPtrIDTE = CPUMGetGuestIDTR(pVCpu, &cbIDT); 1308 1323 unsigned cEntries = (cbIDT + 1) / sizeof(VBOXIDTE); 1309 1324 if (!cEntries) … … 1322 1337 PCVBOXIDTE pIDTE; 1323 1338 PGMPAGEMAPLOCK Lock; 1324 int rc = PGMPhysGCPtr2CCPtrReadOnly(pV M, GCPtrIDTE, (const void **)&pIDTE, &Lock);1339 int rc = PGMPhysGCPtr2CCPtrReadOnly(pVCpu, GCPtrIDTE, (const void **)&pIDTE, &Lock); 1325 1340 if (RT_SUCCESS(rc)) 1326 1341 { … … 1371 1386 * @returns VBox status code. 1372 1387 * @param pVM The VM to operate on. 1388 * @param pVCpu The VMCPU to operate on. 1373 1389 * @param enmEvent Trpm event type 1374 1390 */ 1375 VMMR3DECL(int) TRPMR3InjectEvent(PVM pVM, TRPMEVENT enmEvent)1391 VMMR3DECL(int) TRPMR3InjectEvent(PVM pVM, PVMCPU pVCpu, TRPMEVENT enmEvent) 1376 1392 { 1377 1393 PCPUMCTX pCtx; 1378 1394 int rc; 1379 1395 1380 pCtx = CPUMQueryGuestCtxPtr(pV M);1396 pCtx = CPUMQueryGuestCtxPtr(pVCpu); 1381 1397 Assert(!PATMIsPatchGCAddr(pVM, (RTGCPTR)pCtx->eip)); 1382 1398 Assert(!VM_FF_ISSET(pVM, VM_FF_INHIBIT_INTERRUPTS)); … … 1385 1401 Assert(enmEvent == TRPM_HARDWARE_INT); 1386 1402 1387 if (REMR3QueryPendingInterrupt(pVM ) == REM_NO_PENDING_IRQ)1403 if (REMR3QueryPendingInterrupt(pVM, pVCpu) == REM_NO_PENDING_IRQ) 1388 1404 { 1389 1405 #ifdef TRPM_FORWARD_TRAPS_IN_GC … … 1416 1432 { 1417 1433 /* Must check pending forced actions as our IDT or GDT might be out of sync */ 1418 rc = EMR3CheckRawForcedActions(pVM );1434 rc = EMR3CheckRawForcedActions(pVM, pVCpu); 1419 1435 if (rc == VINF_SUCCESS) 1420 1436 { … … 1432 1448 else 1433 1449 STAM_COUNTER_INC(&pVM->trpm.s.StatForwardFailNoHandler); 1434 REMR3NotifyPendingInterrupt(pVM, u8Interrupt);1450 REMR3NotifyPendingInterrupt(pVM, pVCpu, u8Interrupt); 1435 1451 } 1436 1452 else
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器