Index: /trunk/include/VBox/vmm/cpum.h
===================================================================
--- /trunk/include/VBox/vmm/cpum.h	(revision 44075)
+++ /trunk/include/VBox/vmm/cpum.h	(revision 44076)
@@ -415,4 +415,5 @@
 VMMR3DECL(int)          CPUMR3Init(PVM pVM);
 VMMR3DECL(int)          CPUMR3InitCompleted(PVM pVM);
+VMMR3DECL(int)          CPUMR3LogCpuIds(PVM pVM);
 VMMR3DECL(void)         CPUMR3Relocate(PVM pVM);
 VMMR3DECL(int)          CPUMR3Term(PVM pVM);
Index: /trunk/src/VBox/VMM/VMMR0/CPUMR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/CPUMR0.cpp	(revision 44075)
+++ /trunk/src/VBox/VMM/VMMR0/CPUMR0.cpp	(revision 44076)
@@ -105,4 +105,51 @@
 #endif
     return VINF_SUCCESS;
+}
+
+
+/**
+ * Check the CPUID features of this particular CPU and disable relevant features
+ * for the guest which do not exist on this CPU. We have seen systems where the
+ * X86_CPUID_FEATURE_ECX_MONITOR feature flag is only set on some host CPUs, see
+ * @{bugref 5436}.
+ *
+ * @param   idCpu       The identifier for the CPU the function is called on.
+ * @param   pvUser1     Pointer to the VM structure.
+ * @param   pvUser2     Ignored.
+ */
+static DECLCALLBACK(void) cpumR0CheckCpuid(RTCPUID idCpu, void *pvUser1, void *pvUser2)
+{
+    struct
+    {
+        uint32_t uLeave; /* leave to check */
+        uint32_t ecx;    /* which bits in ecx to unify between CPUs */
+        uint32_t edx;    /* which bits in edx to unify between CPUs */
+    } aCpuidUnify[]
+    =
+    {
+        { 0x00000001, X86_CPUID_FEATURE_ECX_CX16
+                    | X86_CPUID_FEATURE_ECX_MONITOR,
+                      X86_CPUID_FEATURE_EDX_CX8 }
+    };
+    PVM pVM = (PVM)pvUser1;
+    PCPUM pCPUM = &pVM->cpum.s;
+    for (uint32_t i = 0; i < RT_ELEMENTS(aCpuidUnify); i++)
+    {
+        uint32_t uLeave = aCpuidUnify[i].uLeave;
+        uint32_t eax, ebx, ecx, edx;
+
+        ASMCpuId_Idx_ECX(uLeave, 0, &eax, &ebx, &ecx, &edx);
+        PCPUMCPUID paLeaves;
+        uint32_t idx;
+        if (uLeave < 0x80000000)
+            paLeaves = &pCPUM->aGuestCpuIdStd[uLeave - 0x00000000];
+        else if (uLeave < 0xc0000000)
+            paLeaves = &pCPUM->aGuestCpuIdExt[uLeave - 0x80000000];
+        else
+            paLeaves = &pCPUM->aGuestCpuIdCentaur[uLeave - 0xc0000000];
+        /* unify important bits */
+        paLeaves->ecx & (ecx | ~aCpuidUnify[i].ecx);
+        paLeaves->edx & (edx | ~aCpuidUnify[i].edx);
+    }
 }
 
@@ -205,4 +252,6 @@
             }
         }
+
+	RTMpOnAll(cpumR0CheckCpuid, pVM, NULL);
     }
 
@@ -676,4 +725,8 @@
  * Worker for cpumR0MapLocalApics. Check each CPU for a present Local APIC.
  * Play safe and treat each CPU separate.
+ *
+ * @param   idCpu       The identifier for the CPU the function is called on.
+ * @param   pvUser1     Ignored.
+ * @param   pvUser2     Ignored.
  */
 static DECLCALLBACK(void) cpumR0MapLocalApicWorker(RTCPUID idCpu, void *pvUser1, void *pvUser2)
Index: /trunk/src/VBox/VMM/VMMR3/CPUM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/CPUM.cpp	(revision 44075)
+++ /trunk/src/VBox/VMM/VMMR3/CPUM.cpp	(revision 44076)
@@ -1394,18 +1394,4 @@
     if (fEnable)
         CPUMSetGuestCpuIdFeature(pVM, CPUMCPUIDFEATURE_HVP);
-    /*
-     * Log the cpuid and we're good.
-     */
-    bool fOldBuffered = RTLogRelSetBuffering(true /*fBuffered*/);
-    RTCPUSET OnlineSet;
-    LogRel(("Logical host processors: %u present, %u max, %u online, online mask: %016RX64\n",
-            (unsigned)RTMpGetPresentCount(), (unsigned)RTMpGetCount(), (unsigned)RTMpGetOnlineCount(),
-            RTCpuSetToU64(RTMpGetOnlineSet(&OnlineSet)) ));
-    LogRel(("************************* CPUID dump ************************\n"));
-    DBGFR3Info(pVM, "cpuid", "verbose", DBGFR3InfoLogRelHlp());
-    LogRel(("\n"));
-    DBGFR3InfoLog(pVM, "cpuid", "verbose"); /* macro */
-    RTLogRelSetBuffering(fOldBuffered);
-    LogRel(("******************** End of CPUID dump **********************\n"));
 
 #undef PORTABLE_DISABLE_FEATURE_BIT
@@ -4405,2 +4391,26 @@
 }
 
+/**
+ * Called when the ring-0 init phases comleted.
+ *
+ * @returns VBox status code.
+ * @param   pVM                 Pointer to the VM.
+ */
+VMMR3DECL(int) CPUMR3LogCpuIds(PVM pVM)
+{
+    /*
+     * Log the cpuid.
+     */
+    bool fOldBuffered = RTLogRelSetBuffering(true /*fBuffered*/);
+    RTCPUSET OnlineSet;
+    LogRel(("Logical host processors: %u present, %u max, %u online, online mask: %016RX64\n",
+                (unsigned)RTMpGetPresentCount(), (unsigned)RTMpGetCount(), (unsigned)RTMpGetOnlineCount(),
+                RTCpuSetToU64(RTMpGetOnlineSet(&OnlineSet)) ));
+    LogRel(("************************* CPUID dump ************************\n"));
+    DBGFR3Info(pVM, "cpuid", "verbose", DBGFR3InfoLogRelHlp());
+    LogRel(("\n"));
+    DBGFR3InfoLog(pVM, "cpuid", "verbose"); /* macro */
+    RTLogRelSetBuffering(fOldBuffered);
+    LogRel(("******************** End of CPUID dump **********************\n"));
+    return VINF_SUCCESS;
+}
Index: /trunk/src/VBox/VMM/VMMR3/VMM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/VMM.cpp	(revision 44075)
+++ /trunk/src/VBox/VMM/VMMR3/VMM.cpp	(revision 44076)
@@ -690,4 +690,11 @@
                 pVM->vmm.s.fUsePeriodicPreemptionTimers = false;
             LogRel(("VMM: fUsePeriodicPreemptionTimers=%RTbool\n", pVM->vmm.s.fUsePeriodicPreemptionTimers));
+
+            /*
+             * CPUM's post-initialization (print CPUIDs).
+             */
+            rc = CPUMR3LogCpuIds(pVM);
+            AssertRCReturn(rc, rc);
+
             break;
         }
