Changeset 51367 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- May 23, 2014 7:45:35 AM (11 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/GIMAll.cpp
r51333 r51367 81 81 VMM_INT_DECL(int) GIMReadMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 82 82 { 83 Assert(pVCpu); 83 84 PVM pVM = pVCpu->CTX_SUFF(pVM); 84 85 Assert(GIMIsEnabled(pVM)); … … 109 110 VMM_INT_DECL(int) GIMWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue) 110 111 { 112 Assert(pVCpu); 111 113 PVM pVM = pVCpu->CTX_SUFF(pVM); 112 114 Assert(GIMIsEnabled(pVM)); -
trunk/src/VBox/VMM/VMMAll/GIMAllHv.cpp
r51333 r51367 23 23 #include "GIMHvInternal.h" 24 24 25 #include <iprt/err.h> 25 #include <VBox/err.h> 26 #include <VBox/vmm/tm.h> 27 #include <VBox/vmm/vm.h> 26 28 27 29 DECLEXPORT(int) GIMHvHypercall(PVMCPU pVCpu, PCPUMCTX pCtx) … … 33 35 DECLEXPORT(int) GIMHvReadMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue) 34 36 { 35 return VINF_SUCCESS; 37 NOREF(pRange); 38 switch (idMsr) 39 { 40 case MSR_GIM_HV_TIME_REF_COUNT: 41 { 42 /* Hyper-V reports the time in 100ns units. */ 43 uint64_t u64Tsc = TMCpuTickGet(pVCpu); 44 uint64_t u64TscHz = TMCpuTicksPerSecond(pVCpu->CTX_SUFF(pVM)); 45 uint64_t u64Tsc100Ns = u64TscHz / UINT64_C(10000000); /* 100 ns */ 46 *puValue = (u64Tsc / u64Tsc100Ns); 47 return VINF_SUCCESS; 48 } 49 50 case MSR_GIM_HV_VP_INDEX: 51 *puValue = pVCpu->idCpu; 52 return VINF_SUCCESS; 53 54 default: 55 break; 56 } 57 58 LogRel(("GIMHvReadMsr: Unknown/invalid RdMsr %#RX32 -> #GP(0)\n", idMsr)); 59 return VERR_CPUM_RAISE_GP_0; 36 60 } 37 61 … … 39 63 DECLEXPORT(int) GIMHvWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue) 40 64 { 41 return VINF_SUCCESS; 65 LogRel(("GIMHvWriteMsr: Unknown/invalid WrMsr %#RX32 -> #GP(0)\n", idMsr)); 66 return VERR_CPUM_RAISE_GP_0; 42 67 } 43 68
Note:
See TracChangeset
for help on using the changeset viewer.