Index: /trunk/include/VBox/vmm/pdmapi.h
===================================================================
--- /trunk/include/VBox/vmm/pdmapi.h	(revision 60386)
+++ /trunk/include/VBox/vmm/pdmapi.h	(revision 60387)
@@ -32,4 +32,7 @@
 
 #include <VBox/vmm/pdmcommon.h>
+#ifdef IN_RING3
+# include <VBox/vmm/vmapi.h>
+#endif
 #include <VBox/sup.h>
 
@@ -60,11 +63,12 @@
 
 
+#if defined(IN_RING3) || defined(DOXYGEN_RUNNING)
 /** @defgroup grp_pdm_r3    The PDM Host Context Ring-3 API
  * @{
  */
-
 VMMR3_INT_DECL(int)     PDMR3InitUVM(PUVM pUVM);
 VMMR3_INT_DECL(int)     PDMR3LdrLoadVMMR0U(PUVM pUVM);
 VMMR3_INT_DECL(int)     PDMR3Init(PVM pVM);
+VMMR3_INT_DECL(int)     PDMR3InitCompleted(PVM pVM, VMINITCOMPLETED enmWhat);
 VMMR3DECL(void)         PDMR3PowerOn(PVM pVM);
 VMMR3_INT_DECL(void)    PDMR3ResetCpu(PVMCPU pVCpu);
@@ -161,4 +165,5 @@
 VMMR3_INT_DECL(int)     PDMR3TracingQueryConfig(PVM pVM, char *pszConfig, size_t cbConfig);
 /** @} */
+#endif /* IN_RING3 */
 
 
Index: /trunk/include/VBox/vmm/pdmdev.h
===================================================================
--- /trunk/include/VBox/vmm/pdmdev.h	(revision 60386)
+++ /trunk/include/VBox/vmm/pdmdev.h	(revision 60387)
@@ -227,5 +227,6 @@
 
 /**
- * Init complete notification.
+ * Init complete notification (after ring-0 & RC init since 5.1).
+ *
  * This can be done to do communication with other devices and other
  * initialization which requires everything to be in place.
Index: /trunk/src/VBox/VMM/VMMR3/PDM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PDM.cpp	(revision 60386)
+++ /trunk/src/VBox/VMM/VMMR3/PDM.cpp	(revision 60387)
@@ -441,4 +441,26 @@
     LogFlow(("PDMR3Init: returns %Rrc\n", rc));
     return rc;
+}
+
+
+/**
+ * Init phase completed callback.
+ *
+ * We use this for calling PDMDEVREG::pfnInitComplete callback after everything
+ * else has been initialized.
+ *
+ * @returns VBox status code.
+ * @param   pVM         The cross context VM structure.
+ * @param   enmWhat     The phase that was completed.
+ */
+VMMR3_INT_DECL(int) PDMR3InitCompleted(PVM pVM, VMINITCOMPLETED enmWhat)
+{
+#ifdef VBOX_WITH_RAW_MODE
+    if (enmWhat == VMINITCOMPLETED_RC)
+#else
+    if (enmWhat == VMINITCOMPLETED_RING0)
+#endif
+        return pdmR3DevInitComplete(pVM);
+    return VINF_SUCCESS;
 }
 
Index: /trunk/src/VBox/VMM/VMMR3/PDMDevice.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PDMDevice.cpp	(revision 60386)
+++ /trunk/src/VBox/VMM/VMMR3/PDMDevice.cpp	(revision 60387)
@@ -412,4 +412,19 @@
 #endif
 
+    LogFlow(("pdmR3DevInit: returns %Rrc\n", VINF_SUCCESS));
+    return VINF_SUCCESS;
+}
+
+
+/**
+ * Performs the init complete callback after ring-0 and raw-mode has been
+ * initialized.
+ *
+ * @returns VBox status code.
+ * @param   pVM     The cross context VM structure.
+ */
+int pdmR3DevInitComplete(PVM pVM)
+{
+    int rc;
 
     /*
@@ -447,8 +462,10 @@
 
 #ifdef VBOX_WITH_USB
-    /* ditto for USB Devices. */
     rc = pdmR3UsbVMInitComplete(pVM);
     if (RT_FAILURE(rc))
+    {
+        Log(("pdmR3DevInit: returns %Rrc\n", rc));
         return rc;
+    }
 #endif
 
Index: /trunk/src/VBox/VMM/VMMR3/VM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/VM.cpp	(revision 60386)
+++ /trunk/src/VBox/VMM/VMMR3/VM.cpp	(revision 60387)
@@ -1194,4 +1194,6 @@
     }
 #endif
+    if (RT_SUCCESS(rc))
+        rc = PDMR3InitCompleted(pVM, enmWhat);
     return rc;
 }
Index: /trunk/src/VBox/VMM/include/PDMInternal.h
===================================================================
--- /trunk/src/VBox/VMM/include/PDMInternal.h	(revision 60386)
+++ /trunk/src/VBox/VMM/include/PDMInternal.h	(revision 60387)
@@ -1276,4 +1276,5 @@
 
 int         pdmR3DevInit(PVM pVM);
+int         pdmR3DevInitComplete(PVM pVM);
 PPDMDEV     pdmR3DevLookup(PVM pVM, const char *pszName);
 int         pdmR3DevFindLun(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPDMLUN *ppLun);
