Index: /trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp	(revision 54814)
+++ /trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp	(revision 54815)
@@ -949,5 +949,8 @@
             && (auCur[2] == 0 || auCur[2] == uSubLeaf)
             && (auCur[3] == 0 || uLeaf == 0xb /* edx is fixed */) )
+        {
+            cRepeats = 0;
             break;
+        }
 
         /* 2. Look for more than 4 repeating value sets. */
@@ -968,7 +971,10 @@
         /* 3. Leaf 0xb level type 0 check. */
         if (   uLeaf == 0xb
-            && (auCur[3]  & 0xff00) == 0
-            && (auPrev[3] & 0xff00) == 0)
+            && (auCur[2]  & 0xff00) == 0
+            && (auPrev[2] & 0xff00) == 0)
+        {
+            cRepeats = 0;
             break;
+        }
 
         /* 99. Give up. */
@@ -1004,4 +1010,6 @@
     *pfFinalEcxUnchanged = auCur[2] == uSubLeaf && uLeaf == 0xb;
     *pcSubLeaves = uSubLeaf + 1 - cRepeats;
+    if (*pcSubLeaves == 0)
+        *pcSubLeaves = 1;
     return true;
 }
@@ -1925,8 +1933,8 @@
             uint32_t i = 0;
             if (   pCpum->GuestInfo.cCpuIdLeaves > 0
-                && pCpum->GuestInfo.paCpuIdLeavesR3[0].uEax <= UINT32_C(0xff))
+                && pCpum->GuestInfo.paCpuIdLeavesR3[0].uLeaf <= UINT32_C(0xff))
             {
                 while (   i + 1 < pCpum->GuestInfo.cCpuIdLeaves
-                       && pCpum->GuestInfo.paCpuIdLeavesR3[i + 1].uEax <= UINT32_C(0xff))
+                       && pCpum->GuestInfo.paCpuIdLeavesR3[i + 1].uLeaf <= UINT32_C(0xff))
                     i++;
                 pCpum->GuestInfo.DefCpuId.uEax = pCpum->GuestInfo.paCpuIdLeavesR3[i].uEax;
@@ -4368,5 +4376,5 @@
         {
             CPUMCPUID Host;
-            ASMCpuIdExSlow(pCurLeaf->uLeaf, pCurLeaf->uSubLeaf, 0, 0, &Host.uEax, &Host.uEbx, &Host.uEcx, &Host.uEdx);
+            ASMCpuIdExSlow(pCurLeaf->uLeaf, 0, pCurLeaf->uSubLeaf, 0, &Host.uEax, &Host.uEbx, &Host.uEcx, &Host.uEdx);
             pHlp->pfnPrintf(pHlp,
                             "Gst: %08x/%04x  %08x %08x %08x %08x\n"
@@ -4430,5 +4438,5 @@
         for (uint32_t uSubLeaf = 0; uSubLeaf < cMaxSubLeaves; uSubLeaf++)
         {
-            ASMCpuIdExSlow(uLeaf, uSubLeaf, 0, 0, &Host.uEax, &Host.uEbx, &Host.uEcx, &Host.uEdx);
+            ASMCpuIdExSlow(uLeaf, 0, uSubLeaf, 0, &Host.uEax, &Host.uEbx, &Host.uEcx, &Host.uEdx);
             if (   pCurLeaf - paLeaves < cLeaves
                 && pCurLeaf->uLeaf    == uLeaf
@@ -4437,5 +4445,5 @@
                 pHlp->pfnPrintf(pHlp,
                                 "Gst: %08x/%04x  %08x %08x %08x %08x\n"
-                                "Hst:               %08x %08x %08x %08x\n",
+                                "Hst:                %08x %08x %08x %08x\n",
                                 uLeaf, uSubLeaf, pCurLeaf->uEax, pCurLeaf->uEbx, pCurLeaf->uEcx, pCurLeaf->uEdx,
                                 Host.uEax, Host.uEbx, Host.uEcx, Host.uEdx);
@@ -4718,5 +4726,5 @@
             for (uint32_t uSubLeaf = 0; uSubLeaf < cMaxSubLeaves; uSubLeaf++)
             {
-                ASMCpuIdExSlow(uLeaf, uSubLeaf, 0, 0, &Host.uEax, &Host.uEbx, &Host.uEcx, &Host.uEdx);
+                ASMCpuIdExSlow(uLeaf, 0, uSubLeaf, 0, &Host.uEax, &Host.uEbx, &Host.uEcx, &Host.uEdx);
                 if (   pCurLeaf - paLeaves < cLeaves
                     && pCurLeaf->uLeaf    == uLeaf
@@ -4725,5 +4733,5 @@
                     pHlp->pfnPrintf(pHlp,
                                     "Gst: %08x/%04x  %08x %08x %08x %08x\n"
-                                    "Hst:                 %08x %08x %08x %08x\n",
+                                    "Hst:                %08x %08x %08x %08x\n",
                                     uLeaf, uSubLeaf, pCurLeaf->uEax, pCurLeaf->uEbx, pCurLeaf->uEcx, pCurLeaf->uEdx,
                                     Host.uEax, Host.uEbx, Host.uEcx, Host.uEdx);
