Changeset 468 in vbox for trunk/src/VBox
- Timestamp:
- Jan 31, 2007 3:20:06 PM (18 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/EMInternal.h
r161 r468 125 125 STAMCOUNTER StatGCAdc; 126 126 STAMCOUNTER StatHCAdc; 127 STAMCOUNTER StatGCRdtsc; 127 128 128 129 STAMCOUNTER StatGCInterpretFailed; … … 188 189 STAMCOUNTER StatGCFailedWbInvd; 189 190 STAMCOUNTER StatHCFailedWbInvd; 191 STAMCOUNTER StatGCFailedRdtsc; 190 192 191 193 STAMCOUNTER StatGCFailedUserMode; -
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r23 r468 36 36 #include <VBox/vm.h> 37 37 #include <VBox/hwaccm.h> 38 #include <VBox/tm.h> 38 39 39 40 #include <VBox/param.h> … … 1715 1716 } 1716 1717 1718 #ifdef IN_GC 1719 /** 1720 * RDTSC Emulation. 1721 */ 1722 static int emInterpretRdtsc(PVM pVM, PDISCPUSTATE pCpu, PCPUMCTXCORE pRegFrame, RTGCPTR pvFault, uint32_t *pcbSize) 1723 { 1724 unsigned uCR4 = CPUMGetGuestCR4(pVM); 1725 1726 if (uCR4 & X86_CR4_TSD) 1727 return VERR_EM_INTERPRETER; /* genuine #GP */ 1728 1729 uint64_t uTicks = TMCpuTickGet(pVM); 1730 1731 pRegFrame->eax = uTicks; 1732 pRegFrame->edx = (uTicks >> 32ULL); 1733 1734 return VINF_SUCCESS; 1735 } 1736 #endif 1717 1737 1718 1738 /** … … 1827 1847 INTERPRET_CASE(OP_SUB,Sub); 1828 1848 #ifdef IN_GC 1849 INTERPRET_CASE(OP_RDTSC,Rdtsc); 1829 1850 INTERPRET_CASE(OP_STI,Sti); 1830 1851 #endif -
trunk/src/VBox/VMM/VMMGC/TRPMGCHandlers.cpp
r466 r468 561 561 case OP_LLDT: 562 562 case OP_STI: 563 case OP_RDTSC: 563 564 { 564 565 uint32_t cbIgnored; … … 569 570 rc = VINF_EM_RAW_EXCEPTION_PRIVILEGED; 570 571 return trpmGCExitTrap(pVM, rc, pRegFrame); 571 }572 573 case OP_RDTSC:574 {575 unsigned uCR4 = CPUMGetGuestCR4(pVM);576 577 if (uCR4 & X86_CR4_TSD)578 break; /* genuine #GP */579 580 uint64_t uTicks = TMCpuTickGet(pVM);581 582 pRegFrame->eax = uTicks;583 pRegFrame->edx = (uTicks >> 32ULL);584 585 pRegFrame->eip += pCpu->opsize;586 return trpmGCExitTrap(pVM, VINF_SUCCESS, pRegFrame);587 572 } 588 573 }
Note:
See TracChangeset
for help on using the changeset viewer.