VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMR3/GIMKvm.cpp@ 56794

最後變更 在這個檔案從56794是 56794,由 vboxsync 提交於 10 年 前

VMM/GIM: Reset KVM's uTSC and uVirtNanoTS so it gets fresh values on VM reset, probably makes no difference but helps test the code more.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 17.9 KB
 
1/* $Id: GIMKvm.cpp 56794 2015-07-03 16:26:42Z vboxsync $ */
2/** @file
3 * GIM - Guest Interface Manager, KVM implementation.
4 */
5
6/*
7 * Copyright (C) 2015 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.alldomusa.eu.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18/*******************************************************************************
19* Header Files *
20*******************************************************************************/
21#define LOG_GROUP LOG_GROUP_GIM
22#include "GIMInternal.h"
23
24#include <iprt/asm-math.h>
25#include <iprt/assert.h>
26#include <iprt/err.h>
27#include <iprt/string.h>
28#include <iprt/mem.h>
29#include <iprt/spinlock.h>
30
31#include <VBox/vmm/cpum.h>
32#include <VBox/disopcode.h>
33#include <VBox/vmm/ssm.h>
34#include <VBox/vmm/vm.h>
35#include <VBox/vmm/hm.h>
36#include <VBox/vmm/pdmapi.h>
37#include <VBox/version.h>
38
39
40/*******************************************************************************
41* Defined Constants And Macros *
42*******************************************************************************/
43
44/**
45 * GIM KVM saved-state version.
46 */
47#define GIM_KVM_SAVED_STATE_VERSION UINT32_C(1)
48
49/**
50 * VBox internal struct. to passback to EMT rendezvous callback while enabling
51 * the KVM wall-clock.
52 */
53typedef struct KVMWALLCLOCKINFO
54{
55 /** Guest physical address of the wall-clock struct. */
56 RTGCPHYS GCPhysWallClock;
57} KVMWALLCLOCKINFO;
58/** Pointer to the wall-clock info. struct. */
59typedef KVMWALLCLOCKINFO *PKVMWALLCLOCKINFO;
60
61/*******************************************************************************
62* Global Variables *
63*******************************************************************************/
64#ifdef VBOX_WITH_STATISTICS
65# define GIMKVM_MSRRANGE(a_uFirst, a_uLast, a_szName) \
66 { (a_uFirst), (a_uLast), kCpumMsrRdFn_Gim, kCpumMsrWrFn_Gim, 0, 0, 0, 0, 0, a_szName, { 0 }, { 0 }, { 0 }, { 0 } }
67#else
68# define GIMKVM_MSRRANGE(a_uFirst, a_uLast, a_szName) \
69 { (a_uFirst), (a_uLast), kCpumMsrRdFn_Gim, kCpumMsrWrFn_Gim, 0, 0, 0, 0, 0, a_szName }
70#endif
71
72/**
73 * Array of MSR ranges supported by KVM.
74 */
75static CPUMMSRRANGE const g_aMsrRanges_Kvm[] =
76{
77 GIMKVM_MSRRANGE(MSR_GIM_KVM_RANGE0_START, MSR_GIM_KVM_RANGE0_END, "KVM range 0"),
78 GIMKVM_MSRRANGE(MSR_GIM_KVM_RANGE1_START, MSR_GIM_KVM_RANGE1_END, "KVM range 1")
79};
80#undef GIMKVM_MSRRANGE
81
82
83/**
84 * Initializes the KVM GIM provider.
85 *
86 * @returns VBox status code.
87 * @param pVM Pointer to the VM.
88 * @param uVersion The interface version this VM should use.
89 */
90VMMR3_INT_DECL(int) gimR3KvmInit(PVM pVM)
91{
92 AssertReturn(pVM, VERR_INVALID_PARAMETER);
93 AssertReturn(pVM->gim.s.enmProviderId == GIMPROVIDERID_KVM, VERR_INTERNAL_ERROR_5);
94
95 int rc;
96 PGIMKVM pKvm = &pVM->gim.s.u.Kvm;
97
98 /*
99 * Determine interface capabilities based on the version.
100 */
101 if (!pVM->gim.s.u32Version)
102 {
103 /* Basic features. */
104 pKvm->uBaseFeat = 0
105 | GIM_KVM_BASE_FEAT_CLOCK_OLD
106 //| GIM_KVM_BASE_FEAT_NOP_IO_DELAY
107 //| GIM_KVM_BASE_FEAT_MMU_OP
108 | GIM_KVM_BASE_FEAT_CLOCK
109 //| GIM_KVM_BASE_FEAT_ASYNC_PF
110 //| GIM_KVM_BASE_FEAT_STEAL_TIME
111 //| GIM_KVM_BASE_FEAT_PV_EOI
112 | GIM_KVM_BASE_FEAT_PV_UNHALT
113 ;
114 /* Rest of the features are determined in gimR3KvmInitCompleted(). */
115 }
116
117 /*
118 * Expose HVP (Hypervisor Present) bit to the guest.
119 */
120 CPUMSetGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_HVP);
121
122 /*
123 * Modify the standard hypervisor leaves for KVM.
124 */
125 CPUMCPUIDLEAF HyperLeaf;
126 RT_ZERO(HyperLeaf);
127 HyperLeaf.uLeaf = UINT32_C(0x40000000);
128 HyperLeaf.uEax = UINT32_C(0x40000001); /* Minimum value for KVM is 0x40000001. */
129 HyperLeaf.uEbx = 0x4B4D564B; /* 'KVMK' */
130 HyperLeaf.uEcx = 0x564B4D56; /* 'VMKV' */
131 HyperLeaf.uEdx = 0x0000004D; /* 'M000' */
132 rc = CPUMR3CpuIdInsert(pVM, &HyperLeaf);
133 AssertLogRelRCReturn(rc, rc);
134
135 /*
136 * Add KVM specific leaves.
137 */
138 HyperLeaf.uLeaf = UINT32_C(0x40000001);
139 HyperLeaf.uEax = pKvm->uBaseFeat;
140 HyperLeaf.uEbx = 0; /* Reserved */
141 HyperLeaf.uEcx = 0; /* Reserved */
142 HyperLeaf.uEdx = 0; /* Reserved */
143 rc = CPUMR3CpuIdInsert(pVM, &HyperLeaf);
144 AssertLogRelRCReturn(rc, rc);
145
146 /*
147 * Insert all MSR ranges of KVM.
148 */
149 for (unsigned i = 0; i < RT_ELEMENTS(g_aMsrRanges_Kvm); i++)
150 {
151 rc = CPUMR3MsrRangesInsert(pVM, &g_aMsrRanges_Kvm[i]);
152 AssertLogRelRCReturn(rc, rc);
153 }
154
155 /*
156 * Setup hypercall and #UD handling.
157 */
158 for (VMCPUID i = 0; i < pVM->cCpus; i++)
159 VMMHypercallsEnable(&pVM->aCpus[i]);
160
161 if (ASMIsAmdCpu())
162 {
163 pKvm->fTrapXcptUD = true;
164 pKvm->uOpCodeNative = OP_VMMCALL;
165 }
166 else
167 {
168 Assert(ASMIsIntelCpu() || ASMIsViaCentaurCpu());
169 pKvm->fTrapXcptUD = false;
170 pKvm->uOpCodeNative = OP_VMCALL;
171 }
172
173 /* We always need to trap VMCALL/VMMCALL hypercall using #UDs for raw-mode VMs. */
174 if (!HMIsEnabled(pVM))
175 pKvm->fTrapXcptUD = true;
176
177 return VINF_SUCCESS;
178}
179
180
181/**
182 * Initializes remaining bits of the KVM provider.
183 *
184 * This is called after initializing HM and almost all other VMM components.
185 *
186 * @returns VBox status code.
187 * @param pVM Pointer to the VM.
188 */
189VMMR3_INT_DECL(int) gimR3KvmInitCompleted(PVM pVM)
190{
191 PGIMKVM pKvm = &pVM->gim.s.u.Kvm;
192 pKvm->cTscTicksPerSecond = TMCpuTicksPerSecond(pVM);
193
194 if (TMR3CpuTickIsFixedRateMonotonic(pVM, true /* fWithParavirtEnabled */))
195 {
196 /** @todo We might want to consider just enabling this bit *always*. As far
197 * as I can see in the Linux guest, the "TSC_STABLE" bit is only
198 * translated as a "monotonic" bit which even in Async systems we
199 * -should- be reporting a strictly monotonic TSC to the guest. */
200 pKvm->uBaseFeat |= GIM_KVM_BASE_FEAT_TSC_STABLE;
201
202 CPUMCPUIDLEAF HyperLeaf;
203 RT_ZERO(HyperLeaf);
204 HyperLeaf.uLeaf = UINT32_C(0x40000001);
205 HyperLeaf.uEax = pKvm->uBaseFeat;
206 HyperLeaf.uEbx = 0;
207 HyperLeaf.uEcx = 0;
208 HyperLeaf.uEdx = 0;
209 int rc = CPUMR3CpuIdInsert(pVM, &HyperLeaf);
210 AssertLogRelRCReturn(rc, rc);
211 }
212 return VINF_SUCCESS;
213}
214
215
216/**
217 * Terminates the KVM GIM provider.
218 *
219 * @returns VBox status code.
220 * @param pVM Pointer to the VM.
221 */
222VMMR3_INT_DECL(int) gimR3KvmTerm(PVM pVM)
223{
224 gimR3KvmReset(pVM);
225 return VINF_SUCCESS;
226}
227
228
229/**
230 * Applies relocations to data and code managed by this component.
231 *
232 * This function will be called at init and whenever the VMM need to relocate
233 * itself inside the GC.
234 *
235 * @param pVM Pointer to the VM.
236 * @param offDelta Relocation delta relative to old location.
237 */
238VMMR3_INT_DECL(void) gimR3KvmRelocate(PVM pVM, RTGCINTPTR offDelta)
239{
240 NOREF(pVM); NOREF(offDelta);
241}
242
243
244/**
245 * This resets KVM provider MSRs and unmaps whatever KVM regions that
246 * the guest may have mapped.
247 *
248 * This is called when the VM is being reset.
249 *
250 * @param pVM Pointer to the VM.
251 * @thread EMT(0).
252 */
253VMMR3_INT_DECL(void) gimR3KvmReset(PVM pVM)
254{
255 VM_ASSERT_EMT0(pVM);
256 LogRel(("GIM: KVM: Resetting MSRs\n"));
257
258 /*
259 * Reset MSRs.
260 */
261 PGIMKVM pKvm = &pVM->gim.s.u.Kvm;
262 pKvm->u64WallClockMsr = 0;
263 for (VMCPUID iCpu = 0; iCpu < pVM->cCpus; iCpu++)
264 {
265 PGIMKVMCPU pKvmCpu = &pVM->aCpus[iCpu].gim.s.u.KvmCpu;
266 pKvmCpu->u64SystemTimeMsr = 0;
267 pKvmCpu->uTsc = 0;
268 pKvmCpu->uVirtNanoTS = 0;
269 }
270}
271
272
273/**
274 * KVM state-save operation.
275 *
276 * @returns VBox status code.
277 * @param pVM Pointer to the VM.
278 * @param pSSM Pointer to the SSM handle.
279 */
280VMMR3_INT_DECL(int) gimR3KvmSave(PVM pVM, PSSMHANDLE pSSM)
281{
282 PCGIMKVM pcKvm = &pVM->gim.s.u.Kvm;
283
284 /*
285 * Save the KVM SSM version.
286 */
287 SSMR3PutU32(pSSM, GIM_KVM_SAVED_STATE_VERSION);
288
289 /*
290 * Save per-VCPU data.
291 */
292 for (uint32_t i = 0; i < pVM->cCpus; i++)
293 {
294 PCGIMKVMCPU pcKvmCpu = &pVM->aCpus[i].gim.s.u.KvmCpu;
295
296 /* Guest may alter flags (namely GIM_KVM_SYSTEM_TIME_FLAGS_GUEST_PAUSED bit). So re-read them from guest-memory. */
297 GIMKVMSYSTEMTIME SystemTime;
298 RT_ZERO(SystemTime);
299 if (MSR_GIM_KVM_SYSTEM_TIME_IS_ENABLED(pcKvmCpu->u64SystemTimeMsr))
300 {
301 int rc = PGMPhysSimpleReadGCPhys(pVM, &SystemTime, pcKvmCpu->GCPhysSystemTime, sizeof(GIMKVMSYSTEMTIME));
302 AssertRCReturn(rc, rc);
303 }
304
305 SSMR3PutU64(pSSM, pcKvmCpu->u64SystemTimeMsr);
306 SSMR3PutU64(pSSM, pcKvmCpu->uTsc);
307 SSMR3PutU64(pSSM, pcKvmCpu->uVirtNanoTS);
308 SSMR3PutGCPhys(pSSM, pcKvmCpu->GCPhysSystemTime);
309 SSMR3PutU32(pSSM, pcKvmCpu->u32SystemTimeVersion);
310 SSMR3PutU8(pSSM, SystemTime.fFlags);
311 }
312
313 /*
314 * Save per-VM data.
315 */
316 SSMR3PutU64(pSSM, pcKvm->u64WallClockMsr);
317 return SSMR3PutU32(pSSM, pcKvm->uBaseFeat);
318}
319
320
321/**
322 * KVM state-load operation, final pass.
323 *
324 * @returns VBox status code.
325 * @param pVM Pointer to the VM.
326 * @param pSSM Pointer to the SSM handle.
327 * @param uSSMVersion The GIM saved-state version.
328 */
329VMMR3_INT_DECL(int) gimR3KvmLoad(PVM pVM, PSSMHANDLE pSSM, uint32_t uSSMVersion)
330{
331 /*
332 * Load the KVM SSM version first.
333 */
334 uint32_t uKvmSavedStatVersion;
335 int rc = SSMR3GetU32(pSSM, &uKvmSavedStatVersion);
336 AssertRCReturn(rc, rc);
337 if (uKvmSavedStatVersion != GIM_KVM_SAVED_STATE_VERSION)
338 return SSMR3SetLoadError(pSSM, VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION, RT_SRC_POS,
339 N_("Unsupported KVM saved-state version %u (expected %u)."), uKvmSavedStatVersion,
340 GIM_KVM_SAVED_STATE_VERSION);
341
342 /*
343 * Update the TSC frequency from TM.
344 */
345 PGIMKVM pKvm = &pVM->gim.s.u.Kvm;
346 pKvm->cTscTicksPerSecond = TMCpuTicksPerSecond(pVM);
347
348 /*
349 * Load per-VCPU data.
350 */
351 for (uint32_t i = 0; i < pVM->cCpus; i++)
352 {
353 PVMCPU pVCpu = &pVM->aCpus[i];
354 PGIMKVMCPU pKvmCpu = &pVCpu->gim.s.u.KvmCpu;
355
356 uint8_t fSystemTimeFlags = 0;
357 SSMR3GetU64(pSSM, &pKvmCpu->u64SystemTimeMsr);
358 SSMR3GetU64(pSSM, &pKvmCpu->uTsc);
359 SSMR3GetU64(pSSM, &pKvmCpu->uVirtNanoTS);
360 SSMR3GetGCPhys(pSSM, &pKvmCpu->GCPhysSystemTime);
361 SSMR3GetU32(pSSM, &pKvmCpu->u32SystemTimeVersion);
362 rc = SSMR3GetU8(pSSM, &pKvmCpu->fSystemTimeFlags);
363 AssertRCReturn(rc, rc);
364
365 /* Enable the system-time struct. if necessary. */
366 /** @todo update guest struct only if cTscTicksPerSecond doesn't match host
367 * anymore. */
368 if (MSR_GIM_KVM_SYSTEM_TIME_IS_ENABLED(pKvmCpu->u64SystemTimeMsr))
369 {
370 Assert(!TMVirtualIsTicking(pVM)); /* paranoia. */
371 Assert(!TMCpuTickIsTicking(pVCpu));
372 rc = gimR3KvmEnableSystemTime(pVM, pVCpu);
373 AssertRCReturn(rc, rc);
374 }
375 }
376
377 /*
378 * Load per-VM data.
379 */
380 SSMR3GetU64(pSSM, &pKvm->u64WallClockMsr);
381 rc = SSMR3GetU32(pSSM, &pKvm->uBaseFeat);
382 AssertRCReturn(rc, rc);
383
384 return VINF_SUCCESS;
385}
386
387
388/**
389 * Enables the KVM VCPU system-time structure.
390 *
391 * @returns VBox status code.
392 * @param pVM Pointer to the VM.
393 * @param pVCpu Pointer to the VMCPU.
394 *
395 * @remarks Don't do any release assertions here, these can be triggered by
396 * guest R0 code.
397 */
398VMMR3_INT_DECL(int) gimR3KvmEnableSystemTime(PVM pVM, PVMCPU pVCpu)
399{
400 PGIMKVM pKvm = &pVM->gim.s.u.Kvm;
401 PGIMKVMCPU pKvmCpu = &pVCpu->gim.s.u.KvmCpu;
402
403 /*
404 * Validate the mapping address first.
405 */
406 if (!PGMPhysIsGCPhysNormal(pVM, pKvmCpu->GCPhysSystemTime))
407 {
408 LogRel(("GIM: KVM: VCPU%3d: Invalid physical addr requested for mapping system-time struct. GCPhysSystemTime=%#RGp\n",
409 pKvmCpu->GCPhysSystemTime));
410 return VERR_GIM_OPERATION_FAILED;
411 }
412
413 /*
414 * Construct the system-time struct.
415 */
416 GIMKVMSYSTEMTIME SystemTime;
417 RT_ZERO(SystemTime);
418 SystemTime.u32Version = pKvmCpu->u32SystemTimeVersion;
419 SystemTime.u64NanoTS = pKvmCpu->uVirtNanoTS;
420 SystemTime.u64Tsc = pKvmCpu->uTsc;
421 SystemTime.fFlags = pKvmCpu->fSystemTimeFlags | GIM_KVM_SYSTEM_TIME_FLAGS_TSC_STABLE;
422
423 /*
424 * How the guest calculates the system time (nanoseconds):
425 *
426 * tsc = rdtsc - SysTime.u64Tsc
427 * if (SysTime.i8TscShift >= 0)
428 * tsc <<= i8TscShift;
429 * else
430 * tsc >>= -i8TscShift;
431 * time = ((tsc * SysTime.u32TscScale) >> 32) + SysTime.u64NanoTS
432 */
433 uint64_t u64TscFreq = pKvm->cTscTicksPerSecond;
434 SystemTime.i8TscShift = 0;
435 while (u64TscFreq > 2 * RT_NS_1SEC_64)
436 {
437 u64TscFreq >>= 1;
438 SystemTime.i8TscShift--;
439 }
440 uint32_t uTscFreqLo = (uint32_t)u64TscFreq;
441 while (uTscFreqLo <= RT_NS_1SEC)
442 {
443 uTscFreqLo <<= 1;
444 SystemTime.i8TscShift++;
445 }
446 SystemTime.u32TscScale = ASMDivU64ByU32RetU32(RT_NS_1SEC_64 << 32, uTscFreqLo);
447
448 /*
449 * Update guest memory with the system-time struct.
450 */
451 Assert(!(SystemTime.u32Version & UINT32_C(1)));
452 int rc = PGMPhysSimpleWriteGCPhys(pVM, pKvmCpu->GCPhysSystemTime, &SystemTime, sizeof(GIMKVMSYSTEMTIME));
453 if (RT_SUCCESS(rc))
454 {
455 LogRel(("GIM: KVM: VCPU%3d: Enabled system-time struct. at %#RGp - u32TscScale=%#RX32 i8TscShift=%d uVersion=%#RU32 "
456 "fFlags=%#x uTsc=%#RX64 uVirtNanoTS=%#RX64\n", pVCpu->idCpu, pKvmCpu->GCPhysSystemTime, SystemTime.u32TscScale,
457 SystemTime.i8TscShift, SystemTime.u32Version, SystemTime.fFlags, pKvmCpu->uTsc, pKvmCpu->uVirtNanoTS));
458 TMR3CpuTickParavirtEnable(pVM);
459 }
460 else
461 LogRel(("GIM: KVM: VCPU%3d: Failed to write system-time struct. at %#RGp. rc=%Rrc\n", pKvmCpu->GCPhysSystemTime, rc));
462
463 return rc;
464}
465
466
467/**
468 * Disables the KVM system-time struct.
469 *
470 * @returns VBox status code.
471 * @param pVM Pointer to the VM.
472 */
473VMMR3_INT_DECL(int) gimR3KvmDisableSystemTime(PVM pVM)
474{
475 TMR3CpuTickParavirtDisable(pVM);
476 return VINF_SUCCESS;
477}
478
479
480/**
481 * @callback_method_impl{PFNVMMEMTRENDEZVOUS,
482 * Worker for gimR3KvmEnableWallClock}
483 */
484static DECLCALLBACK(VBOXSTRICTRC) gimR3KvmEnableWallClockCallback(PVM pVM, PVMCPU pVCpu, void *pvData)
485{
486 Assert(pvData);
487 PKVMWALLCLOCKINFO pWallClockInfo = (PKVMWALLCLOCKINFO)pvData;
488 RTGCPHYS GCPhysWallClock = pWallClockInfo->GCPhysWallClock;
489
490 /*
491 * Read the wall-clock version (sequence) from the guest.
492 */
493 uint32_t uVersion;
494 Assert(PGMPhysIsGCPhysNormal(pVM, GCPhysWallClock));
495 int rc = PGMPhysSimpleReadGCPhys(pVM, &uVersion, GCPhysWallClock, sizeof(uVersion));
496 if (RT_FAILURE(rc))
497 {
498 LogRel(("GIM: KVM: Failed to read wall-clock struct. version at %#RGp. rc=%Rrc\n", GCPhysWallClock, rc));
499 return rc;
500 }
501
502 /*
503 * Ensure the version is incrementally even.
504 */
505 if (!(uVersion & 1))
506 ++uVersion;
507 ++uVersion;
508
509 /*
510 * Update wall-clock guest struct. with UTC information.
511 */
512 RTTIMESPEC TimeSpec;
513 int32_t iSec;
514 int32_t iNano;
515 TMR3UtcNow(pVM, &TimeSpec);
516 RTTimeSpecGetSecondsAndNano(&TimeSpec, &iSec, &iNano);
517
518 GIMKVMWALLCLOCK WallClock;
519 RT_ZERO(WallClock);
520 AssertCompile(sizeof(uVersion) == sizeof(WallClock.u32Version));
521 WallClock.u32Version = uVersion;
522 WallClock.u32Sec = iSec;
523 WallClock.u32Nano = iNano;
524
525 /*
526 * Write out the wall-clock struct. to guest memory.
527 */
528 Assert(!(WallClock.u32Version & 1));
529 rc = PGMPhysSimpleWriteGCPhys(pVM, GCPhysWallClock, &WallClock, sizeof(GIMKVMWALLCLOCK));
530 if (RT_SUCCESS(rc))
531 {
532 LogRel(("GIM: KVM: Enabled wall-clock struct. at %#RGp - u32Sec=%u u32Nano=%u uVersion=%#RU32\n", GCPhysWallClock,
533 WallClock.u32Sec, WallClock.u32Nano, WallClock.u32Version));
534 }
535 else
536 LogRel(("GIM: KVM: Failed to write wall-clock struct. at %#RGp. rc=%Rrc\n", GCPhysWallClock, rc));
537 return rc;
538}
539
540
541/**
542 * Enables the KVM wall-clock structure.
543 *
544 * Since the wall-clock can be read by any VCPU but it is a global struct. in
545 * guest-memory, we do an EMT rendezvous here to be on the safe side. The
546 * alternative is to use an MMIO2 region and use the WallClock.u32Version field
547 * for transactional update. However, this MSR is rarely written to (typically
548 * once during bootup) it's currently not a performance issue especially since
549 * we're already in ring-3. If we really wanted better performance in this code
550 * path, we should be doing it in ring-0 with transactional update while make
551 * sure there is only 1 writer as well.
552 *
553 * @returns VBox status code.
554 * @param pVM Pointer to the VM.
555 * @param GCPhysWallClock Where the guest wall-clock structure is located.
556 * @param uVersion The version (sequence number) value to use.
557 *
558 * @remarks Don't do any release assertions here, these can be triggered by
559 * guest R0 code.
560 */
561VMMR3_INT_DECL(int) gimR3KvmEnableWallClock(PVM pVM, RTGCPHYS GCPhysWallClock)
562{
563 KVMWALLCLOCKINFO WallClockInfo;
564 WallClockInfo.GCPhysWallClock = GCPhysWallClock;
565 return VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ONCE, gimR3KvmEnableWallClockCallback, &WallClockInfo);
566}
567
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette