Index: /trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp	(revision 57377)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrv.cpp	(revision 57378)
@@ -141,5 +141,5 @@
 static int                  supdrvIOCtl_LdrGetSymbol(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPLDRGETSYMBOL pReq);
 static int                  supdrvIDC_LdrGetSymbol(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession, PSUPDRVIDCREQGETSYM pReq);
-static int                  supdrvLdrSetVMMR0EPs(PSUPDRVDEVEXT pDevExt, void *pvVMMR0, void *pvVMMR0EntryInt,void *pvVMMR0EntryFast, void *pvVMMR0EntryEx);
+static int                  supdrvLdrSetVMMR0EPs(PSUPDRVDEVEXT pDevExt, void *pvVMMR0, void *pvVMMR0EntryFast, void *pvVMMR0EntryEx);
 static void                 supdrvLdrUnsetVMMR0EPs(PSUPDRVDEVEXT pDevExt);
 static int                  supdrvLdrAddUsage(PSUPDRVSESSION pSession, PSUPDRVLDRIMAGE pImage);
@@ -4693,4 +4693,25 @@
 
 /**
+ * Formats a load error message.
+ *
+ * @returns @a rc
+ * @param   rc                  Return code.
+ * @param   pReq                The request.
+ * @param   pszFormat           The error message format string.
+ * @param   ...                 Argument to the format string.
+ */
+int VBOXCALL supdrvLdrLoadError(int rc, PSUPLDRLOAD pReq, const char *pszFormat, ...)
+{
+    va_list va;
+    va_start(va, pszFormat);
+    pReq->u.Out.uErrorMagic = SUPLDRLOAD_ERROR_MAGIC;
+    RTStrPrintfV(pReq->u.Out.szError, sizeof(pReq->u.Out.szError), pszFormat, va);
+    va_end(va);
+    Log(("SUP_IOCTL_LDR_LOAD: %s [rc=%Rrc]\n", pReq->u.Out.szError, rc));
+    return rc;
+}
+
+
+/**
  * Loads the image bits.
  *
@@ -4723,6 +4744,5 @@
     {
         supdrvLdrUnlock(pDevExt);
-        Log(("SUP_IOCTL_LDR_LOAD: couldn't find image!\n"));
-        return VERR_INVALID_HANDLE;
+        return supdrvLdrLoadError(VERR_INVALID_HANDLE, pReq, "Image not found");
     }
     pImage = pUsage->pImage;
@@ -4735,7 +4755,6 @@
     {
         supdrvLdrUnlock(pDevExt);
-        Log(("SUP_IOCTL_LDR_LOAD: image size mismatch!! %d(prep) != %d(load) or %d != %d\n",
-             pImage->cbImageWithTabs, pReq->u.In.cbImageWithTabs, pImage->cbImageBits, pReq->u.In.cbImageBits));
-        return VERR_INVALID_HANDLE;
+        return supdrvLdrLoadError(VERR_INVALID_HANDLE, pReq, "Image size mismatch found: %d(prep) != %d(load) or %d != %d",
+                                  pImage->cbImageWithTabs, pReq->u.In.cbImageWithTabs, pImage->cbImageBits, pReq->u.In.cbImageBits);
     }
 
@@ -4746,4 +4765,5 @@
         if (uState != SUP_IOCTL_LDR_LOAD)
             AssertMsgFailed(("SUP_IOCTL_LDR_LOAD: invalid image state %d (%#x)!\n", uState, uState));
+        pReq->u.Out.uErrorMagic = 0;
         return VERR_ALREADY_LOADED;
     }
@@ -4753,6 +4773,5 @@
     {
         supdrvLdrUnlock(pDevExt);
-        Log(("SUP_IOCTL_LDR_LOAD: Not loading '%s' image bits, loader interface is locked down!\n", pImage->szName));
-        return VERR_PERMISSION_DENIED;
+        return supdrvLdrLoadError(VERR_PERMISSION_DENIED, pReq, "Loader is locked down");
     }
 
@@ -4764,6 +4783,4 @@
         case SUPLDRLOADEP_VMMR0:
             rc = supdrvLdrValidatePointer(    pDevExt, pImage, pReq->u.In.EP.VMMR0.pvVMMR0,          false, pReq->u.In.abImage, "pvVMMR0");
-            if (RT_SUCCESS(rc))
-                rc = supdrvLdrValidatePointer(pDevExt, pImage, pReq->u.In.EP.VMMR0.pvVMMR0EntryInt,  false, pReq->u.In.abImage, "pvVMMR0EntryInt");
             if (RT_SUCCESS(rc))
                 rc = supdrvLdrValidatePointer(pDevExt, pImage, pReq->u.In.EP.VMMR0.pvVMMR0EntryFast, false, pReq->u.In.abImage, "pvVMMR0EntryFast");
@@ -4771,5 +4788,5 @@
                 rc = supdrvLdrValidatePointer(pDevExt, pImage, pReq->u.In.EP.VMMR0.pvVMMR0EntryEx,   false, pReq->u.In.abImage, "pvVMMR0EntryEx");
             if (RT_FAILURE(rc))
-                return rc;
+                return supdrvLdrLoadError(rc, pReq, "Invalid VMMR0 pointer");
             break;
 
@@ -4777,5 +4794,5 @@
             rc = supdrvLdrValidatePointer(pDevExt, pImage, pReq->u.In.EP.Service.pfnServiceReq, false, pReq->u.In.abImage, "pfnServiceReq");
             if (RT_FAILURE(rc))
-                return rc;
+                return supdrvLdrLoadError(rc, pReq, "Invalid pfnServiceReq pointer: %p", pReq->u.In.EP.Service.pfnServiceReq);
             if (    pReq->u.In.EP.Service.apvReserved[0] != NIL_RTR0PTR
                 ||  pReq->u.In.EP.Service.apvReserved[1] != NIL_RTR0PTR
@@ -4783,10 +4800,10 @@
             {
                 supdrvLdrUnlock(pDevExt);
-                Log(("Out of range (%p LB %#x): apvReserved={%p,%p,%p} MBZ!\n",
-                     pImage->pvImage, pReq->u.In.cbImageWithTabs,
-                     pReq->u.In.EP.Service.apvReserved[0],
-                     pReq->u.In.EP.Service.apvReserved[1],
-                     pReq->u.In.EP.Service.apvReserved[2]));
-                return VERR_INVALID_PARAMETER;
+                return supdrvLdrLoadError(VERR_INVALID_PARAMETER, pReq,
+                                          "Out of range (%p LB %#x): apvReserved={%p,%p,%p} MBZ!",
+                                          pImage->pvImage, pReq->u.In.cbImageWithTabs,
+                                          pReq->u.In.EP.Service.apvReserved[0],
+                                          pReq->u.In.EP.Service.apvReserved[1],
+                                          pReq->u.In.EP.Service.apvReserved[2]);
             }
             break;
@@ -4794,14 +4811,13 @@
         default:
             supdrvLdrUnlock(pDevExt);
-            Log(("Invalid eEPType=%d\n", pReq->u.In.eEPType));
-            return VERR_INVALID_PARAMETER;
+            return supdrvLdrLoadError(VERR_INVALID_PARAMETER, pReq, "Invalid eEPType=%d", pReq->u.In.eEPType);
     }
 
     rc = supdrvLdrValidatePointer(pDevExt, pImage, pReq->u.In.pfnModuleInit, true, pReq->u.In.abImage, "pfnModuleInit");
     if (RT_FAILURE(rc))
-        return rc;
+        return supdrvLdrLoadError(rc, pReq, "Invalid pfnModuleInit pointer: %p", pReq->u.In.pfnModuleInit);
     rc = supdrvLdrValidatePointer(pDevExt, pImage, pReq->u.In.pfnModuleTerm, true, pReq->u.In.abImage, "pfnModuleTerm");
     if (RT_FAILURE(rc))
-        return rc;
+        return supdrvLdrLoadError(rc, pReq, "Invalid pfnModuleTerm pointer: %p", pReq->u.In.pfnModuleTerm);
     SUPDRV_CHECK_SMAP_CHECK(pDevExt, RT_NOTHING);
 
@@ -4817,5 +4833,5 @@
             memcpy(pImage->pachStrTab, &pReq->u.In.abImage[pReq->u.In.offStrTab], pImage->cbStrTab);
         else
-            rc = /*VERR_NO_MEMORY*/ VERR_INTERNAL_ERROR_3;
+            rc = supdrvLdrLoadError(VERR_NO_MEMORY, pReq, "Out of memory for string table: %#x", pImage->cbStrTab);
         SUPDRV_CHECK_SMAP_CHECK(pDevExt, RT_NOTHING);
     }
@@ -4829,5 +4845,5 @@
             memcpy(pImage->paSymbols, &pReq->u.In.abImage[pReq->u.In.offSymbols], cbSymbols);
         else
-            rc = /*VERR_NO_MEMORY*/ VERR_INTERNAL_ERROR_4;
+            rc = supdrvLdrLoadError(VERR_NO_MEMORY, pReq, "Out of memory for symbol table: %#x", cbSymbols);
         SUPDRV_CHECK_SMAP_CHECK(pDevExt, RT_NOTHING);
     }
@@ -4864,5 +4880,5 @@
                 break;
             case SUPLDRLOADEP_VMMR0:
-                rc = supdrvLdrSetVMMR0EPs(pDevExt, pReq->u.In.EP.VMMR0.pvVMMR0, pReq->u.In.EP.VMMR0.pvVMMR0EntryInt,
+                rc = supdrvLdrSetVMMR0EPs(pDevExt, pReq->u.In.EP.VMMR0.pvVMMR0,
                                           pReq->u.In.EP.VMMR0.pvVMMR0EntryFast, pReq->u.In.EP.VMMR0.pvVMMR0EntryEx);
                 break;
@@ -4888,6 +4904,10 @@
         pDevExt->pLdrInitImage  = NULL;
         pDevExt->hLdrInitThread = NIL_RTNATIVETHREAD;
-        if (RT_FAILURE(rc) && pDevExt->pvVMMR0 == pImage->pvImage)
-            supdrvLdrUnsetVMMR0EPs(pDevExt);
+        if (RT_FAILURE(rc))
+        {
+            if (pDevExt->pvVMMR0 == pImage->pvImage)
+                supdrvLdrUnsetVMMR0EPs(pDevExt);
+            supdrvLdrLoadError(rc, pReq, "ModuleInit failed: %Rrc", rc);
+        }
     }
     SUPR0Printf("vboxdrv: %p %s\n", pImage->pvImage, pImage->szName);
@@ -5210,13 +5230,12 @@
  * @param   pSession            Session data.
  * @param   pVMMR0              VMMR0 image handle.
- * @param   pvVMMR0EntryInt     VMMR0EntryInt address.
  * @param   pvVMMR0EntryFast    VMMR0EntryFast address.
  * @param   pvVMMR0EntryEx      VMMR0EntryEx address.
  * @remark  Caller must own the loader mutex.
  */
-static int supdrvLdrSetVMMR0EPs(PSUPDRVDEVEXT pDevExt, void *pvVMMR0, void *pvVMMR0EntryInt, void *pvVMMR0EntryFast, void *pvVMMR0EntryEx)
+static int supdrvLdrSetVMMR0EPs(PSUPDRVDEVEXT pDevExt, void *pvVMMR0, void *pvVMMR0EntryFast, void *pvVMMR0EntryEx)
 {
     int rc = VINF_SUCCESS;
-    LogFlow(("supdrvLdrSetR0EP pvVMMR0=%p pvVMMR0EntryInt=%p\n", pvVMMR0, pvVMMR0EntryInt));
+    LogFlow(("supdrvLdrSetR0EP pvVMMR0=%p pvVMMR0EntryFast=%p\n", pvVMMR0, pvVMMR0EntryFast));
 
 
@@ -5227,5 +5246,4 @@
     {
         pDevExt->pvVMMR0 = pvVMMR0;
-        *(void **)&pDevExt->pfnVMMR0EntryInt  = pvVMMR0EntryInt;
         *(void **)&pDevExt->pfnVMMR0EntryFast = pvVMMR0EntryFast;
         *(void **)&pDevExt->pfnVMMR0EntryEx   = pvVMMR0EntryEx;
@@ -5238,5 +5256,4 @@
          */
         if (    pDevExt->pvVMMR0 != pvVMMR0
-            ||  (void *)pDevExt->pfnVMMR0EntryInt   != pvVMMR0EntryInt
             ||  (void *)pDevExt->pfnVMMR0EntryFast  != pvVMMR0EntryFast
             ||  (void *)pDevExt->pfnVMMR0EntryEx    != pvVMMR0EntryEx)
@@ -5258,5 +5275,4 @@
 {
     pDevExt->pvVMMR0            = NULL;
-    pDevExt->pfnVMMR0EntryInt   = NULL;
     pDevExt->pfnVMMR0EntryFast  = NULL;
     pDevExt->pfnVMMR0EntryEx    = NULL;
Index: /trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h	(revision 57377)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h	(revision 57378)
@@ -215,5 +215,5 @@
  *          - nothing.
  */
-#define SUPDRV_IOC_VERSION                              0x00230003
+#define SUPDRV_IOC_VERSION                              0x00240000
 
 /** SUP_IOCTL_COOKIE. */
@@ -338,7 +338,7 @@
  */
 #define SUP_IOCTL_LDR_LOAD                              SUP_CTL_CODE_BIG(4)
-#define SUP_IOCTL_LDR_LOAD_SIZE(cbImage)                RT_UOFFSETOF(SUPLDRLOAD, u.In.abImage[cbImage])
+#define SUP_IOCTL_LDR_LOAD_SIZE(cbImage)                RT_MAX(RT_UOFFSETOF(SUPLDRLOAD, u.In.abImage[cbImage]), SUP_IOCTL_LDR_LOAD_SIZE_OUT)
 #define SUP_IOCTL_LDR_LOAD_SIZE_IN(cbImage)             RT_UOFFSETOF(SUPLDRLOAD, u.In.abImage[cbImage])
-#define SUP_IOCTL_LDR_LOAD_SIZE_OUT                     sizeof(SUPREQHDR)
+#define SUP_IOCTL_LDR_LOAD_SIZE_OUT                     (RT_UOFFSETOF(SUPLDRLOAD, u.Out.szError) + RT_SIZEOFMEMB(SUPLDRLOAD, u.Out.szError))
 
 /**
@@ -414,6 +414,4 @@
                     /** The module handle (i.e. address). */
                     RTR0PTR                 pvVMMR0;
-                    /** Address of VMMR0EntryInt function. */
-                    RTR0PTR                 pvVMMR0EntryInt;
                     /** Address of VMMR0EntryFast function. */
                     RTR0PTR                 pvVMMR0EntryFast;
@@ -451,6 +449,18 @@
             uint8_t         abImage[1];
         } In;
+        struct
+        {
+            /** Magic value indicating whether extended error information is
+             * present or not (SUPLDRLOAD_ERROR_MAGIC). */
+            uint64_t        uErrorMagic;
+            /** Extended error information. */
+            char            szError[2048];
+        } Out;
     } u;
 } SUPLDRLOAD, *PSUPLDRLOAD;
+/** Magic value that indicates that there is a valid error information string
+ * present on SUP_IOCTL_LDR_LOAD failure.
+ * @remarks The value is choosen to be an unlikely init and term address. */
+#define SUPLDRLOAD_ERROR_MAGIC      UINT64_C(0xabcdefef0feddcb9)
 /** @} */
 
Index: /trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h	(revision 57377)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h	(revision 57378)
@@ -603,6 +603,4 @@
      * 0 if the code VMM isn't loaded and Idt are nops. */
     void * volatile                 pvVMMR0;
-    /** VMMR0EntryInt() pointer. */
-    DECLR0CALLBACKMEMBER(int,       pfnVMMR0EntryInt, (PVM pVM, unsigned uOperation, void *pvArg));
     /** VMMR0EntryFast() pointer. */
     DECLR0CALLBACKMEMBER(void,      pfnVMMR0EntryFast, (PVM pVM, VMCPUID idCpu, unsigned uOperation));
@@ -957,4 +955,5 @@
 void VBOXCALL   supdrvBadContext(PSUPDRVDEVEXT pDevExt, const char *pszFile, uint32_t uLine, const char *pszExtra);
 int VBOXCALL    supdrvQueryVTCapsInternal(uint32_t *pfCaps);
+int VBOXCALL    supdrvLdrLoadError(int rc, PSUPLDRLOAD pReq, const char *pszFormat, ...);
 
 /* SUPDrvGip.cpp */
