Index: trunk/src/VBox/VMM/VMMAll/TMAllVirtual.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMAll/TMAllVirtual.cpp	(revision 107202)
+++ trunk/src/VBox/VMM/VMMAll/TMAllVirtual.cpp	(revision 107203)
@@ -101,8 +101,9 @@
      * Invalid GIP is fatal, though we have to allow no GIP in driverless mode (ring-3 only).
      */
+#ifdef VBOX_WITH_R0_MODULES
     PSUPGLOBALINFOPAGE pGip = g_pSUPGlobalInfoPage;
-#ifdef IN_RING3
+# ifdef IN_RING3
     if (pGip)
-#endif
+# endif
     {
         AssertFatalMsg(RT_VALID_PTR(pGip), ("pVM=%p pGip=%p\n", pVM, pGip));
@@ -114,18 +115,18 @@
          * Determine the new worker.
          */
-#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
+# if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
         bool const fLFence = RT_BOOL(ASMCpuId_EDX(1) & X86_CPUID_FEATURE_EDX_SSE2);
-#endif
+# endif
         switch (pGip->u32Mode)
         {
             case SUPGIPMODE_INVARIANT_TSC:
             case SUPGIPMODE_SYNC_TSC:
-#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
-# ifdef IN_RING0
+# if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
+#  ifdef IN_RING0
                 if (pGip->enmUseTscDelta <= SUPGIPUSETSCDELTA_ROUGHLY_ZERO)
                     pfnWorker = fLFence ? RTTimeNanoTSLFenceSyncInvarNoDelta    : RTTimeNanoTSLegacySyncInvarNoDelta;
                 else
                     pfnWorker = fLFence ? RTTimeNanoTSLFenceSyncInvarWithDelta  : RTTimeNanoTSLegacySyncInvarWithDelta;
-# else
+#  else
                 if (pGip->fGetGipCpu & SUPGIPGETCPU_IDTR_LIMIT_MASK_MAX_SET_CPUS)
                     pfnWorker = pGip->enmUseTscDelta <= SUPGIPUSETSCDELTA_PRACTICALLY_ZERO
@@ -148,27 +149,27 @@
                               ? fLFence ? RTTimeNanoTSLFenceSyncInvarNoDelta            : RTTimeNanoTSLegacySyncInvarNoDelta
                               : fLFence ? RTTimeNanoTSLFenceSyncInvarWithDeltaUseApicId : RTTimeNanoTSLegacySyncInvarWithDeltaUseApicId;
-# endif
-#else  /* !AMD64 && !X86 */
+#  endif
+# else  /* !AMD64 && !X86 */
                 if (pGip->enmUseTscDelta <= SUPGIPUSETSCDELTA_ROUGHLY_ZERO)
                     pfnWorker = RTTimeNanoTSSyncInvarNoDelta;
                 else
                 {
-# ifdef IN_RING0
+#  ifdef IN_RING0
                     pfnWorker = RTTimeNanoTSSyncInvarWithDelta;
-# elif defined(RT_ARCH_ARM64)
+#  elif defined(RT_ARCH_ARM64)
                     AssertFatal(pGip->fGetGipCpu & SUPGIPGETCPU_TPIDRRO_EL0);
                     pfnWorker = RTTimeNanoTSSyncInvarWithDeltaUseTpIdRRo;
-# else
-#  error "port me"
-# endif
+#  else
+#   error "port me"
+#  endif
                 }
-#endif /* !AMD64 && !X86 */
+# endif /* !AMD64 && !X86 */
                 break;
 
             case SUPGIPMODE_ASYNC_TSC:
-#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
-# ifdef IN_RING0
+# if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
+#  ifdef IN_RING0
                 pfnWorker = fLFence ? RTTimeNanoTSLFenceAsync : RTTimeNanoTSLegacyAsync;
-# else
+#  else
                 if (pGip->fGetGipCpu & SUPGIPGETCPU_IDTR_LIMIT_MASK_MAX_SET_CPUS)
                     pfnWorker = fLFence ? RTTimeNanoTSLFenceAsyncUseIdtrLim     : RTTimeNanoTSLegacyAsyncUseIdtrLim;
@@ -183,15 +184,15 @@
                 else
                     pfnWorker = fLFence ? RTTimeNanoTSLFenceAsyncUseApicId      : RTTimeNanoTSLegacyAsyncUseApicId;
-# endif
-#else  /* !AMD64 && !X86 */
-# ifdef IN_RING0
+#  endif
+# else  /* !AMD64 && !X86 */
+#  ifdef IN_RING0
                 pfnWorker = RTTimeNanoTSASync;
-# elif defined(RT_ARCH_ARM64)
+#  elif defined(RT_ARCH_ARM64)
                 AssertFatal(pGip->fGetGipCpu & SUPGIPGETCPU_TPIDRRO_EL0);
                 pfnWorker = RTTimeNanoTSSyncInvarWithDeltaUseTpIdRRo;
-# else
-#  error "port me"
-# endif
-#endif /* !AMD64 && !X86 */
+#  else
+#   error "port me"
+#  endif
+# endif /* !AMD64 && !X86 */
                 break;
 
@@ -200,6 +201,9 @@
         }
     }
+# ifdef IN_RING3
+    else
+# endif
+#endif /* VBOX_WITH_R0_MODULES */
 #ifdef IN_RING3
-    else
         pfnWorker = tmR3VirtualNanoTSDriverless;
 #endif
