Changeset 51961 in vbox
- Timestamp:
- Jul 10, 2014 8:55:01 AM (10 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
-
VMMR0/GIMR0Hv.cpp (modified) (2 diffs)
-
VMMR0/HMVMXR0.cpp (modified) (1 diff)
-
VMMR3/GIMHv.cpp (modified) (2 diffs)
-
include/GIMHvInternal.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/GIMR0Hv.cpp
r51954 r51961 25 25 #include <VBox/err.h> 26 26 #include <VBox/vmm/gim.h> 27 #include <VBox/vmm/tm.h> 27 28 #include <VBox/vmm/vm.h> 28 29 … … 103 104 Assert(pRefTsc); 104 105 106 /* 107 * Hyper-V reports the reference time in 100 nanosecond units. 108 */ 109 uint64_t u64Tsc100Ns = TMCpuTicksPerSecond(pVM) / UINT64_C(10000000); /* 100 ns */ 110 int64_t i64TscOffset = (int64_t)u64Offset / u64Tsc100Ns; 111 112 /* 113 * The TSC page can be simulatenously read by other VCPUs in the guest. The 114 * spinlock is only for protecting simultaneous hypervisor writes from other 115 * EMTs. 116 */ 105 117 RTSpinlockAcquire(pcHv->hSpinlockR0); 106 pRefTsc->i64TscOffset = u64Offset; 107 if (pRefTsc->u32TscSequence < UINT32_C(0xfffffffe)) 108 ASMAtomicIncU32(&pRefTsc->u32TscSequence); 109 else 110 ASMAtomicWriteU32(&pRefTsc->u32TscSequence, 1); 118 if (pRefTsc->i64TscOffset != i64TscOffset) 119 { 120 ASMAtomicWriteS64(&pRefTsc->i64TscOffset, i64TscOffset); 121 if (pRefTsc->u32TscSequence < UINT32_C(0xfffffffe)) 122 ASMAtomicIncU32(&pRefTsc->u32TscSequence); 123 else 124 ASMAtomicWriteU32(&pRefTsc->u32TscSequence, 1); 125 } 111 126 RTSpinlockRelease(pcHv->hSpinlockR0); 112 127 113 128 Assert(pRefTsc->u32TscSequence != 0); 114 129 Assert(pRefTsc->u32TscSequence != UINT32_C(0xffffffff)); 130 AssertReturn(pRefTsc->u32TscSequence != 0xfffffffe, VERR_GIM_IPE_3); 115 131 return VINF_SUCCESS; 116 132 } -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r51896 r51961 5589 5589 if (fParavirtTsc) 5590 5590 { 5591 #if 05591 #if 1 5592 5592 uint64_t const u64CurTsc = ASMReadTSC(); 5593 5593 uint64_t const u64LastTick = TMCpuTickGetLastSeen(pVCpu); -
trunk/src/VBox/VMM/VMMR3/GIMHv.cpp
r51719 r51961 491 491 pRefTsc->u64TscScale = ((INT64_C(10000) << 32) / u64TscKHz) << 32; 492 492 493 LogRel(("GIM: HyperV: Enabled TSC page at %#RGp (u64TscScale=%#RX64 u64TscKHz=%#RX64)\n", GCPhysTscPage,494 pRefTsc->u64TscScale, u64TscKHz ));493 LogRel(("GIM: HyperV: Enabled TSC page at %#RGp - u64TscScale=%#RX64 u64TscKHz=%#RX64 (%'RU64)\n", GCPhysTscPage, 494 pRefTsc->u64TscScale, u64TscKHz, u64TscKHz)); 495 495 return VINF_SUCCESS; 496 496 } … … 602 602 { 603 603 /** @todo Handle raw-mode hypercall page patching. */ 604 LogRel Func(("Raw-mode not yet implemented!\n"));604 LogRel(("GIM: HyperV: Raw-mode not yet implemented!\n")); 605 605 } 606 606 GIMR3Mmio2Unmap(pVM, pRegion); -
trunk/src/VBox/VMM/include/GIMHvInternal.h
r51686 r51961 425 425 /** 426 426 * MMIO2 region indices. 427 * Note!! Saved-state are dependent on the index values, do -not- change!428 427 */ 429 428 /** The hypercall page region. */
Note:
See TracChangeset
for help on using the changeset viewer.