Index: /trunk/src/VBox/HostDrivers/Support/SUPLibLdr.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPLibLdr.cpp	(revision 57377)
+++ /trunk/src/VBox/HostDrivers/Support/SUPLibLdr.cpp	(revision 57378)
@@ -112,5 +112,5 @@
     {
         rc = supLoadModule(pszFilename, pszModule, NULL, pErrInfo, ppvImageBase);
-        if (RT_FAILURE(rc))
+        if (RT_FAILURE(rc) && !RTErrInfoIsSet(pErrInfo))
             RTErrInfoSetF(pErrInfo, rc, "SUPR3LoadModule: supLoadModule returned %Rrc", rc);
     }
@@ -445,5 +445,4 @@
                      * Get the entry points.
                      */
-                    RTUINTPTR VMMR0EntryInt = 0;
                     RTUINTPTR VMMR0EntryFast = 0;
                     RTUINTPTR VMMR0EntryEx = 0;
@@ -451,21 +450,25 @@
                     RTUINTPTR ModuleInit = 0;
                     RTUINTPTR ModuleTerm = 0;
+                    const char *pszEp = NULL;
                     if (fIsVMMR0)
                     {
-                        rc = RTLdrGetSymbolEx(hLdrMod, &pLoadReq->u.In.abImage[0], (uintptr_t)OpenReq.u.Out.pvImageBase, UINT32_MAX, "VMMR0EntryInt", &VMMR0EntryInt);
+                        rc = RTLdrGetSymbolEx(hLdrMod, &pLoadReq->u.In.abImage[0], (uintptr_t)OpenReq.u.Out.pvImageBase,
+                                              UINT32_MAX, pszEp = "VMMR0EntryFast", &VMMR0EntryFast);
                         if (RT_SUCCESS(rc))
-                            rc = RTLdrGetSymbolEx(hLdrMod, &pLoadReq->u.In.abImage[0], (uintptr_t)OpenReq.u.Out.pvImageBase, UINT32_MAX, "VMMR0EntryFast", &VMMR0EntryFast);
-                        if (RT_SUCCESS(rc))
-                            rc = RTLdrGetSymbolEx(hLdrMod, &pLoadReq->u.In.abImage[0], (uintptr_t)OpenReq.u.Out.pvImageBase, UINT32_MAX, "VMMR0EntryEx", &VMMR0EntryEx);
+                            rc = RTLdrGetSymbolEx(hLdrMod, &pLoadReq->u.In.abImage[0], (uintptr_t)OpenReq.u.Out.pvImageBase,
+                                                  UINT32_MAX, pszEp = "VMMR0EntryEx", &VMMR0EntryEx);
                     }
                     else if (pszSrvReqHandler)
