Index: /trunk/src/VBox/VMM/PGMPhys.cpp
===================================================================
--- /trunk/src/VBox/VMM/PGMPhys.cpp	(revision 22709)
+++ /trunk/src/VBox/VMM/PGMPhys.cpp	(revision 22710)
@@ -377,5 +377,5 @@
         if (    PGM_PAGE_HAS_ACTIVE_HANDLERS(pPage)
 #ifdef PGMPOOL_WITH_OPTIMIZED_DIRTY_PT
-            ||  pgmPoolIsDirtyPage(pVM, GCPhys)
+            ||  pgmPoolIsDirtyPage(pVM, *pGCPhys)
 #endif
            )
Index: /trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp	(revision 22709)
+++ /trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp	(revision 22710)
@@ -1617,4 +1617,5 @@
 bool pgmPoolIsDirtyPage(PVM pVM, RTGCPHYS GCPhys)
 {
+    PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool);
     if (!pPool->cDirtyPages)
         return false;
@@ -1622,8 +1623,8 @@
     for (unsigned i = 0; i < RT_ELEMENTS(pPool->aIdxDirtyPages); i++)
     {
-        if (pPool->aIdxDirtyPages[idxSlot] != NIL_PGMPOOL_IDX)
+        if (pPool->aIdxDirtyPages[i] != NIL_PGMPOOL_IDX)
         {
             PPGMPOOLPAGE pPage;
-            unsigned     idxPage = pPool->aIdxDirtyPages[idxSlot];
+            unsigned     idxPage = pPool->aIdxDirtyPages[i];
             AssertRelease(idxPage != NIL_PGMPOOL_IDX);
 
