Index: /trunk/src/VBox/VMM/PGMSharedPage.cpp
===================================================================
--- /trunk/src/VBox/VMM/PGMSharedPage.cpp	(revision 29455)
+++ /trunk/src/VBox/VMM/PGMSharedPage.cpp	(revision 29456)
@@ -140,5 +140,5 @@
 
 /**
- * Shared module unregistration helper (called on the way out).
+ * Shared module check helper (called on the way out).
  *
  * @param   pVM         The VM handle.
Index: /trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/GMMR0.cpp	(revision 29455)
+++ /trunk/src/VBox/VMM/VMMR0/GMMR0.cpp	(revision 29456)
@@ -3718,4 +3718,6 @@
  * - if a shared page already exists, then it checks if the VM page is identical and if so frees the VM page and returns the shared page in the paPageDesc array
  *
+ * Note: assumes the caller has acquired the GMM semaphore!!
+ *
  * @returns VBox status code.
  * @param   pGMM                Pointer to the GMM instance data.
@@ -3883,4 +3885,5 @@
         Assert(pRec->cUsers);
 
+        Log(("gmmR0CleanupSharedModule: %s %s cUsers=%d\n", pRec->szName, pRec->szVersion, pRec->cUsers));
         pRec->cUsers--;
         if (pRec->cUsers == 0)
@@ -3925,4 +3928,5 @@
     if (GMM_CHECK_SANITY_UPON_ENTERING(pGMM))
     {
+        Log(("GMMR0ResetSharedModules\n"));
         RTAvlGCPtrDestroy(&pGVM->gmm.s.pSharedModuleTree, gmmR0CleanupSharedModule, pGVM);
 
@@ -3994,4 +3998,5 @@
         GMMCHECKSHAREDMODULEINFO Info;
 
+        Log(("GMMR0CheckSharedModules\n"));
         Info.pGVM = pGVM;
         Info.idCpu = idCpu;