-                        rc = RTLdrGetSymbolEx(hLdrMod, &pLoadReq->u.In.abImage[0], (uintptr_t)OpenReq.u.Out.pvImageBase, UINT32_MAX, pszSrvReqHandler, &SrvReqHandler);
+                        rc = RTLdrGetSymbolEx(hLdrMod, &pLoadReq->u.In.abImage[0], (uintptr_t)OpenReq.u.Out.pvImageBase,
+                                              UINT32_MAX, pszEp = pszSrvReqHandler, &SrvReqHandler);
                     if (RT_SUCCESS(rc))
                     {
-                        int rc2 = RTLdrGetSymbolEx(hLdrMod, &pLoadReq->u.In.abImage[0], (uintptr_t)OpenReq.u.Out.pvImageBase, UINT32_MAX, "ModuleInit", &ModuleInit);
+                        int rc2 = RTLdrGetSymbolEx(hLdrMod, &pLoadReq->u.In.abImage[0], (uintptr_t)OpenReq.u.Out.pvImageBase,
+                                                   UINT32_MAX, pszEp = "ModuleInit", &ModuleInit);
                         if (RT_FAILURE(rc2))
                             ModuleInit = 0;
 
-                        rc2 = RTLdrGetSymbolEx(hLdrMod, &pLoadReq->u.In.abImage[0], (uintptr_t)OpenReq.u.Out.pvImageBase, UINT32_MAX, "ModuleTerm", &ModuleTerm);
+                        rc2 = RTLdrGetSymbolEx(hLdrMod, &pLoadReq->u.In.abImage[0], (uintptr_t)OpenReq.u.Out.pvImageBase,
+                                               UINT32_MAX, pszEp = "ModuleTerm", &ModuleTerm);
                         if (RT_FAILURE(rc2))
                             ModuleTerm = 0;
@@ -503,5 +506,4 @@
                                 pLoadReq->u.In.eEPType                = SUPLDRLOADEP_VMMR0;
                                 pLoadReq->u.In.EP.VMMR0.pvVMMR0       = OpenReq.u.Out.pvImageBase;
-                                pLoadReq->u.In.EP.VMMR0.pvVMMR0EntryInt = (RTR0PTR)VMMR0EntryInt;
                                 pLoadReq->u.In.EP.VMMR0.pvVMMR0EntryFast= (RTR0PTR)VMMR0EntryFast;
                                 pLoadReq->u.In.EP.VMMR0.pvVMMR0EntryEx  = (RTR0PTR)VMMR0EntryEx;
@@ -545,6 +547,5 @@
                                 {
                                     g_pvVMMR0 = OpenReq.u.Out.pvImageBase;
-                                    LogRel(("SUP: VMMR0EntryEx located at %RTptr, VMMR0EntryFast at %RTptr and VMMR0EntryInt at %RTptr\n",
-                                            VMMR0EntryEx, VMMR0EntryFast, VMMR0EntryInt));
+                                    LogRel(("SUP: VMMR0EntryEx located at %RTptr and VMMR0EntryFast at %RTptr\n", VMMR0EntryEx, VMMR0EntryFast));
                                 }
 #ifdef RT_OS_WINDOWS
@@ -556,15 +557,36 @@
                                 return VINF_SUCCESS;
                             }
+
+                            /*
+                             * Failed, bail out.
+                             */
+                            LogRel(("SUP: Loading failed for %s (%s) rc=%Rrc\n", pszModule, pszFilename, rc));
+                            if (   pLoadReq->u.Out.uErrorMagic == SUPLDRLOAD_ERROR_MAGIC
+                                && pLoadReq->u.Out.szError[0] != '\0')
+                            {
+                                LogRel(("SUP: %s\n", pLoadReq->u.Out.szError));
+                                RTErrInfoSet(pErrInfo, rc, pLoadReq->u.Out.szError);
+                            }
                             else
