Index: /trunk/src/VBox/VMM/VMMAll/NEMAllNativeTemplate-win.cpp.h
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/NEMAllNativeTemplate-win.cpp.h	(revision 91687)
+++ /trunk/src/VBox/VMM/VMMAll/NEMAllNativeTemplate-win.cpp.h	(revision 91688)
@@ -3833,5 +3833,5 @@
 
 
-#ifdef IN_RING0
+#if defined(IN_RING0) && defined(NEM_WIN_WITH_RING0_RUNLOOP)
 /**
  * Perform an I/O control operation on the partition handle (VID.SYS),
Index: /trunk/src/VBox/VMM/VMMR0/NEMR0Native-win.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/NEMR0Native-win.cpp	(revision 91687)
+++ /trunk/src/VBox/VMM/VMMR0/NEMR0Native-win.cpp	(revision 91688)
@@ -808,5 +808,7 @@
     AssertRCReturn(rc, rc);
     SUPR0Printf("NEMR0InitVMPart2\n"); LogRel(("2: NEMR0InitVMPart2\n"));
+#ifdef NEM_WIN_WITH_RING0_RUNLOOP
     Assert(pGVM->nemr0.s.fMayUseRing0Runloop == false);
+#endif
 
     /*
@@ -825,4 +827,5 @@
     pGVM->nemr0.s.IoCtlGetPartitionProperty = Copy;
 
+#ifdef NEM_WIN_WITH_RING0_RUNLOOP
     pGVM->nemr0.s.fMayUseRing0Runloop = pGVM->nem.s.fUseRing0Runloop;
 
@@ -855,4 +858,5 @@
     if (RT_SUCCESS(rc))
         pGVM->nemr0.s.IoCtlMessageSlotHandleAndGetNext = Copy;
+#endif
 
     if (   RT_SUCCESS(rc)
Index: /trunk/src/VBox/VMM/VMMR3/NEMR3Native-win.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/NEMR3Native-win.cpp	(revision 91687)
+++ /trunk/src/VBox/VMM/VMMR3/NEMR3Native-win.cpp	(revision 91688)
@@ -178,4 +178,5 @@
 /** Info about the VidGetPartitionProperty I/O control interface. */
 static NEMWINIOCTL g_IoCtlGetPartitionProperty;
+#if defined(NEM_WIN_WITH_RING0_RUNLOOP) || defined(LOG_ENABLED)
 /** Info about the VidStartVirtualProcessor I/O control interface. */
 static NEMWINIOCTL g_IoCtlStartVirtualProcessor;
@@ -184,4 +185,5 @@
 /** Info about the VidMessageSlotHandleAndGetNext I/O control interface. */
 static NEMWINIOCTL g_IoCtlMessageSlotHandleAndGetNext;
+#endif
 #ifdef LOG_ENABLED
 /** Info about the VidMessageSlotMap I/O control interface - for logging. */
@@ -843,4 +845,5 @@
 }
 
+#if defined(NEM_WIN_WITH_RING0_RUNLOOP) || defined(LOG_ENABLED)
 
 /**
@@ -944,4 +947,5 @@
 }
 
+#endif /* defined(NEM_WIN_WITH_RING0_RUNLOOP) || defined(LOG_ENABLED) */
 
 #ifdef LOG_ENABLED
@@ -1016,4 +1020,6 @@
 
     int rcRet = VINF_SUCCESS;
+#if defined(NEM_WIN_WITH_RING0_RUNLOOP) || defined(LOG_ENABLED)
+
     /* VidStartVirtualProcessor */
     *g_ppfnVidNtDeviceIoControlFile = nemR3WinIoctlDetector_StartVirtualProcessor;
@@ -1052,4 +1058,5 @@
             g_IoCtlMessageSlotHandleAndGetNext.cbOutput));
 
+#endif /* defined(NEM_WIN_WITH_RING0_RUNLOOP) || defined(LOG_ENABLED) */
 #ifdef LOG_ENABLED
     /* The following are only for logging: */
@@ -1098,7 +1105,9 @@
     pVM->nem.s.IoCtlGetHvPartitionId            = g_IoCtlGetHvPartitionId;
     pVM->nem.s.IoCtlGetPartitionProperty        = g_IoCtlGetPartitionProperty;
+#ifdef NEM_WIN_WITH_RING0_RUNLOOP
     pVM->nem.s.IoCtlStartVirtualProcessor       = g_IoCtlStartVirtualProcessor;
     pVM->nem.s.IoCtlStopVirtualProcessor        = g_IoCtlStopVirtualProcessor;
     pVM->nem.s.IoCtlMessageSlotHandleAndGetNext = g_IoCtlMessageSlotHandleAndGetNext;
+#endif
     return rcRet;
 }
Index: /trunk/src/VBox/VMM/include/NEMInternal.h
===================================================================
--- /trunk/src/VBox/VMM/include/NEMInternal.h	(revision 91687)
+++ /trunk/src/VBox/VMM/include/NEMInternal.h	(revision 91688)
@@ -197,4 +197,5 @@
     /** Info about the VidGetPartitionProperty I/O control interface. */
     NEMWINIOCTL                 IoCtlGetPartitionProperty;
+#  ifdef NEM_WIN_WITH_RING0_RUNLOOP
     /** Info about the VidStartVirtualProcessor I/O control interface. */
     NEMWINIOCTL                 IoCtlStartVirtualProcessor;
@@ -203,4 +204,5 @@
     /** Info about the VidStopVirtualProcessor I/O control interface. */
     NEMWINIOCTL                 IoCtlMessageSlotHandleAndGetNext;
+#  endif
 
     /** Statistics updated by NEMR0UpdateStatistics. */
@@ -393,4 +395,5 @@
     /** Info about the VidGetPartitionProperty I/O control interface. */
     NEMWINIOCTL                 IoCtlGetPartitionProperty;
+#  ifdef NEM_WIN_WITH_RING0_RUNLOOP
     /** Info about the VidStartVirtualProcessor I/O control interface. */
     NEMWINIOCTL                 IoCtlStartVirtualProcessor;
@@ -401,4 +404,5 @@
     /** Whether we may use the ring-0 runloop or not. */
     bool                        fMayUseRing0Runloop;
+#  endif
 
     /** Hypercall input/ouput page for non-EMT. */
