1 | /** @file
|
---|
2 | * TM - Time Manager.
|
---|
3 | */
|
---|
4 |
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2006-2024 Oracle and/or its affiliates.
|
---|
7 | *
|
---|
8 | * This file is part of VirtualBox base platform packages, as
|
---|
9 | * available from https://www.virtualbox.org.
|
---|
10 | *
|
---|
11 | * This program is free software; you can redistribute it and/or
|
---|
12 | * modify it under the terms of the GNU General Public License
|
---|
13 | * as published by the Free Software Foundation, in version 3 of the
|
---|
14 | * License.
|
---|
15 | *
|
---|
16 | * This program is distributed in the hope that it will be useful, but
|
---|
17 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
19 | * General Public License for more details.
|
---|
20 | *
|
---|
21 | * You should have received a copy of the GNU General Public License
|
---|
22 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
23 | *
|
---|
24 | * The contents of this file may alternatively be used under the terms
|
---|
25 | * of the Common Development and Distribution License Version 1.0
|
---|
26 | * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
|
---|
27 | * in the VirtualBox distribution, in which case the provisions of the
|
---|
28 | * CDDL are applicable instead of those of the GPL.
|
---|
29 | *
|
---|
30 | * You may elect to license modified versions of this file under the
|
---|
31 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
32 | *
|
---|
33 | * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
|
---|
34 | */
|
---|
35 |
|
---|
36 | #ifndef VBOX_INCLUDED_vmm_tm_h
|
---|
37 | #define VBOX_INCLUDED_vmm_tm_h
|
---|
38 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
39 | # pragma once
|
---|
40 | #endif
|
---|
41 |
|
---|
42 | #include <VBox/types.h>
|
---|
43 | #ifdef IN_RING3
|
---|
44 | # include <iprt/time.h>
|
---|
45 | #endif
|
---|
46 |
|
---|
47 | RT_C_DECLS_BEGIN
|
---|
48 |
|
---|
49 | /** @defgroup grp_tm The Time Manager API
|
---|
50 | * @ingroup grp_vmm
|
---|
51 | * @{
|
---|
52 | */
|
---|
53 |
|
---|
54 | /** Enable a timer hack which improves the timer response/resolution a bit. */
|
---|
55 | #define VBOX_HIGH_RES_TIMERS_HACK
|
---|
56 |
|
---|
57 |
|
---|
58 | /**
|
---|
59 | * Clock type.
|
---|
60 | */
|
---|
61 | typedef enum TMCLOCK
|
---|
62 | {
|
---|
63 | /** Real host time.
|
---|
64 | * This clock ticks all the time, so use with care. */
|
---|
65 | TMCLOCK_REAL = 0,
|
---|
66 | /** Virtual guest time.
|
---|
67 | * This clock only ticks when the guest is running. It's implemented
|
---|
68 | * as an offset to monotonic real time (GIP). */
|
---|
69 | TMCLOCK_VIRTUAL,
|
---|
70 | /** Virtual guest synchronized timer time.
|
---|
71 | * This is a special clock and timer queue for synchronizing virtual timers
|
---|
72 | * and virtual time sources. This clock is trying to keep up with
|
---|
73 | * TMCLOCK_VIRTUAL, but will wait for timers to be executed. If it lags
|
---|
74 | * too far behind TMCLOCK_VIRTUAL, it will try speed up to close the
|
---|
75 | * distance.
|
---|
76 | * @remarks Do not use this unless you really *must*. */
|
---|
77 | TMCLOCK_VIRTUAL_SYNC,
|
---|
78 | /** Virtual CPU timestamp.
|
---|
79 | * By default this is a function of TMCLOCK_VIRTUAL_SYNC and the virtual
|
---|
80 | * CPU frequency. */
|
---|
81 | TMCLOCK_TSC,
|
---|
82 | /** Number of clocks. */
|
---|
83 | TMCLOCK_MAX
|
---|
84 | } TMCLOCK;
|
---|
85 |
|
---|
86 |
|
---|
87 | /** @defgroup grp_tm_timer_flags Timer flags.
|
---|
88 | * @{ */
|
---|
89 | /** Use the default critical section for the class of timers. */
|
---|
90 | #define TMTIMER_FLAGS_DEFAULT_CRIT_SECT 0
|
---|
91 | /** No critical section needed or a custom one is set using
|
---|
92 | * TMR3TimerSetCritSect(). */
|
---|
93 | #define TMTIMER_FLAGS_NO_CRIT_SECT RT_BIT_32(0)
|
---|
94 | /** Used in ring-0. Must set this or TMTIMER_FLAGS_NO_RING0. */
|
---|
95 | #define TMTIMER_FLAGS_RING0 RT_BIT_32(1)
|
---|
96 | /** Not used in ring-0 (for refactoring and doc purposes). */
|
---|
97 | #define TMTIMER_FLAGS_NO_RING0 RT_BIT_32(31)
|
---|
98 | /** @} */
|
---|
99 |
|
---|
100 |
|
---|
101 | VMMDECL(void) TMNotifyStartOfExecution(PVMCC pVM, PVMCPUCC pVCpu);
|
---|
102 | VMMDECL(void) TMNotifyEndOfExecution(PVMCC pVM, PVMCPUCC pVCpu, uint64_t uTsc);
|
---|
103 | VMM_INT_DECL(void) TMNotifyStartOfHalt(PVMCPUCC pVCpu);
|
---|
104 | VMM_INT_DECL(void) TMNotifyEndOfHalt(PVMCPUCC pVCpu);
|
---|
105 | #ifdef IN_RING3
|
---|
106 | VMMR3DECL(int) TMR3NotifySuspend(PVM pVM, PVMCPU pVCpu);
|
---|
107 | VMMR3DECL(int) TMR3NotifyResume(PVM pVM, PVMCPU pVCpu);
|
---|
108 | VMMR3DECL(int) TMR3SetWarpDrive(PUVM pUVM, uint32_t u32Percent);
|
---|
109 | VMMR3DECL(uint32_t) TMR3GetWarpDrive(PUVM pUVM);
|
---|
110 | #endif
|
---|
111 | VMM_INT_DECL(uint32_t) TMCalcHostTimerFrequency(PVMCC pVM, PVMCPUCC pVCpu);
|
---|
112 | #ifdef IN_RING3
|
---|
113 | VMMR3DECL(int) TMR3GetCpuLoadTimes(PVM pVM, VMCPUID idCpu, uint64_t *pcNsTotal, uint64_t *pcNsExecuting,
|
---|
114 | uint64_t *pcNsHalted, uint64_t *pcNsOther);
|
---|
115 | VMMR3DECL(int) TMR3GetCpuLoadPercents(PUVM pVUM, VMCPUID idCpu, uint64_t *pcMsInterval, uint8_t *pcPctExecuting,
|
---|
116 | uint8_t *pcPctHalted, uint8_t *pcPctOther);
|
---|
117 | #endif
|
---|
118 |
|
---|
119 |
|
---|
120 | /** @name Real Clock Methods
|
---|
121 | * @{
|
---|
122 | */
|
---|
123 | VMM_INT_DECL(uint64_t) TMRealGet(PVM pVM);
|
---|
124 | VMM_INT_DECL(uint64_t) TMRealGetFreq(PVM pVM);
|
---|
125 | /** @} */
|
---|
126 |
|
---|
127 |
|
---|
128 | /** @name Virtual Clock Methods
|
---|
129 | * @{
|
---|
130 | */
|
---|
131 | VMM_INT_DECL(uint64_t) TMVirtualGet(PVMCC pVM);
|
---|
132 | VMM_INT_DECL(uint64_t) TMVirtualGetNoCheck(PVMCC pVM);
|
---|
133 | VMM_INT_DECL(uint64_t) TMVirtualSyncGetLag(PVMCC pVM);
|
---|
134 | VMM_INT_DECL(uint32_t) TMVirtualSyncGetCatchUpPct(PVMCC pVM);
|
---|
135 | VMM_INT_DECL(uint64_t) TMVirtualGetFreq(PVM pVM);
|
---|
136 | VMM_INT_DECL(uint64_t) TMVirtualSyncGet(PVMCC pVM);
|
---|
137 | VMM_INT_DECL(uint64_t) TMVirtualSyncGetNoCheck(PVMCC pVM);
|
---|
138 | VMM_INT_DECL(uint64_t) TMVirtualSyncGetNoCheckWithTsc(PVMCC pVM, uint64_t *puTscNow);
|
---|
139 | VMM_INT_DECL(uint64_t) TMVirtualSyncGetEx(PVMCC pVM, bool fCheckTimers);
|
---|
140 | VMM_INT_DECL(uint64_t) TMVirtualSyncGetWithDeadlineNoCheck(PVMCC pVM, uint64_t *pcNsToDeadline,
|
---|
141 | uint64_t *puDeadlineVersion, uint64_t *puTscNow);
|
---|
142 | VMMDECL(uint64_t) TMVirtualSyncGetNsToDeadline(PVMCC pVM, uint64_t *puDeadlineVersion, uint64_t *puTscNow);
|
---|
143 | VMM_INT_DECL(bool) TMVirtualSyncIsCurrentDeadlineVersion(PVMCC pVM, uint64_t uDeadlineVersion);
|
---|
144 | VMM_INT_DECL(uint64_t) TMVirtualToNano(PVM pVM, uint64_t u64VirtualTicks);
|
---|
145 | VMM_INT_DECL(uint64_t) TMVirtualToMicro(PVM pVM, uint64_t u64VirtualTicks);
|
---|
146 | VMM_INT_DECL(uint64_t) TMVirtualToMilli(PVM pVM, uint64_t u64VirtualTicks);
|
---|
147 | VMM_INT_DECL(uint64_t) TMVirtualFromNano(PVM pVM, uint64_t u64NanoTS);
|
---|
148 | VMM_INT_DECL(uint64_t) TMVirtualFromMicro(PVM pVM, uint64_t u64MicroTS);
|
---|
149 | VMM_INT_DECL(uint64_t) TMVirtualFromMilli(PVM pVM, uint64_t u64MilliTS);
|
---|
150 | VMM_INT_DECL(bool) TMVirtualIsTicking(PVM pVM);
|
---|
151 |
|
---|
152 | VMMR3DECL(uint64_t) TMR3TimeVirtGet(PUVM pUVM);
|
---|
153 | VMMR3DECL(uint64_t) TMR3TimeVirtGetMilli(PUVM pUVM);
|
---|
154 | VMMR3DECL(uint64_t) TMR3TimeVirtGetMicro(PUVM pUVM);
|
---|
155 | VMMR3DECL(uint64_t) TMR3TimeVirtGetNano(PUVM pUVM);
|
---|
156 | /** @} */
|
---|
157 |
|
---|
158 |
|
---|
159 | /** @name CPU Clock Methods
|
---|
160 | * @{
|
---|
161 | */
|
---|
162 | VMMDECL(uint64_t) TMCpuTickGet(PVMCPUCC pVCpu);
|
---|
163 | VMM_INT_DECL(uint64_t) TMCpuTickGetNoCheck(PVMCPUCC pVCpu);
|
---|
164 | VMM_INT_DECL(bool) TMCpuTickCanUseRealTSC(PVMCC pVM, PVMCPUCC pVCpu, uint64_t *poffRealTSC, bool *pfParavirtTsc);
|
---|
165 | VMM_INT_DECL(uint64_t) TMCpuTickGetDeadlineAndTscOffset(PVMCC pVM, PVMCPUCC pVCpu, uint64_t *poffRealTsc,
|
---|
166 | bool *pfOffsettedTsc, bool *pfParavirtTsc,
|
---|
167 | uint64_t *puTscNow, uint64_t *puDeadlineVersion);
|
---|
168 | VMM_INT_DECL(int) TMCpuTickSet(PVMCC pVM, PVMCPUCC pVCpu, uint64_t u64Tick);
|
---|
169 | VMM_INT_DECL(int) TMCpuTickSetLastSeen(PVMCPUCC pVCpu, uint64_t u64LastSeenTick);
|
---|
170 | VMM_INT_DECL(uint64_t) TMCpuTickGetLastSeen(PVMCPUCC pVCpu);
|
---|
171 | VMMDECL(uint64_t) TMCpuTicksPerSecond(PVMCC pVM);
|
---|
172 | VMM_INT_DECL(bool) TMCpuTickIsTicking(PVMCPUCC pVCpu);
|
---|
173 |
|
---|
174 | #if defined(VBOX_VMM_TARGET_ARMV8)
|
---|
175 | VMM_INT_DECL(void) TMCpuSetVTimerNextActivation(PVMCPUCC pVCpu, uint64_t cNanoSecs);
|
---|
176 | VMM_INT_DECL(uint64_t) TMCpuGetVTimerActivationNano(PVMCPUCC pVCpu);
|
---|
177 | #endif
|
---|
178 | /** @} */
|
---|
179 |
|
---|
180 |
|
---|
181 | /** @name Timer Methods
|
---|
182 | * @{
|
---|
183 | */
|
---|
184 | /**
|
---|
185 | * Device timer callback function.
|
---|
186 | *
|
---|
187 | * @param pDevIns Device instance of the device which registered the timer.
|
---|
188 | * @param hTimer The timer handle.
|
---|
189 | * @param pvUser User argument specified upon timer creation.
|
---|
190 | */
|
---|
191 | typedef DECLCALLBACKTYPE(void, FNTMTIMERDEV,(PPDMDEVINS pDevIns, TMTIMERHANDLE hTimer, void *pvUser));
|
---|
192 | /** Pointer to a device timer callback function. */
|
---|
193 | typedef FNTMTIMERDEV *PFNTMTIMERDEV;
|
---|
194 |
|
---|
195 | /**
|
---|
196 | * USB device timer callback function.
|
---|
197 | *
|
---|
198 | * @param pUsbIns The USB device instance the timer is associated
|
---|
199 | * with.
|
---|
200 | * @param hTimer The timer handle.
|
---|
201 | * @param pvUser User argument specified upon timer creation.
|
---|
202 | */
|
---|
203 | typedef DECLCALLBACKTYPE(void, FNTMTIMERUSB,(PPDMUSBINS pUsbIns, TMTIMERHANDLE hTimer, void *pvUser));
|
---|
204 | /** Pointer to a timer callback for a USB device. */
|
---|
205 | typedef FNTMTIMERUSB *PFNTMTIMERUSB;
|
---|
206 |
|
---|
207 | /**
|
---|
208 | * Driver timer callback function.
|
---|
209 | *
|
---|
210 | * @param pDrvIns Device instance of the device which registered the timer.
|
---|
211 | * @param hTimer The timer handle.
|
---|
212 | * @param pvUser User argument specified upon timer creation.
|
---|
213 | */
|
---|
214 | typedef DECLCALLBACKTYPE(void, FNTMTIMERDRV,(PPDMDRVINS pDrvIns, TMTIMERHANDLE hTimer, void *pvUser));
|
---|
215 | /** Pointer to a driver timer callback function. */
|
---|
216 | typedef FNTMTIMERDRV *PFNTMTIMERDRV;
|
---|
217 |
|
---|
218 | /**
|
---|
219 | * Service timer callback function.
|
---|
220 | *
|
---|
221 | * @param pSrvIns Service instance of the device which registered the timer.
|
---|
222 | * @param hTimer The timer handle.
|
---|
223 | */
|
---|
224 | typedef DECLCALLBACKTYPE(void, FNTMTIMERSRV,(PPDMSRVINS pSrvIns, TMTIMERHANDLE hTimer));
|
---|
225 | /** Pointer to a service timer callback function. */
|
---|
226 | typedef FNTMTIMERSRV *PFNTMTIMERSRV;
|
---|
227 |
|
---|
228 | /**
|
---|
229 | * Internal timer callback function.
|
---|
230 | *
|
---|
231 | * @param pVM The cross context VM structure.
|
---|
232 | * @param hTimer The timer handle.
|
---|
233 | * @param pvUser User argument specified upon timer creation.
|
---|
234 | */
|
---|
235 | typedef DECLCALLBACKTYPE(void, FNTMTIMERINT,(PVM pVM, TMTIMERHANDLE hTimer, void *pvUser));
|
---|
236 | /** Pointer to internal timer callback function. */
|
---|
237 | typedef FNTMTIMERINT *PFNTMTIMERINT;
|
---|
238 |
|
---|
239 | /**
|
---|
240 | * External timer callback function.
|
---|
241 | *
|
---|
242 | * @param pvUser User argument as specified when the timer was created.
|
---|
243 | */
|
---|
244 | typedef DECLCALLBACKTYPE(void, FNTMTIMEREXT,(void *pvUser));
|
---|
245 | /** Pointer to an external timer callback function. */
|
---|
246 | typedef FNTMTIMEREXT *PFNTMTIMEREXT;
|
---|
247 |
|
---|
248 | VMMDECL(int) TMTimerLock(PVMCC pVM, TMTIMERHANDLE hTimer, int rcBusy);
|
---|
249 | VMMDECL(void) TMTimerUnlock(PVMCC pVM, TMTIMERHANDLE hTimer);
|
---|
250 | VMMDECL(bool) TMTimerIsLockOwner(PVMCC pVM, TMTIMERHANDLE hTimer);
|
---|
251 | VMMDECL(int) TMTimerSet(PVMCC pVM, TMTIMERHANDLE hTimer, uint64_t u64Expire);
|
---|
252 | VMMDECL(int) TMTimerSetRelative(PVMCC pVM, TMTIMERHANDLE hTimer, uint64_t cTicksToNext, uint64_t *pu64Now);
|
---|
253 | VMMDECL(int) TMTimerSetFrequencyHint(PVMCC pVM, TMTIMERHANDLE hTimer, uint32_t uHz);
|
---|
254 | VMMDECL(uint64_t) TMTimerGet(PVMCC pVM, TMTIMERHANDLE hTimer);
|
---|
255 | VMMDECL(int) TMTimerStop(PVMCC pVM, TMTIMERHANDLE hTimer);
|
---|
256 | VMMDECL(bool) TMTimerIsActive(PVMCC pVM, TMTIMERHANDLE hTimer);
|
---|
257 |
|
---|
258 | VMMDECL(int) TMTimerSetMillies(PVMCC pVM, TMTIMERHANDLE hTimer, uint32_t cMilliesToNext);
|
---|
259 | VMMDECL(int) TMTimerSetMicro(PVMCC pVM, TMTIMERHANDLE hTimer, uint64_t cMicrosToNext);
|
---|
260 | VMMDECL(int) TMTimerSetNano(PVMCC pVM, TMTIMERHANDLE hTimer, uint64_t cNanosToNext);
|
---|
261 | VMMDECL(uint64_t) TMTimerGetNano(PVMCC pVM, TMTIMERHANDLE hTimer);
|
---|
262 | VMMDECL(uint64_t) TMTimerGetMicro(PVMCC pVM, TMTIMERHANDLE hTimer);
|
---|
263 | VMMDECL(uint64_t) TMTimerGetMilli(PVMCC pVM, TMTIMERHANDLE hTimer);
|
---|
264 | VMMDECL(uint64_t) TMTimerGetFreq(PVMCC pVM, TMTIMERHANDLE hTimer);
|
---|
265 | VMMDECL(uint64_t) TMTimerGetExpire(PVMCC pVM, TMTIMERHANDLE hTimer);
|
---|
266 | VMMDECL(uint64_t) TMTimerToNano(PVMCC pVM, TMTIMERHANDLE hTimer, uint64_t cTicks);
|
---|
267 | VMMDECL(uint64_t) TMTimerToMicro(PVMCC pVM, TMTIMERHANDLE hTimer, uint64_t cTicks);
|
---|
268 | VMMDECL(uint64_t) TMTimerToMilli(PVMCC pVM, TMTIMERHANDLE hTimer, uint64_t cTicks);
|
---|
269 | VMMDECL(uint64_t) TMTimerFromNano(PVMCC pVM, TMTIMERHANDLE hTimer, uint64_t cNanoSecs);
|
---|
270 | VMMDECL(uint64_t) TMTimerFromMicro(PVMCC pVM, TMTIMERHANDLE hTimer, uint64_t cMicroSecs);
|
---|
271 | VMMDECL(uint64_t) TMTimerFromMilli(PVMCC pVM, TMTIMERHANDLE hTimer, uint64_t cMilliSecs);
|
---|
272 |
|
---|
273 | VMMDECL(bool) TMTimerPollBool(PVMCC pVM, PVMCPUCC pVCpu);
|
---|
274 | VMM_INT_DECL(uint64_t) TMTimerPollBoolWithNanoTS(PVMCC pVM, PVMCPUCC pVCpu, uint64_t *pnsNow);
|
---|
275 | VMM_INT_DECL(void) TMTimerPollVoid(PVMCC pVM, PVMCPUCC pVCpu);
|
---|
276 | VMM_INT_DECL(uint64_t) TMTimerPollGIP(PVMCC pVM, PVMCPUCC pVCpu, uint64_t *pu64Delta);
|
---|
277 | /** @} */
|
---|
278 |
|
---|
279 |
|
---|
280 | /** @defgroup grp_tm_r3 The TM Host Context Ring-3 API
|
---|
281 | * @{
|
---|
282 | */
|
---|
283 | VMM_INT_DECL(int) TMR3Init(PVM pVM);
|
---|
284 | VMM_INT_DECL(int) TMR3InitFinalize(PVM pVM);
|
---|
285 | VMM_INT_DECL(void) TMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
|
---|
286 | VMM_INT_DECL(int) TMR3Term(PVM pVM);
|
---|
287 | VMM_INT_DECL(void) TMR3Reset(PVM pVM);
|
---|
288 | VMM_INT_DECL(int) TMR3TimerCreateDevice(PVM pVM, PPDMDEVINS pDevIns, TMCLOCK enmClock, PFNTMTIMERDEV pfnCallback,
|
---|
289 | void *pvUser, uint32_t fFlags, const char *pszName, PTMTIMERHANDLE phTimer);
|
---|
290 | VMM_INT_DECL(int) TMR3TimerCreateUsb(PVM pVM, PPDMUSBINS pUsbIns, TMCLOCK enmClock, PFNTMTIMERUSB pfnCallback,
|
---|
291 | void *pvUser, uint32_t fFlags, const char *pszName, PTMTIMERHANDLE phTimer);
|
---|
292 | VMM_INT_DECL(int) TMR3TimerCreateDriver(PVM pVM, PPDMDRVINS pDrvIns, TMCLOCK enmClock, PFNTMTIMERDRV pfnCallback,
|
---|
293 | void *pvUser, uint32_t fFlags, const char *pszName, PTMTIMERHANDLE phTimer);
|
---|
294 | VMMR3DECL(int) TMR3TimerCreate(PVM pVM, TMCLOCK enmClock, PFNTMTIMERINT pfnCallback, void *pvUser, uint32_t fFlags,
|
---|
295 | const char *pszName, PTMTIMERHANDLE phTimer);
|
---|
296 | VMMR3DECL(int) TMR3TimerDestroy(PVM pVM, TMTIMERHANDLE hTimer);
|
---|
297 | VMM_INT_DECL(int) TMR3TimerDestroyDevice(PVM pVM, PPDMDEVINS pDevIns);
|
---|
298 | VMM_INT_DECL(int) TMR3TimerDestroyUsb(PVM pVM, PPDMUSBINS pUsbIns);
|
---|
299 | VMM_INT_DECL(int) TMR3TimerDestroyDriver(PVM pVM, PPDMDRVINS pDrvIns);
|
---|
300 | VMMR3DECL(int) TMR3TimerSave(PVMCC pVM, TMTIMERHANDLE hTimer, PSSMHANDLE pSSM);
|
---|
301 | VMMR3DECL(int) TMR3TimerLoad(PVMCC pVM, TMTIMERHANDLE hTimer, PSSMHANDLE pSSM);
|
---|
302 | VMMR3DECL(int) TMR3TimerSkip(PSSMHANDLE pSSM, bool *pfActive);
|
---|
303 | VMMR3DECL(int) TMR3TimerSetCritSect(PVMCC pVM, TMTIMERHANDLE hTimer, PPDMCRITSECT pCritSect);
|
---|
304 | VMMR3DECL(void) TMR3TimerQueuesDo(PVM pVM);
|
---|
305 | VMMR3_INT_DECL(void) TMR3VirtualSyncFF(PVM pVM, PVMCPU pVCpu);
|
---|
306 | VMMR3_INT_DECL(PRTTIMESPEC) TMR3UtcNow(PVM pVM, PRTTIMESPEC pTime);
|
---|
307 |
|
---|
308 | VMMR3_INT_DECL(int) TMR3CpuTickParavirtEnable(PVM pVM);
|
---|
309 | VMMR3_INT_DECL(int) TMR3CpuTickParavirtDisable(PVM pVM);
|
---|
310 | VMMR3_INT_DECL(bool) TMR3CpuTickIsFixedRateMonotonic(PVM pVM, bool fWithParavirtEnabled);
|
---|
311 | /** @} */
|
---|
312 |
|
---|
313 |
|
---|
314 | /** @defgroup grp_tm_r0 The TM Host Context Ring-0 API
|
---|
315 | * @{
|
---|
316 | */
|
---|
317 | VMMR0_INT_DECL(void) TMR0InitPerVMData(PGVM pGVM);
|
---|
318 | VMMR0_INT_DECL(void) TMR0CleanupVM(PGVM pGVM);
|
---|
319 | VMMR0_INT_DECL(int) TMR0TimerQueueGrow(PGVM pGVM, uint32_t idxQueue, uint32_t cMinTimers);
|
---|
320 | /** @} */
|
---|
321 |
|
---|
322 |
|
---|
323 | /** @} */
|
---|
324 |
|
---|
325 | RT_C_DECLS_END
|
---|
326 |
|
---|
327 | #endif /* !VBOX_INCLUDED_vmm_tm_h */
|
---|
328 |
|
---|