- Timestamp:
- Feb 2, 2012 9:59:25 PM (13 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r39971 r39974 2878 2878 2879 2879 2880 2881 2880 /** 2882 2881 * Implements RDTSC. … … 2908 2907 pIemCpu->fIgnoreRaxRdx = true; 2909 2908 #endif 2909 2910 iemRegAddToRip(pIemCpu, cbInstr); 2911 return VINF_SUCCESS; 2912 } 2913 2914 2915 /** 2916 * Implements RDMSR. 2917 */ 2918 IEM_CIMPL_DEF_0(iemCImpl_rdmsr) 2919 { 2920 PCPUMCTX pCtx = pIemCpu->CTX_SUFF(pCtx); 2921 2922 /* 2923 * Check preconditions. 2924 */ 2925 if (!IEM_IS_INTEL_CPUID_FEATURE_PRESENT_EDX(X86_CPUID_FEATURE_EDX_MSR)) 2926 return iemRaiseUndefinedOpcode(pIemCpu); 2927 if (pIemCpu->uCpl != 0) 2928 return iemRaiseGeneralProtectionFault0(pIemCpu); 2929 2930 /* 2931 * Do the job. 2932 */ 2933 RTUINT64U uValue; 2934 int rc = CPUMQueryGuestMsr(IEMCPU_TO_VMCPU(pIemCpu), pCtx->ecx, &uValue.u); 2935 if (rc != VINF_SUCCESS) 2936 { 2937 AssertMsgReturn(rc == VERR_CPUM_RAISE_GP_0, ("%Rrc\n", rc), VERR_IPE_UNEXPECTED_STATUS); 2938 return iemRaiseGeneralProtectionFault0(pIemCpu); 2939 } 2940 2941 pCtx->rax = uValue.au32[0]; 2942 pCtx->rdx = uValue.au32[1]; 2910 2943 2911 2944 iemRegAddToRip(pIemCpu, cbInstr); -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h
r39971 r39974 1110 1110 1111 1111 /** Opcode 0x0f 0x33. */ 1112 FNIEMOP_STUB(iemOp_rdmsr); 1112 FNIEMOP_DEF(iemOp_rdmsr) 1113 { 1114 IEMOP_MNEMONIC("rdmsr"); 1115 IEMOP_HLP_NO_LOCK_PREFIX(); 1116 return IEM_MC_DEFER_TO_CIMPL_0(iemCImpl_rdmsr); 1117 } 1118 1119 1113 1120 /** Opcode 0x0f 0x34. */ 1114 1121 FNIEMOP_STUB(iemOp_rdpmc); … … 3259 3266 3260 3267 /** Opcode 0x0f 0xae. */ 3261 FNIEMOP_STUB(iemOp_Grp15); 3268 FNIEMOP_STUB(iemOp_Grp15); /** @todo next up: fxrstor */ 3262 3269 3263 3270
Note:
See TracChangeset
for help on using the changeset viewer.