Index: trunk/include/VBox/err.h
===================================================================
--- trunk/include/VBox/err.h	(revision 35738)
+++ trunk/include/VBox/err.h	(revision 35810)
@@ -932,4 +932,13 @@
 /** Reason for leaving RZ: Illegal call to ring-3. */
 #define VERR_VMM_RING3_CALL_DISABLED        (-2703)
+/** The VMMR0.r0 module version does not match VBoxVMM.dll/so/dylib.
+ * If you just upgraded VirtualBox, please make terminate all VMs and make sure
+ * VBoxNetDHCP is not running.  Then try again.  If this error persists, try
+ * re-installing VirtualBox. */
+#define VERR_VMM_R0_VERSION_MISMATCH        (-2704)
+/** The VMMRC.rc module version does not match VBoxVMM.dll/so/dylib.
+ * Re-install if you are a user.  Developers should make sure the build is
+ * complete or try with a clean build. */
+#define VERR_VMM_RC_VERSION_MISMATCH        (-2705)
 /** @} */
 
@@ -1130,4 +1139,60 @@
 /** Too many instances of a usb device. */
 #define VERR_PDM_TOO_MANY_USB_DEVICE_INSTANCES      (-2869)
+/** Too many instances of a usb device. */
+#define VERR_PDM_TOO_MANY_USB_DEVICE_INSTANCES      (-2869)
+/** The device instance structure version has changed.
+ *
+ * If you have upgraded VirtualBox recently, please make sure you have
+ * terminated all VMs and upgraded any extension packs.  If this error
+ * persists, try re-install VirtualBox. */
+#define VERR_PDM_DEVINS_VERSION_MISMATCH            (-2870)
+/** The device helper structure version has changed.
+ *
+ * If you have upgraded VirtualBox recently, please make sure you have
+ * terminated all VMs and upgraded any extension packs.  If this error
+ * persists, try re-install VirtualBox. */
+#define VERR_PDM_DEVHLPR3_VERSION_MISMATCH          (-2871)
+/** The USB device instance structure version has changed.
+ *
+ * If you have upgraded VirtualBox recently, please make sure you have
+ * terminated all VMs and upgraded any extension packs.  If this error
+ * persists, try re-install VirtualBox. */
+#define VERR_PDM_USBINS_VERSION_MISMATCH            (-2872)
+/** The USB device helper structure version has changed.
+ *
+ * If you have upgraded VirtualBox recently, please make sure you have
+ * terminated all VMs and upgraded any extension packs.  If this error
+ * persists, try re-install VirtualBox. */
+#define VERR_PDM_USBHLPR3_VERSION_MISMATCH          (-2873)
+/** The driver instance structure version has changed.
+ *
+ * If you have upgraded VirtualBox recently, please make sure you have
+ * terminated all VMs and upgraded any extension packs.  If this error
+ * persists, try re-install VirtualBox. */
+#define VERR_PDM_DRVINS_VERSION_MISMATCH            (-2874)
+/** The driver helper structure version has changed.
+ *
+ * If you have upgraded VirtualBox recently, please make sure you have
+ * terminated all VMs and upgraded any extension packs.  If this error
+ * persists, try re-install VirtualBox. */
+#define VERR_PDM_DRVHLPR3_VERSION_MISMATCH          (-2875)
+/** Generic device structure version mismatch.
+ *
+ * If you have upgraded VirtualBox recently, please make sure you have
+ * terminated all VMs and upgraded any extension packs.  If this error
+ * persists, try re-install VirtualBox. */
+#define VERR_PDM_DEVICE_VERSION_MISMATCH            (-2876)
+/** Generic USB device structure version mismatch.
+ *
+ * If you have upgraded VirtualBox recently, please make sure you have
+ * terminated all VMs and upgraded any extension packs.  If this error
+ * persists, try re-install VirtualBox. */
+#define VERR_PDM_USBDEV_VERSION_MISMATCH            (-2877)
+/** Generic driver structure version mismatch.
+ *
+ * If you have upgraded VirtualBox recently, please make sure you have
+ * terminated all VMs and upgraded any extension packs.  If this error
+ * persists, try re-install VirtualBox. */
+#define VERR_PDM_DRIVER_VERSION_MISMATCH            (-2878)
 /** @} */
 
@@ -1660,4 +1725,10 @@
  * Returned by the VBOXEXTPACKREG::pfnInstalled. */
 #define VERR_EXTPACK_UNSUPPORTED_HOST_UNINSTALL     (-6000)
+/** The VirtualBox version is not supported by one of the extension packs.
+ *
+ * You have probably upgraded VirtualBox recently.  Please upgrade the
+ * extension packs to versions compatible with this VirtualBox release.
+ */
+#define VERR_EXTPACK_VBOX_VERSION_MISMATCH          (-6001)
 /** @} */
 
Index: trunk/include/VBox/vmm/pdmdev.h
===================================================================
--- trunk/include/VBox/vmm/pdmdev.h	(revision 35738)
+++ trunk/include/VBox/vmm/pdmdev.h	(revision 35810)
@@ -3852,8 +3852,8 @@
         AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pDevIns)->u32Version, PDM_DEVINS_VERSION), \
                               ("DevIns=%#x  mine=%#x\n", (pDevIns)->u32Version, PDM_DEVINS_VERSION), \
-                              VERR_VERSION_MISMATCH); \
+                              VERR_PDM_DEVINS_VERSION_MISMATCH); \
         AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pDevIns)->pHlpR3->u32Version, PDM_DEVHLPR3_VERSION), \
                               ("DevHlp=%#x  mine=%#x\n", (pDevIns)->pHlpR3->u32Version, PDM_DEVHLPR3_VERSION), \
