Index: /trunk/src/VBox/Additions/common/VBoxGuestLib/HGCM.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuestLib/HGCM.cpp	(revision 68101)
+++ /trunk/src/VBox/Additions/common/VBoxGuestLib/HGCM.cpp	(revision 68102)
@@ -40,12 +40,13 @@
 
 /**
- * Initializes the HGCM VBGL bits.
- *
- * @return VBox status code.
- */
-int vbglR0HGCMInit(void)
-{
-    return RTSemFastMutexCreate(&g_vbgldata.mutexHGCMHandle);
-}
+ * Fast heap for HGCM handles data.
+ * @{
+ */
+
+static RTSEMFASTMUTEX mutexHGCMHandle;
+
+static struct VBGLHGCMHANDLEDATA aHGCMHandleData[64];
+
+/** @} */
 
 /**
@@ -54,8 +55,19 @@
  * @return VBox status code.
  */
+int vbglR0HGCMInit(void)
+{
+    AssertReturn(mutexHGCMHandle == NIL_RTSEMFASTMUTEX, VINF_ALREADY_INITIALIZED);
+    return RTSemFastMutexCreate(&mutexHGCMHandle);
+}
+
+/**
+ * Initializes the HGCM VBGL bits.
+ *
+ * @return VBox status code.
+ */
 int vbglR0HGCMTerminate(void)
 {
-    RTSemFastMutexDestroy(g_vbgldata.mutexHGCMHandle);
-    g_vbgldata.mutexHGCMHandle = NIL_RTSEMFASTMUTEX;
+    RTSemFastMutexDestroy(mutexHGCMHandle);
+    mutexHGCMHandle = NIL_RTSEMFASTMUTEX;
 
     return VINF_SUCCESS;
@@ -64,5 +76,5 @@
 DECLINLINE(int) vbglHandleHeapEnter(void)
 {
-    int rc = RTSemFastMutexRequest(g_vbgldata.mutexHGCMHandle);
+    int rc = RTSemFastMutexRequest(mutexHGCMHandle);
 
     VBGL_HGCM_ASSERT_MSG(RT_SUCCESS(rc), ("Failed to request handle heap mutex, rc = %Rrc\n", rc));
@@ -73,5 +85,5 @@
 DECLINLINE(void) vbglHandleHeapLeave(void)
 {
-    RTSemFastMutexRelease(g_vbgldata.mutexHGCMHandle);
+    RTSemFastMutexRelease(mutexHGCMHandle);
 }
 
@@ -86,9 +98,9 @@
         /* Simple linear search in array. This will be called not so often, only connect/disconnect. */
         /** @todo bitmap for faster search and other obvious optimizations. */
-        for (i = 0; i < RT_ELEMENTS(g_vbgldata.aHGCMHandleData); i++)
+        for (i = 0; i < RT_ELEMENTS(aHGCMHandleData); i++)
         {
-            if (!g_vbgldata.aHGCMHandleData[i].fAllocated)
+            if (!aHGCMHandleData[i].fAllocated)
             {
-                p = &g_vbgldata.aHGCMHandleData[i];
+                p = &aHGCMHandleData[i];
                 p->fAllocated = 1;
                 break;
Index: /trunk/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h	(revision 68101)
+++ /trunk/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h	(revision 68102)
@@ -108,15 +108,4 @@
 
     /** @} */
-
-    /**
-     * Fast heap for HGCM handles data.
-     * @{
-     */
-
-    RTSEMFASTMUTEX mutexHGCMHandle;
-
-    struct VBGLHGCMHANDLEDATA aHGCMHandleData[64];
-
-    /** @} */
 #endif
 } VBGLDATA;
