- Timestamp:
- Apr 5, 2009 5:33:22 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMGC/TRPMGCHandlers.cpp
r18617 r18723 144 144 #ifdef VBOX_HIGH_RES_TIMERS_HACK 145 145 /* 146 * Occationally we should poll timers.146 * We should poll the timers occationally. 147 147 * We must *NOT* do this too frequently as it adds a significant overhead 148 148 * and it'll kill us if the trap load is high. (See #1354.) … … 259 259 RTGCUINTREG uDr6 = ASMGetAndClearDR6(); 260 260 PVM pVM = TRPM2VM(pTrpm); 261 LogFlow(("TRPMGC Trap01Handler: cs:eip=%04x:%08x uDr6=%RTreg\n", pRegFrame->cs, pRegFrame->eip, uDr6));261 LogFlow(("TRPMGC01: cs:eip=%04x:%08x uDr6=%RTreg\n", pRegFrame->cs, pRegFrame->eip, uDr6)); 262 262 263 263 /* … … 281 281 CPUMSetGuestDR6(pVM, uDr6); 282 282 283 return trpmGCExitTrap(pVM, rc, pRegFrame); 283 rc = trpmGCExitTrap(pVM, rc, pRegFrame); 284 Log6(("TRPMGC01: %Rrc (%04x:%08x %RTreg)\n", rc, pRegFrame->cs, pRegFrame->eip, uDr6)); 285 return rc; 284 286 } 285 287 … … 318 320 DECLASM(int) TRPMGCTrap03Handler(PTRPM pTrpm, PCPUMCTXCORE pRegFrame) 319 321 { 320 LogFlow(("TRPMGC Trap03Handler: cs:eip=%04x:%08x\n", pRegFrame->cs, pRegFrame->eip));322 LogFlow(("TRPMGC03: %04x:%08x\n", pRegFrame->cs, pRegFrame->eip)); 321 323 PVM pVM = TRPM2VM(pTrpm); 322 324 int rc; … … 330 332 rc = PATMHandleInt3PatchTrap(pVM, pRegFrame); 331 333 if (rc == VINF_SUCCESS || rc == VINF_EM_RAW_EMULATE_INSTR || rc == VINF_PATM_PATCH_INT3 || rc == VINF_PATM_DUPLICATE_FUNCTION) 332 return trpmGCExitTrap(pVM, rc, pRegFrame); 334 { 335 rc = trpmGCExitTrap(pVM, rc, pRegFrame); 336 Log6(("TRPMGC03: %Rrc (%04x:%08x) (PATM)\n", rc, pRegFrame->cs, pRegFrame->eip)); 337 return rc; 338 } 333 339 } 334 340 rc = DBGFGCTrap03Handler(pVM, pRegFrame); 341 335 342 /* anything we should do with this? Schedule it in GC? */ 336 return trpmGCExitTrap(pVM, rc, pRegFrame); 343 rc = trpmGCExitTrap(pVM, rc, pRegFrame); 344 Log6(("TRPMGC03: %Rrc (%04x:%08x)\n", rc, pRegFrame->cs, pRegFrame->eip)); 345 return rc; 337 346 } 338 347 … … 351 360 DECLASM(int) TRPMGCTrap06Handler(PTRPM pTrpm, PCPUMCTXCORE pRegFrame) 352 361 { 362 LogFlow(("TRPMGC06: %04x:%08x efl=%x\n", pRegFrame->cs, pRegFrame->eip, pRegFrame->eflags.u32)); 353 363 PVM pVM = TRPM2VM(pTrpm); 354 364 int rc; 355 356 LogFlow(("TRPMGCTrap06Handler %08RX32 eflags=%x\n", pRegFrame->eip, pRegFrame->eflags.u32));357 365 358 366 if (CPUMGetGuestCPL(pVM, pRegFrame) == 0) … … 366 374 { 367 375 Log(("TRPMGCTrap06Handler: Failed to convert %RTsel:%RX32 (cpl=%d) - rc=%Rrc !!\n", pRegFrame->cs, pRegFrame->eip, pRegFrame->ss & X86_SEL_RPL, rc)); 368 return trpmGCExitTrap(pVM, VINF_EM_RAW_GUEST_TRAP, pRegFrame); 376 rc = trpmGCExitTrap(pVM, VINF_EM_RAW_GUEST_TRAP, pRegFrame); 377 Log6(("TRPMGC06: %Rrc (%04x:%08x) (SELM)\n", rc, pRegFrame->cs, pRegFrame->eip)); 378 return rc; 369 379 } 370 380 … … 373 383 rc = EMInterpretDisasOneEx(pVM, (RTGCUINTPTR)PC, pRegFrame, &Cpu, &cbOp); 374 384 if (RT_FAILURE(rc)) 375 return trpmGCExitTrap(pVM, VINF_EM_RAW_EMULATE_INSTR, pRegFrame); 385 { 386 rc = trpmGCExitTrap(pVM, VINF_EM_RAW_EMULATE_INSTR, pRegFrame); 387 Log6(("TRPMGC06: %Rrc (%04x:%08x) (EM)\n", rc, pRegFrame->cs, pRegFrame->eip)); 388 return rc; 389 } 376 390 377 391 /* … … 382 396 { 383 397 rc = PATMGCHandleIllegalInstrTrap(pVM, pRegFrame); 398 /** @todo These tests are completely unnecessary, should just follow the 399 * flow and return at the end of the function. */ 384 400 if ( rc == VINF_SUCCESS 385 401 || rc == VINF_EM_RAW_EMULATE_INSTR … … 387 403 || rc == VINF_PATM_PENDING_IRQ_AFTER_IRET 388 404 || rc == VINF_EM_RESCHEDULE) 389 return trpmGCExitTrap(pVM, rc, pRegFrame); 405 { 406 rc = trpmGCExitTrap(pVM, rc, pRegFrame); 407 Log6(("TRPMGC06: %Rrc (%04x:%08x) (PATM)\n", rc, pRegFrame->cs, pRegFrame->eip)); 408 return rc; 409 } 390 410 } 391 411 /* … … 423 443 } 424 444 425 return trpmGCExitTrap(pVM, rc, pRegFrame); 445 rc = trpmGCExitTrap(pVM, rc, pRegFrame); 446 Log6(("TRPMGC06: %Rrc (%04x:%08x)\n", rc, pRegFrame->cs, pRegFrame->eip)); 447 return rc; 426 448 } 427 449 … … 442 464 DECLASM(int) TRPMGCTrap07Handler(PTRPM pTrpm, PCPUMCTXCORE pRegFrame) 443 465 { 466 LogFlow(("TRPMGC07: %04x:%08x\n", pRegFrame->cs, pRegFrame->eip)); 444 467 PVM pVM = TRPM2VM(pTrpm); 445 468 446 LogFlow(("TRPMTrap07HandlerGC: eip=%08RX32\n", pRegFrame->eip)); 447 return CPUMHandleLazyFPU(pVM, VMMGetCpu(pVM)); 469 int rc = CPUMHandleLazyFPU(pVM, VMMGetCpu(pVM)); 470 Log6(("TRPMGC07: %Rrc (%04x:%08x)\n", rc, pRegFrame->cs, pRegFrame->eip)); 471 return rc; /** @todo call trpmGCExitTrap! (after 2.2.0) */ 448 472 } 449 473 … … 462 486 DECLASM(int) TRPMGCTrap0bHandler(PTRPM pTrpm, PCPUMCTXCORE pRegFrame) 463 487 { 464 LogFlow(("TRPMGC Trap0bHandler: eip=%08RX32\n", pRegFrame->eip));488 LogFlow(("TRPMGC0b: %04x:%08x\n", pRegFrame->cs, pRegFrame->eip)); 465 489 PVM pVM = TRPM2VM(pTrpm); 466 490 … … 534 558 */ 535 559 pTrpm->uActiveVector = ~0; 560 Log6(("TRPMGC0b: %Rrc (%04x:%08x) (CG)\n", VINF_EM_RAW_RING_SWITCH, pRegFrame->cs, pRegFrame->eip)); 536 561 return VINF_EM_RAW_RING_SWITCH; 537 562 } … … 541 566 * Pass trap 0b as is to the recompiler in all other cases. 542 567 */ 568 Log6(("TRPMGC0b: %Rrc (%04x:%08x)\n", VINF_EM_RAW_GUEST_TRAP, pRegFrame->cs, pRegFrame->eip)); 543 569 return VINF_EM_RAW_GUEST_TRAP; 544 570 } … … 885 911 DECLASM(int) TRPMGCTrap0dHandler(PTRPM pTrpm, PCPUMCTXCORE pRegFrame) 886 912 { 887 LogFlow(("TRPMGC Trap0dHandler: eip=%08RX32\n", pRegFrame->eip));913 LogFlow(("TRPMGC0d: %04x:%08x err=%x\n", pRegFrame->cs, pRegFrame->eip, (uint32_t)pTrpm->uActiveErrorCode)); 888 914 PVM pVM = TRPM2VM(pTrpm); 889 915 … … 920 946 break; 921 947 } 948 Log6(("TRPMGC0d: %Rrc (%04x:%08x)\n", rc, pRegFrame->cs, pRegFrame->eip)); 922 949 return rc; 923 950 } … … 940 967 DECLASM(int) TRPMGCTrap0eHandler(PTRPM pTrpm, PCPUMCTXCORE pRegFrame) 941 968 { 942 Log Bird(("TRPMGCTrap0eHandler: eip=%08RX32\n", pRegFrame->eip));969 LogFlow(("TRPMGC0e: %04x:%08x err=%x cr2=%08x\n", pRegFrame->cs, pRegFrame->eip, (uint32_t)pTrpm->uActiveErrorCode, (uint32_t)pTrpm->uActiveCR2)); 943 970 PVM pVM = TRPM2VM(pTrpm); 944 971 972 945 973 /* 946 974 * This is all PGM stuff. 947 975 */ 948 976 int rc = PGMTrap0eHandler(pVM, pTrpm->uActiveErrorCode, pRegFrame, (RTGCPTR)pTrpm->uActiveCR2); 949 950 977 switch (rc) 951 978 { … … 989 1016 break; 990 1017 } 991 return trpmGCExitTrap(pVM, rc, pRegFrame); 1018 rc = trpmGCExitTrap(pVM, rc, pRegFrame); 1019 Log6(("TRPMGC0e: %Rrc (%04x:%08x)\n", rc, pRegFrame->cs, pRegFrame->eip)); 1020 return rc; 992 1021 } 993 1022
Note:
See TracChangeset
for help on using the changeset viewer.