-                              VERR_VERSION_MISMATCH); \
+                              VERR_PDM_DEVHLPR3_VERSION_MISMATCH); \
     } while (0)
 
@@ -3870,7 +3870,8 @@
     { \
         PPDMDEVINS pDevInsTypeCheck = (pDevIns); NOREF(pDevInsTypeCheck); \
-        if (RT_UNLIKELY(   !PDM_VERSION_ARE_COMPATIBLE((pDevIns)->u32Version, PDM_DEVINS_VERSION) \
-                        || !PDM_VERSION_ARE_COMPATIBLE((pDevIns)->pHlpR3->u32Version, PDM_DEVHLPR3_VERSION) )) \
-            return VERR_VERSION_MISMATCH; \
+        if (RT_UNLIKELY(!PDM_VERSION_ARE_COMPATIBLE((pDevIns)->u32Version, PDM_DEVINS_VERSION) )) \
+            return VERR_PDM_DEVINS_VERSION_MISMATCH; \
+        if (RT_UNLIKELY(!PDM_VERSION_ARE_COMPATIBLE((pDevIns)->pHlpR3->u32Version, PDM_DEVHLPR3_VERSION) )) \
+            return VERR_PDM_DEVHLPR3_VERSION_MISMATCH; \
     } while (0)
 
Index: trunk/include/VBox/vmm/pdmdrv.h
===================================================================
--- trunk/include/VBox/vmm/pdmdrv.h	(revision 35738)
+++ trunk/include/VBox/vmm/pdmdrv.h	(revision 35810)
@@ -338,6 +338,6 @@
 /** SCSI driver. */
 #define PDM_DRVREG_CLASS_SCSI           RT_BIT(15)
-/** Generic raw PCI device driver. */ 
-#define PDM_DRVREG_CLASS_PCIRAW         RT_BIT(16) 
+/** Generic raw PCI device driver. */
+#define PDM_DRVREG_CLASS_PCIRAW         RT_BIT(16)
 /** @} */
 
@@ -437,8 +437,8 @@
         AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pDrvIns)->u32Version, PDM_DRVINS_VERSION), \
                               ("DrvIns=%#x  mine=%#x\n", (pDrvIns)->u32Version, PDM_DRVINS_VERSION), \
-                              VERR_VERSION_MISMATCH); \
+                              VERR_PDM_DRVINS_VERSION_MISMATCH); \
         AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pDrvIns)->pHlpR3->u32Version, PDM_DRVHLPR3_VERSION), \
                               ("DrvHlp=%#x  mine=%#x\n", (pDrvIns)->pHlpR3->u32Version, PDM_DRVHLPR3_VERSION), \
-                              VERR_VERSION_MISMATCH); \
+                              VERR_PDM_DRVHLPR3_VERSION_MISMATCH); \
     } while (0)
 
Index: trunk/include/VBox/vmm/pdmusb.h
===================================================================
--- trunk/include/VBox/vmm/pdmusb.h	(revision 35738)
+++ trunk/include/VBox/vmm/pdmusb.h	(revision 35810)
@@ -733,8 +733,8 @@
         AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->u32Version, PDM_USBINS_VERSION), \
                               ("DevIns=%#x  mine=%#x\n", (pUsbIns)->u32Version, PDM_USBINS_VERSION), \
-                              VERR_VERSION_MISMATCH); \
+                              VERR_PDM_USBINS_VERSION_MISMATCH); \
         AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->pHlpR3->u32Version, PDM_USBHLP_VERSION), \
                               ("DevHlp=%#x  mine=%#x\n", (pUsbIns)->pHlpR3->u32Version, PDM_USBHLP_VERSION), \
-                              VERR_VERSION_MISMATCH); \
+                              VERR_PDM_USBHLPR3_VERSION_MISMATCH); \
     } while (0)
 
@@ -751,7 +751,8 @@
     { \
         PPDMUSBINS pUsbInsTypeCheck = (pUsbIns); NOREF(pUsbInsTypeCheck); \
-        if (RT_UNLIKELY(   !PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->u32Version, PDM_USBINS_VERSION) \
-                        || !PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->pHlpR3->u32Version, PDM_USBHLPR3_VERSION) )) \
-            return VERR_VERSION_MISMATCH; \
+        if (RT_UNLIKELY(!PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->u32Version, PDM_USBINS_VERSION) )) \
+            return VERR_PDM_USBINS_VERSION_MISMATCH; \
+        if (RT_UNLIKELY(!PDM_VERSION_ARE_COMPATIBLE((pUsbIns)->pHlpR3->u32Version, PDM_USBHLPR3_VERSION) )) \
+            return VERR_PDM_USBHLPR3_VERSION_MISMATCH; \
     } while (0)
 
Index: trunk/include/VBox/vmm/vmapi.h
===================================================================
--- trunk/include/VBox/vmm/vmapi.h	(revision 35738)
+++ trunk/include/VBox/vmm/vmapi.h	(revision 35810)
@@ -365,4 +365,5 @@
 VMMR3DECL(void)     VMR3SetErrorWorker(PVM pVM);
 VMMR3DECL(uint32_t) VMR3GetErrorCount(PVM pVM);
+VMMR3DECL(uint32_t) VMR3GetErrorCountU(PUVM pUVM);
 VMMR3DECL(int)      VMR3AtRuntimeErrorRegister(PVM pVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser);
 VMMR3DECL(int)      VMR3AtRuntimeErrorDeregister(PVM pVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser);