-                                LogRel(("SUP: Loading failed for %s (%s) rc=%Rrc\n", pszModule, pszFilename, rc));
+                                RTErrInfoSet(pErrInfo, rc, "SUP_IOCTL_LDR_LOAD failed");
                         }
                         else
+                        {
                             LogRel(("SUP: RTLdrEnumSymbols failed for %s (%s) rc=%Rrc\n", pszModule, pszFilename, rc));
+                            RTErrInfoSetF(pErrInfo, rc, "RTLdrEnumSymbols #2 failed");
+                        }
                     }
                     else
-                        LogRel(("SUP: Failed to get entry points for %s (%s) rc=%Rrc\n", pszModule, pszFilename, rc));
+                    {
+                        LogRel(("SUP: Failed to get entry point '%s' for %s (%s) rc=%Rrc\n", pszEp, pszModule, pszFilename, rc));
+                        RTErrInfoSetF(pErrInfo, rc, "Failed to resolve entry point '%s'", pszEp);
+                    }
                 }
                 else
+                {
                     LogRel(("SUP: RTLdrGetBits failed for %s (%s). rc=%Rrc\n", pszModule, pszFilename, rc));
+                    if (!RTErrInfoIsSet(pErrInfo))
+                        RTErrInfoSetF(pErrInfo, rc, "RTLdrGetBits failed");
+                }
                 RTMemTmpFree(pLoadReq);
             }
@@ -573,6 +595,10 @@
                 AssertMsgFailed(("failed to allocated %u bytes for SUPLDRLOAD_IN structure!\n", SUP_IOCTL_LDR_LOAD_SIZE(cbImageWithTabs)));
                 rc = VERR_NO_TMP_MEMORY;
+                RTErrInfoSetF(pErrInfo, rc, "Failed to allocate %u bytes for the load request", SUP_IOCTL_LDR_LOAD_SIZE(cbImageWithTabs));
             }
         }
+        /*
+         * Already loaded?
+         */
         else if (RT_SUCCESS(rc))
         {
@@ -585,5 +611,12 @@
 #endif
         }
-    }
+        /*
+         * No, failed.
+         */
+        else
+            RTErrInfoSet(pErrInfo, rc, "SUP_IOCTL_LDR_OPEN failed");
+    }
+    else
+        RTErrInfoSetF(pErrInfo, rc, "RTLdrEnumSymbols #1 failed");
     RTLdrClose(hLdrMod);
     return rc;
Index: /trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp	(revision 57377)
+++ /trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp	(revision 57378)
@@ -1843,5 +1843,5 @@
 
 /**
- * memcmp + log.
+ * memcmp + errormsg + log.
  *
  * @returns Same as memcmp.
@@ -1850,6 +1850,7 @@
  * @param   uRva            The RVA to start comparing at.
  * @param   cb              The number of bytes to compare.
- */
-static int supdrvNtCompare(PSUPDRVLDRIMAGE pImage, const uint8_t *pbImageBits, uint32_t uRva, uint32_t cb)
+ * @param   pReq            The load request.
+ */
+static int supdrvNtCompare(PSUPDRVLDRIMAGE pImage, const uint8_t *pbImageBits, uint32_t uRva, uint32_t cb, PSUPLDRLOAD pReq)
 {
     int iDiff = memcmp((uint8_t const *)pImage->pvImage + uRva, pbImageBits + uRva, cb);
@@ -1861,9 +1862,16 @@
             if (pbNativeBits[off] != pbImageBits[off])
             {
-                char szBytes[128];
-                RTStrPrintf(szBytes, sizeof(szBytes), "native: %.*Rhxs  our: %.*Rhxs",
-                            RT_MIN(12, cbLeft), &pbNativeBits[off],
-                            RT_MIN(12, cbLeft), &pbImageBits[off]);
-                SUPR0Printf("VBoxDrv: Mismatch at %#x of %s: %s\n", off, pImage->szName, szBytes);
+                /* Note! We need to copy image bits into a temporary stack buffer here as we'd
+                         otherwise risk overwriting them while formatting the error message. */
+                uint8_t abBytes[64];
+                memcpy(abBytes, &pbImageBits[off], RT_MIN(64, cbLeft));
+                supdrvLdrLoadError(VERR_LDR_MISMATCH_NATIVE, pReq,
+                                   "Mismatch at %#x of %s:\n"
+                                   "ntld: %.*Rhxs\n"
+                                   "iprt: %.*Rhxs",
+                                   off, pImage->szName,
+                                   RT_MIN(64, cbLeft), &pbNativeBits[off],
+                                   RT_MIN(64, cbLeft), &abBytes[0]);
+                SUPR0Printf("VBoxDrv: %s", pReq->u.Out.szError);
                 break;
             }
@@ -1872,7 +1880,8 @@
 }
 
