Index: /trunk/src/VBox/VMM/VMMR0/PGMR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/PGMR0.cpp	(revision 92419)
+++ /trunk/src/VBox/VMM/VMMR0/PGMR0.cpp	(revision 92420)
@@ -363,5 +363,5 @@
 int pgmR0PhysAllocateLargePage(PGVM pGVM, VMCPUID idCpu, RTGCPHYS GCPhys)
 {
-    STAM_PROFILE_ADV_START(&pGVM->pgm.s.Stats.StatLargePageAlloc2, a);
+    STAM_PROFILE_START(&pGVM->pgm.s.Stats.StatLargePageAlloc2, a);
     PGM_LOCK_ASSERT_OWNER_EX(pGVM, &pGVM->aCpus[idCpu]);
 
@@ -411,9 +411,15 @@
         {
             Log(("PGMR0PhysAllocateLargePage: Failed: %Rrc\n", rc));
+            STAM_REL_COUNTER_INC(&pGVM->pgm.s.StatLargePageAllocFailed);
+            if (rc == VERR_NOT_SUPPORTED)
+            {
+                LogRel(("PGM: Disabling large pages because of VERR_NOT_SUPPORTED status.\n"));
+                PGMSetLargePageUsage(pGVM, false);
+            }
             return rc;
         }
     }
 
-    STAM_PROFILE_ADV_STOP_START(&pGVM->pgm.s.Stats.StatLargePageAlloc2, &pGVM->pgm.s.Stats.StatLargePageSetup, a);
+    STAM_PROFILE_STOP_START(&pGVM->pgm.s.Stats.StatLargePageAlloc2, &pGVM->pgm.s.Stats.StatLargePageSetup, a);
 
     /*
@@ -475,5 +481,5 @@
     pgmPhysInvalidatePageMapTLB(pGVM);
 
-    STAM_PROFILE_ADV_STOP(&pGVM->pgm.s.Stats.StatLargePageSetup, a);
+    STAM_PROFILE_STOP(&pGVM->pgm.s.Stats.StatLargePageSetup, a);
 #if 0 /** @todo returning info statuses here might not be a great idea... */
     LogFlow(("PGMR0PhysAllocateLargePage: returns %Rrc\n", VBOXSTRICTRC_VAL(rc) ));
Index: /trunk/src/VBox/VMM/VMMR3/PGM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PGM.cpp	(revision 92419)
+++ /trunk/src/VBox/VMM/VMMR3/PGM.cpp	(revision 92420)
@@ -1221,4 +1221,5 @@
 
     PGM_REG_PROFILE_NS(&pPGM->StatLargePageAlloc,               "/PGM/LargePage/Alloc",               "Time spent by the host OS for large page allocation.");
+    PGM_REG_COUNTER(&pPGM->StatLargePageAllocFailed,            "/PGM/LargePage/AllocFailed",         "Number of allocation failures.");
     PGM_REG_COUNTER(&pPGM->StatLargePageOverflow,               "/PGM/LargePage/Overflow",            "The number of times allocating a large page took too long.");
     PGM_REG_COUNTER(&pPGM->StatLargePageTlbFlush,               "/PGM/LargePage/TlbFlush",            "The number of times a full VCPU TLB flush was required after a large allocation.");
Index: /trunk/src/VBox/VMM/include/PGMInternal.h
===================================================================
--- /trunk/src/VBox/VMM/include/PGMInternal.h	(revision 92419)
+++ /trunk/src/VBox/VMM/include/PGMInternal.h	(revision 92420)
@@ -3015,6 +3015,6 @@
     STAMPROFILE StatTrackDeref;                     /**< Profiling of SyncPageWorkerTrackDeref (expensive). */
 
-    STAMPROFILEADV StatLargePageAlloc2;            /**< Time spent setting up newly allocated large pages. */
-    STAMPROFILEADV StatLargePageSetup;             /**< Time spent setting up newly allocated large pages. */
+    STAMPROFILE StatLargePageAlloc2;                /**< Time spent setting up newly allocated large pages. */
+    STAMPROFILE StatLargePageSetup;                 /**< Time spent setting up newly allocated large pages. */
     /** pgmPhysIsValidLargePage profiling - R3 */
     STAMPROFILE StatR3IsValidLargePage;
@@ -3323,4 +3323,5 @@
 
     STAMPROFILE                     StatLargePageAlloc;     /**< Time spent by the host OS for large page allocation. */
+    STAMCOUNTER                     StatLargePageAllocFailed; /**< Count allocation failures. */
     STAMCOUNTER                     StatLargePageOverflow;  /**< The number of times allocating a large pages takes more than the allowed period. */
     STAMCOUNTER                     StatLargePageReused;    /**< The number of large pages we've reused.*/
