Changeset 72559 in vbox for trunk/src/VBox
- Timestamp:
- Jun 15, 2018 9:52:18 AM (7 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r72555 r72559 437 437 return EMEXITACTION_NORMAL; 438 438 } 439 440 441 #ifdef IN_RC 442 /** 443 * Special raw-mode interface for adding an exit to the history. 444 * 445 * Currently this is only for recording, not optimizing, so no return value. If 446 * we start seriously caring about raw-mode again, we may extend it. 447 * 448 * @param pVCpu The corss context virtual CPU structure. 449 * @param uFlagsAndType Combined flags and type (see EMEXIT_MAKE_FLAGS_AND_TYPE). 450 * @param uCs The CS. 451 * @param uEip The EIP. 452 * @thread EMT(0) 453 */ 454 VMMRC_INT_DECL(void) EMRCHistoryAddExitNoTs(PVMCPU pVCpu, uint32_t uFlagsAndType, uint16_t uCs, uint32_t uEip) 455 { 456 AssertCompile(RT_ELEMENTS(pVCpu->em.s.aExitHistory) == 256); 457 PEMEXITENTRY pHistEntry = &pVCpu->em.s.aExitHistory[(uintptr_t)(pVCpu->em.s.iNextExit++) & 0xff]; 458 pHistEntry->uFlatPC = ((uint64_t)uCs << 32) | uEip; 459 pHistEntry->uTimestamp = 0; 460 pHistEntry->uFlagsAndType = uFlagsAndType | EMEXIT_F_CS_EIP; 461 pHistEntry->idxSlot = UINT32_MAX; 462 } 463 #endif 439 464 440 465 -
trunk/src/VBox/VMM/VMMRC/TRPMRCHandlers.cpp
r72254 r72559 333 333 LogFlow(("TRPMGC01: cs:eip=%04x:%08x uDr6=%RTreg EFL=%x\n", pRegFrame->cs.Sel, pRegFrame->eip, uDr6, CPUMRawGetEFlags(pVCpu))); 334 334 TRPM_ENTER_DBG_HOOK(1); 335 EMRCHistoryAddExitNoTs(pVCpu, EMEXIT_MAKE_FLAGS_AND_TYPE(EMEXIT_F_KIND_XCPT, X86_XCPT_DB), pRegFrame->cs.Sel, pRegFrame->eip); 335 336 336 337 /* … … 386 387 PVMCPU pVCpu = TRPMCPU_2_VMCPU(pTrpmCpu); 387 388 TRPM_ENTER_DBG_HOOK_HYPER(1); 389 EMRCHistoryAddExitNoTs(pVCpu, EMEXIT_MAKE_FLAGS_AND_TYPE(EMEXIT_F_KIND_XCPT, X86_XCPT_DB), pRegFrame->cs.Sel, pRegFrame->eip); 388 390 LogFlow(("TRPMGCHyper01: cs:eip=%04x:%08x uDr6=%RTreg\n", pRegFrame->cs.Sel, pRegFrame->eip, uDr6)); 389 391 … … 426 428 { 427 429 LogFlow(("TRPMGCTrap02Handler: cs:eip=%04x:%08x\n", pRegFrame->cs.Sel, pRegFrame->eip)); 430 EMRCHistoryAddExitNoTs(TRPMCPU_2_VMCPU(pTrpmCpu), EMEXIT_MAKE_FLAGS_AND_TYPE(EMEXIT_F_KIND_XCPT, X86_XCPT_NMI), 431 pRegFrame->cs.Sel, pRegFrame->eip); 428 432 #if 0 /* Enable this iff you have a COM port and really want this debug info. */ 429 433 RTLogComPrintf("TRPMGCTrap02Handler: cs:eip=%04x:%08x\n", pRegFrame->cs.Sel, pRegFrame->eip); … … 452 456 { 453 457 LogFlow(("TRPMGCHyperTrap02Handler: cs:eip=%04x:%08x\n", pRegFrame->cs.Sel, pRegFrame->eip)); 458 EMRCHistoryAddExitNoTs(TRPMCPU_2_VMCPU(pTrpmCpu), EMEXIT_MAKE_FLAGS_AND_TYPE(EMEXIT_F_KIND_XCPT, X86_XCPT_NMI), 459 pRegFrame->cs.Sel, pRegFrame->eip); 454 460 #if 0 /* Enable this iff you have a COM port and really want this debug info. */ 455 461 RTLogComPrintf("TRPMGCHyperTrap02Handler: cs:eip=%04x:%08x\n", pRegFrame->cs.Sel, pRegFrame->eip); … … 478 484 LogFlow(("TRPMGC03: %04x:%08x EFL=%x\n", pRegFrame->cs.Sel, pRegFrame->eip, CPUMRawGetEFlags(pVCpu))); 479 485 TRPM_ENTER_DBG_HOOK(3); 486 EMRCHistoryAddExitNoTs(pVCpu, EMEXIT_MAKE_FLAGS_AND_TYPE(EMEXIT_F_KIND_XCPT, X86_XCPT_BP), pRegFrame->cs.Sel, pRegFrame->eip); 480 487 PGMRZDynMapStartAutoSet(pVCpu); 481 488 … … 530 537 LogFlow(("TRPMGCHyper03: %04x:%08x EFL=%x\n", pRegFrame->cs.Sel, pRegFrame->eip, CPUMRawGetEFlags(pVCpu))); 531 538 TRPM_ENTER_DBG_HOOK_HYPER(3); 539 EMRCHistoryAddExitNoTs(pVCpu, EMEXIT_MAKE_FLAGS_AND_TYPE(EMEXIT_F_KIND_XCPT, X86_XCPT_BP), pRegFrame->cs.Sel, pRegFrame->eip); 532 540 533 541 /* … … 561 569 LogFlow(("TRPMGC06: %04x:%08x EFL=%#x/%#x\n", pRegFrame->cs.Sel, pRegFrame->eip, pRegFrame->eflags.u32, CPUMRawGetEFlags(pVCpu))); 562 570 TRPM_ENTER_DBG_HOOK(6); 571 EMRCHistoryAddExitNoTs(pVCpu, EMEXIT_MAKE_FLAGS_AND_TYPE(EMEXIT_F_KIND_XCPT, X86_XCPT_UD), pRegFrame->cs.Sel, pRegFrame->eip); 563 572 PGMRZDynMapStartAutoSet(pVCpu); 564 573 … … 697 706 LogFlow(("TRPMGC07: %04x:%08x EFL=%x\n", pRegFrame->cs.Sel, pRegFrame->eip, CPUMRawGetEFlags(pVCpu))); 698 707 TRPM_ENTER_DBG_HOOK(7); 708 EMRCHistoryAddExitNoTs(pVCpu, EMEXIT_MAKE_FLAGS_AND_TYPE(EMEXIT_F_KIND_XCPT, X86_XCPT_NM), pRegFrame->cs.Sel, pRegFrame->eip); 699 709 PGMRZDynMapStartAutoSet(pVCpu); 700 710 … … 723 733 LogFlow(("TRPMGC0b: %04x:%08x EFL=%x\n", pRegFrame->cs.Sel, pRegFrame->eip, CPUMRawGetEFlags(pVCpu))); 724 734 TRPM_ENTER_DBG_HOOK(0xb); 735 EMRCHistoryAddExitNoTs(pVCpu, EMEXIT_MAKE_FLAGS_AND_TYPE(EMEXIT_F_KIND_XCPT, X86_XCPT_NP), pRegFrame->cs.Sel, pRegFrame->eip); 725 736 PGMRZDynMapStartAutoSet(pVCpu); 726 737 … … 1184 1195 LogFlow(("TRPMGC0d: %04x:%08x err=%x EFL=%x\n", pRegFrame->cs.Sel, pRegFrame->eip, (uint32_t)pVCpu->trpm.s.uActiveErrorCode, CPUMRawGetEFlags(pVCpu))); 1185 1196 TRPM_ENTER_DBG_HOOK(0xd); 1197 EMRCHistoryAddExitNoTs(pVCpu, EMEXIT_MAKE_FLAGS_AND_TYPE(EMEXIT_F_KIND_XCPT, X86_XCPT_GP), pRegFrame->cs.Sel, pRegFrame->eip); 1186 1198 1187 1199 PGMRZDynMapStartAutoSet(pVCpu); … … 1249 1261 LogFlow(("TRPMGC0e: %04x:%08x err=%x cr2=%08x EFL=%x\n", pRegFrame->cs.Sel, pRegFrame->eip, (uint32_t)pVCpu->trpm.s.uActiveErrorCode, (uint32_t)pVCpu->trpm.s.uActiveCR2, CPUMRawGetEFlags(pVCpu))); 1250 1262 TRPM_ENTER_DBG_HOOK(0xe); 1263 EMRCHistoryAddExitNoTs(pVCpu, EMEXIT_MAKE_FLAGS_AND_TYPE(EMEXIT_F_KIND_XCPT, X86_XCPT_PF), pRegFrame->cs.Sel, pRegFrame->eip); 1251 1264 1252 1265 /* … … 1364 1377 DECLASM(int) TRPMGCHyperTrap0bHandler(PTRPMCPU pTrpmCpu, PCPUMCTXCORE pRegFrame) 1365 1378 { 1379 EMRCHistoryAddExitNoTs(TRPMCPU_2_VMCPU(pTrpmCpu), EMEXIT_MAKE_FLAGS_AND_TYPE(EMEXIT_F_KIND_XCPT, X86_XCPT_NP), 1380 pRegFrame->cs.Sel, pRegFrame->eip); 1366 1381 return trpmGCHyperGeneric(TRPMCPU_2_VM(pTrpmCpu), pRegFrame, g_aTrap0bHandlers, g_aTrap0bHandlersEnd); 1367 1382 } … … 1383 1398 DECLASM(int) TRPMGCHyperTrap0dHandler(PTRPMCPU pTrpmCpu, PCPUMCTXCORE pRegFrame) 1384 1399 { 1400 EMRCHistoryAddExitNoTs(TRPMCPU_2_VMCPU(pTrpmCpu), EMEXIT_MAKE_FLAGS_AND_TYPE(EMEXIT_F_KIND_XCPT, X86_XCPT_GP), 1401 pRegFrame->cs.Sel, pRegFrame->eip); 1385 1402 return trpmGCHyperGeneric(TRPMCPU_2_VM(pTrpmCpu), pRegFrame, g_aTrap0dHandlers, g_aTrap0dHandlersEnd); 1386 1403 } … … 1402 1419 DECLASM(int) TRPMGCHyperTrap0eHandler(PTRPMCPU pTrpmCpu, PCPUMCTXCORE pRegFrame) 1403 1420 { 1421 EMRCHistoryAddExitNoTs(TRPMCPU_2_VMCPU(pTrpmCpu), EMEXIT_MAKE_FLAGS_AND_TYPE(EMEXIT_F_KIND_XCPT, X86_XCPT_PF), 1422 pRegFrame->cs.Sel, pRegFrame->eip); 1404 1423 return trpmGCHyperGeneric(TRPMCPU_2_VM(pTrpmCpu), pRegFrame, g_aTrap0dHandlers, g_aTrap0dHandlersEnd); 1405 1424 }
Note:
See TracChangeset
for help on using the changeset viewer.