Index: /trunk/src/VBox/VMM/VMMAll/GIMAllKvm.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/GIMAllKvm.cpp	(revision 55509)
+++ /trunk/src/VBox/VMM/VMMAll/GIMAllKvm.cpp	(revision 55510)
@@ -255,7 +255,7 @@
 
             /* Enable and populate the system-time struct. */
-            pKvmCpu->u64SystemTimeMsr     = uRawValue;
-            pKvmCpu->GCPhysSystemTime     = MSR_GIM_KVM_SYSTEM_TIME_GUEST_GPA(uRawValue);
-            pKvmCpu->u32SystemTimeVersion = pKvmCpu->u32SystemTimeVersion + 2;
+            pKvmCpu->u64SystemTimeMsr      = uRawValue;
+            pKvmCpu->GCPhysSystemTime      = MSR_GIM_KVM_SYSTEM_TIME_GUEST_GPA(uRawValue);
+            pKvmCpu->u32SystemTimeVersion += 2;
             int rc = gimR3KvmEnableSystemTime(pVM, pVCpu, pKvmCpu, fFlags);
             if (RT_FAILURE(rc))
@@ -279,6 +279,5 @@
             if (RT_LIKELY(RT_ALIGN_64(GCPhysWallClock, 4) == GCPhysWallClock))
             {
-                uint32_t uVersion = 2;
-                int rc = gimR3KvmEnableWallClock(pVM, GCPhysWallClock, uVersion);
+                int rc = gimR3KvmEnableWallClock(pVM, GCPhysWallClock);
                 if (RT_SUCCESS(rc))
                 {
Index: /trunk/src/VBox/VMM/VMMR3/GIMKvm.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/GIMKvm.cpp	(revision 55509)
+++ /trunk/src/VBox/VMM/VMMR3/GIMKvm.cpp	(revision 55510)
@@ -47,4 +47,15 @@
 #define GIM_KVM_SAVED_STATE_VERSION         UINT32_C(1)
 
+/**
+ * VBox internal struct. to passback to EMT rendezvous callback while enabling
+ * the KVM wall-clock.
+ */
+typedef struct KVMWALLCLOCKINFO
+{
+    /** Guest physical address of the wall-clock struct.  */
+    RTGCPHYS GCPhysWallClock;
+} KVMWALLCLOCKINFO;
+/** Pointer to the wall-clock info. struct. */
+typedef KVMWALLCLOCKINFO *PKVMWALLCLOCKINFO;
 
 /*******************************************************************************
@@ -438,5 +449,72 @@
 
 /**
+ * @callback_method_impl{PFNVMMEMTRENDEZVOUS,
+ *      Worker for gimR3KvmEnableWallClock}
+ */
+static DECLCALLBACK(VBOXSTRICTRC) gimR3KvmEnableWallClockCallback(PVM pVM, PVMCPU pVCpu, void *pvData)
+{
+    Assert(pvData);
+    PKVMWALLCLOCKINFO pWallClockInfo  = (PKVMWALLCLOCKINFO)pvData;
+    RTGCPHYS          GCPhysWallClock = pWallClockInfo->GCPhysWallClock;
+
+    /*
+     * Read the wall-clock version (sequence) from the guest.
+     */
+    uint32_t uVersion;
+    Assert(PGMPhysIsGCPhysNormal(pVM, GCPhysWallClock));
+    int rc = PGMPhysSimpleReadGCPhys(pVM, &uVersion, GCPhysWallClock, sizeof(uVersion));
+    if (RT_FAILURE(rc))
+    {
+        LogRel(("GIM: KVM: Failed to read wall-clock struct. version at %#RGp. rc=%Rrc\n", GCPhysWallClock, rc));
+        return rc;
+    }
+
+    /*
+     * Ensure the version is incrementally even.
+     */
+    if (!(uVersion & 1))
+        ++uVersion;
+    ++uVersion;
+
+    /*
+     * Update wall-clock guest struct. with UTC information.
+     */
+    RTTIMESPEC TimeSpec;
+    int32_t    iSec;
+    int32_t    iNano;
+    TMR3UtcNow(pVM, &TimeSpec);
+    RTTimeSpecGetSecondsAndNano(&TimeSpec, &iSec, &iNano);
+
+    GIMKVMWALLCLOCK WallClock;
+    RT_ZERO(WallClock);
+    AssertCompile(sizeof(uVersion) == sizeof(WallClock.u32Version));
+    WallClock.u32Version = uVersion;
+    WallClock.u32Sec     = iSec;
+    WallClock.u32Nano    = iNano;
+
+    /*
+     * Write out the wall-clock struct. to guest memory.
+     */
+    Assert(!(WallClock.u32Version & 1));
+    rc = PGMPhysSimpleWriteGCPhys(pVM, GCPhysWallClock, &WallClock, sizeof(GIMKVMWALLCLOCK));
+    if (RT_SUCCESS(rc))
+    {
+        LogRel(("GIM: KVM: Enabled wall-clock struct. at %#RGp - u32Sec=%u u32Nano=%u uVersion=%#RU32\n", GCPhysWallClock,
+                WallClock.u32Sec, WallClock.u32Nano, WallClock.u32Version));
+    }
+    else
+        LogRel(("GIM: KVM: Failed to write wall-clock struct. at %#RGp. rc=%Rrc\n", GCPhysWallClock, rc));
+    return rc;
+}
+
+
+/**
  * Enables the KVM wall-clock structure.
+ *
+ * Since the wall-clock can be read by any VCPU but it is a global struct. in
+ * guest-memory, we do an EMT rendezvous here to be on the safe side. The
+ * alternative is to use an MMIO2 region and use the WallClock.u32Version field
+ * for transactional update. However, this MSR is rarely written to (typically
+ * once during bootup) it's currently not a performance issue.
  *
  * @returns VBox status code.
@@ -448,31 +526,9 @@
  *          guest R0 code.
  */
-VMMR3_INT_DECL(int) gimR3KvmEnableWallClock(PVM pVM, RTGCPHYS GCPhysWallClock, uint32_t uVersion)
-{
-    RTTIMESPEC TimeSpec;
-    int32_t    iSec;
-    int32_t    iNano;
-
-    TMR3UtcNow(pVM, &TimeSpec);
-    RTTimeSpecGetSecondsAndNano(&TimeSpec, &iSec, &iNano);
-
-    GIMKVMWALLCLOCK WallClock;
-    RT_ZERO(WallClock);
-    WallClock.u32Version = uVersion;
-    WallClock.u32Sec     = iSec;
-    WallClock.u32Nano    = iNano;
-
-    Assert(PGMPhysIsGCPhysNormal(pVM, GCPhysWallClock));
-    Assert(!(WallClock.u32Version & UINT32_C(1)));
-    int rc = PGMPhysSimpleWriteGCPhys(pVM, GCPhysWallClock, &WallClock, sizeof(GIMKVMWALLCLOCK));
-    if (RT_SUCCESS(rc))
-    {
-        LogRel(("GIM: KVM: Enabled wall-clock struct. at %#RGp - u32Sec=%u u32Nano=%u uVersion=%#RU32\n", GCPhysWallClock,
-                WallClock.u32Sec, WallClock.u32Nano, WallClock.u32Version));
-    }
-    else
-        LogRel(("GIM: KVM: Failed to write wall-clock struct. at %#RGp. rc=%Rrc\n", GCPhysWallClock, rc));
-
-    return rc;
-}
-
+VMMR3_INT_DECL(int) gimR3KvmEnableWallClock(PVM pVM, RTGCPHYS GCPhysWallClock)
+{
+    KVMWALLCLOCKINFO WallClockInfo;
+    WallClockInfo.GCPhysWallClock = GCPhysWallClock;
+    return VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ONCE, gimR3KvmEnableWallClockCallback, &WallClockInfo);
+}
+
Index: /trunk/src/VBox/VMM/include/GIMKvmInternal.h
===================================================================
--- /trunk/src/VBox/VMM/include/GIMKvmInternal.h	(revision 55509)
+++ /trunk/src/VBox/VMM/include/GIMKvmInternal.h	(revision 55510)
@@ -253,5 +253,5 @@
 VMMR3_INT_DECL(int)             gimR3KvmDisableSystemTime(PVM pVM);
 VMMR3_INT_DECL(int)             gimR3KvmEnableSystemTime(PVM pVM, PVMCPU pVCpu, PGIMKVMCPU pKvmCpu, uint8_t fFlags);
-VMMR3_INT_DECL(int)             gimR3KvmEnableWallClock(PVM pVM, RTGCPHYS GCPhysSysTime, uint32_t uVersion);
+VMMR3_INT_DECL(int)             gimR3KvmEnableWallClock(PVM pVM, RTGCPHYS GCPhysSysTime);
 #endif /* IN_RING3 */
 