+
 int  VBOXCALL   supdrvOSLdrLoad(PSUPDRVDEVEXT pDevExt, PSUPDRVLDRIMAGE pImage, const uint8_t *pbImageBits, PSUPLDRLOAD pReq)
 {
-    NOREF(pDevExt); NOREF(pReq);
+    NOREF(pDevExt);
     if (pImage->pvNtSectionObj)
     {
@@ -1955,17 +1964,17 @@
             {
                 if (uRvaNext < aExcludeRgns[i].uRva)
-                    iDiff = supdrvNtCompare(pImage, pbImageBits, uRvaNext, aExcludeRgns[i].uRva - uRvaNext);
+                    iDiff = supdrvNtCompare(pImage, pbImageBits, uRvaNext, aExcludeRgns[i].uRva - uRvaNext, pReq);
                 uRvaNext = aExcludeRgns[i].uRva + aExcludeRgns[i].cb;
             }
             if (!iDiff && uRvaNext < pImage->cbImageBits)
-                iDiff = supdrvNtCompare(pImage, pbImageBits, uRvaNext, pImage->cbImageBits - uRvaNext);
+                iDiff = supdrvNtCompare(pImage, pbImageBits, uRvaNext, pImage->cbImageBits - uRvaNext, pReq);
             if (!iDiff)
                 return VINF_SUCCESS;
         }
         else
-            supdrvNtCompare(pImage, pbImageBits, 0, pImage->cbImageBits);
+            supdrvNtCompare(pImage, pbImageBits, 0, pImage->cbImageBits, pReq);
         return VERR_LDR_MISMATCH_NATIVE;
     }
-    return VERR_INTERNAL_ERROR_4;
+    return supdrvLdrLoadError(VERR_INTERNAL_ERROR_4, pReq, "No NT section object! Impossible!");
 }
 
Index: /trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/VMMR0.cpp	(revision 57377)
+++ /trunk/src/VBox/VMM/VMMR0/VMMR0.cpp	(revision 57378)
@@ -906,27 +906,4 @@
 
 /**
- * Unused ring-0 entry point that used to be called from the interrupt gate.
- *
- * Will be removed one of the next times we do a major SUPDrv version bump.
- *
- * @returns VBox status code.
- * @param   pVM             Pointer to the VM.
- * @param   enmOperation    Which operation to execute.
- * @param   pvArg           Argument to the operation.
- * @remarks Assume called with interrupts disabled.
- */
-VMMR0DECL(int) VMMR0EntryInt(PVM pVM, VMMR0OPERATION enmOperation, void *pvArg)
-{
-    /*
-     * We're returning VERR_NOT_SUPPORT here so we've got something else
-     * than -1 which the interrupt gate glue code might return.
-     */
-    Log(("operation %#x is not supported\n", enmOperation));
-    NOREF(enmOperation); NOREF(pvArg); NOREF(pVM);
-    return VERR_NOT_SUPPORTED;
-}
-
-
-/**
  * The Ring 0 entry point, called by the fast-ioctl path.
  *
