Index: /trunk/src/VBox/VMM/VMMAll/VMMAll.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/VMMAll.cpp	(revision 46860)
+++ /trunk/src/VBox/VMM/VMMAll/VMMAll.cpp	(revision 46861)
@@ -360,2 +360,20 @@
 }
 
+
+/**
+ * Returns the build type for matching components.
+ *
+ * @returns Build type value.
+ */
+uint32_t vmmGetBuildType(void)
+{
+    uint32_t uRet = 0xbeef0000;
+#ifdef DEBUG
+    uRet |= RT_BIT_32(0);
+#endif
+#ifdef VBOX_WITH_STATISTICS
+    uRet |= RT_BIT_32(1);
+#endif
+    return uRet;
+}
+
Index: /trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/VMMR0.cpp	(revision 46860)
+++ /trunk/src/VBox/VMM/VMMR0/VMMR0.cpp	(revision 46861)
@@ -264,10 +264,11 @@
  * @param   pVM         Pointer to the VM.
  * @param   uSvnRev     The SVN revision of the ring-3 part.
+ * @param   uBuildType  Build type indicator.
  * @thread  EMT.
  */
-static int vmmR0InitVM(PVM pVM, uint32_t uSvnRev)
-{
-    /*
-     * Match the SVN revisions.
+static int vmmR0InitVM(PVM pVM, uint32_t uSvnRev, uint32_t uBuildType)
+{
+    /*
+     * Match the SVN revisions and build type.
      */
     if (uSvnRev != VMMGetSvnRev())
@@ -277,7 +278,14 @@
         return VERR_VMM_R0_VERSION_MISMATCH;
     }
+    if (uBuildType != vmmGetBuildType())
+    {
+        LogRel(("VMMR0InitVM: Build type mismatch, r3=%#x r0=%#x\n", uBuildType, vmmGetBuildType()));
+        SUPR0Printf("VMMR0InitVM: Build type mismatch, r3=%#x r0=%#x\n", uBuildType, vmmGetBuildType());
+        return VERR_VMM_R0_VERSION_MISMATCH;
+    }
     if (    !VALID_PTR(pVM)
         ||  pVM->pVMR0 != pVM)
         return VERR_INVALID_PARAMETER;
+
 
 #ifdef LOG_ENABLED
@@ -953,5 +961,5 @@
          */
         case VMMR0_DO_VMMR0_INIT:
-            return vmmR0InitVM(pVM, (uint32_t)u64Arg);
+            return vmmR0InitVM(pVM, RT_LODWORD(u64Arg), RT_HIDWORD(u64Arg));
 
         /*
Index: /trunk/src/VBox/VMM/VMMR3/VMM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/VMM.cpp	(revision 46860)
+++ /trunk/src/VBox/VMM/VMMR3/VMM.cpp	(revision 46861)
@@ -511,5 +511,6 @@
         rc = VINF_SUCCESS;
 #else
-        rc = SUPR3CallVMMR0Ex(pVM->pVMR0, 0 /*idCpu*/, VMMR0_DO_VMMR0_INIT, VMMGetSvnRev(), NULL);
+        rc = SUPR3CallVMMR0Ex(pVM->pVMR0, 0 /*idCpu*/, VMMR0_DO_VMMR0_INIT,
+                              RT_MAKE_U64(VMMGetSvnRev(), vmmGetBuildType()), NULL);
 #endif
         /*
@@ -569,10 +570,11 @@
         CPUMSetHyperESP(pVCpu, pVCpu->vmm.s.pbEMTStackBottomRC); /* Clear the stack. */
         uint64_t u64TS = RTTimeProgramStartNanoTS();
-        CPUMPushHyper(pVCpu, (uint32_t)(u64TS >> 32));    /* Param 3: The program startup TS - Hi. */
-        CPUMPushHyper(pVCpu, (uint32_t)u64TS);            /* Param 3: The program startup TS - Lo. */
+        CPUMPushHyper(pVCpu, (uint32_t)(u64TS >> 32));    /* Param 4: The program startup TS - Hi. */
+        CPUMPushHyper(pVCpu, (uint32_t)u64TS);            /* Param 4: The program startup TS - Lo. */
+        CPUMPushHyper(pVCpu, vmmGetBuildType());          /* Param 3: Version argument. */
         CPUMPushHyper(pVCpu, VMMGetSvnRev());             /* Param 2: Version argument. */
         CPUMPushHyper(pVCpu, VMMGC_DO_VMMGC_INIT);        /* Param 1: Operation. */
         CPUMPushHyper(pVCpu, pVM->pVMRC);                 /* Param 0: pVM */
-        CPUMPushHyper(pVCpu, 5 * sizeof(RTRCPTR));        /* trampoline param: stacksize.  */
+        CPUMPushHyper(pVCpu, 6 * sizeof(RTRCPTR));        /* trampoline param: stacksize.  */
         CPUMPushHyper(pVCpu, RCPtrEP);                    /* Call EIP. */
         CPUMSetHyperEIP(pVCpu, pVM->vmm.s.pfnCallTrampolineRC);
Index: /trunk/src/VBox/VMM/VMMRC/VMMRC.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMRC/VMMRC.cpp	(revision 46860)
+++ /trunk/src/VBox/VMM/VMMRC/VMMRC.cpp	(revision 46861)
@@ -70,16 +70,21 @@
         {
             /*
-             * Validate the svn revision (uArg).
+             * Validate the svn revision (uArg) and build type (ellipsis).
              */
             if (uArg != VMMGetSvnRev())
                 return VERR_VMM_RC_VERSION_MISMATCH;
 
+            va_list va;
+            va_start(va, uArg);
+
+            uint32_t uBuildType = va_arg(va, uint32_t);
+            if (uBuildType != vmmGetBuildType())
+                return VERR_VMM_RC_VERSION_MISMATCH;
+
             /*
              * Initialize the runtime.
-             * (The program timestamp is found in the elipsis.)
              */
-            va_list va;
-            va_start(va, uArg);
             uint64_t u64TS = va_arg(va, uint64_t);
+
             va_end(va);
 
Index: /trunk/src/VBox/VMM/include/VMMInternal.h
===================================================================
--- /trunk/src/VBox/VMM/include/VMMInternal.h	(revision 46860)
+++ /trunk/src/VBox/VMM/include/VMMInternal.h	(revision 46861)
@@ -520,4 +520,5 @@
 int  vmmInitFormatTypes(void);
 void vmmTermFormatTypes(void);
+uint32_t vmmGetBuildType(void);
 
 #ifdef IN_RING3
