- Timestamp:
- Apr 6, 2007 9:20:43 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMGC/TRPMGCHandlers.cpp
r1978 r1981 678 678 /* 679 679 * Handle virtualized TSC reads. 680 * (EMInterpretInstructionCPU isn't usable here because it rejects cpl != 0.) 680 681 */ 681 682 case OP_RDTSC: 682 683 { 683 uint32_t cbIgnored; 684 rc = EMInterpretInstructionCPU(pVM, pCpu, pRegFrame, PC, &cbIgnored); 685 if (VBOX_SUCCESS(rc)) 684 /** @todo statistics */ 685 if (CPUMGetGuestCR4(pVM) & X86_CR4_TSD) 686 rc = VINF_EM_RAW_EMULATE_INSTR; 687 else 688 { 689 uint64_t Tsc = TMCpuTickGet(pVM); 690 pRegFrame->eax = Tsc; 691 pRegFrame->edx = Tsc >> 32; 686 692 pRegFrame->eip += pCpu->opsize; 687 else if (rc != VERR_EM_INTERPRETER)688 AssertReleaseMsgFailed(("rc=%Vrc\n", rc)); /* Can't happen with RDTSC. */693 rc = VINF_SUCCESS; 694 } 689 695 return trpmGCExitTrap(pVM, rc, pRegFrame); 690 696 }
Note:
See TracChangeset
for help on using the changeset viewer.