Changeset 1977 in vbox for trunk/src/VBox
- Timestamp:
- Apr 6, 2007 6:19:08 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMGC/TRPMGCHandlers.cpp
r1886 r1977 312 312 * Both PATM are using INT3s, let them have a go first. 313 313 */ 314 if ( (pRegFrame->ss & X86_SEL_RPL) == 1 314 if ( (pRegFrame->ss & X86_SEL_RPL) == 1 315 315 && !pRegFrame->eflags.Bits.u1VM) 316 316 { … … 379 379 Assert(rc == VINF_EM_RAW_GUEST_TRAP); 380 380 } 381 else 381 else 382 382 /* Never generate a raw trap here; it might be a monitor instruction, that requires emulation. */ 383 383 rc = VINF_EM_RAW_EMULATE_INSTR; … … 513 513 * @param pRegFrame Pointer to the register frame for the trap. 514 514 * @param pCpu The opcode info. 515 * @param PC Program counter.515 * @param PC The program counter corresponding to cs:eip in pRegFrame. 516 516 */ 517 517 static int trpmGCTrap0dHandlerRing0(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu, RTGCPTR PC) … … 611 611 * @param pRegFrame Pointer to the register frame for the trap. 612 612 * @param pCpu The opcode info. 613 */ 614 static int trpmGCTrap0dHandlerRing3(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu) 613 * @param PC The program counter corresponding to cs:eip in pRegFrame. 614 */ 615 static int trpmGCTrap0dHandlerRing3(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pCpu, RTGCPTR PC) 615 616 { 616 617 int rc; … … 674 675 pVM->trpm.s.uActiveVector = ~0; 675 676 return trpmGCExitTrap(pVM, VINF_EM_RAW_RING_SWITCH, pRegFrame); 677 678 /* 679 * Read TSC 680 */ 681 case OP_RDTSC: 682 { 683 uint32_t cbIgnored; 684 rc = EMInterpretInstructionCPU(pVM, pCpu, pRegFrame, PC, &cbIgnored); 685 if (VBOX_SUCCESS(rc)) 686 pRegFrame->eip += pCpu->opsize; 687 else if (rc != VERR_EM_INTERPRETER) 688 AssertReleaseMsgFailed(("rc=%Vrc\n", rc)); /* Can't happen with RDTSC. */ 689 return trpmGCExitTrap(pVM, rc, pRegFrame); 690 } 676 691 } 677 692 … … 758 773 */ 759 774 if (!pRegFrame->eflags.Bits.u1VM) 760 return trpmGCTrap0dHandlerRing3(pVM, pRegFrame, &Cpu );761 762 /* 775 return trpmGCTrap0dHandlerRing3(pVM, pRegFrame, &Cpu, PC); 776 777 /* 763 778 * Deal with v86 code. 764 779 */ … … 1017 1032 { 1018 1033 /* 1019 * Check that there is still some stack left, if not we'll flag 1034 * Check that there is still some stack left, if not we'll flag 1020 1035 * a guru meditation (the alternative is a triple fault). 1021 1036 */ … … 1029 1044 /* 1030 1045 * Just zero the register containing the selector in question. 1031 * We'll deal with the actual stale or troublesome selector value in 1046 * We'll deal with the actual stale or troublesome selector value in 1032 1047 * the outermost trap frame. 1033 1048 */
Note:
See TracChangeset
for help on using the changeset viewer.