Index: /trunk/src/VBox/VMM/PGMInternal.h
===================================================================
--- /trunk/src/VBox/VMM/PGMInternal.h	(revision 22708)
+++ /trunk/src/VBox/VMM/PGMInternal.h	(revision 22709)
@@ -3055,4 +3055,5 @@
 PPGMPOOLPAGE    pgmPoolGetPage(PPGMPOOL pPool, RTHCPHYS HCPhys);
 int             pgmPoolSyncCR3(PVMCPU pVCpu);
+bool            pgmPoolIsDirtyPage(PVM pVM, RTGCPHYS GCPhys);
 int             pgmPoolTrackFlushGCPhys(PVM pVM, PPGMPAGE pPhysPage, bool *pfFlushTLBs);
 uint16_t        pgmPoolTrackPhysExtAddref(PVM pVM, uint16_t u16, uint16_t iShwPT);
Index: /trunk/src/VBox/VMM/PGMPhys.cpp
===================================================================
--- /trunk/src/VBox/VMM/PGMPhys.cpp	(revision 22708)
+++ /trunk/src/VBox/VMM/PGMPhys.cpp	(revision 22709)
@@ -375,5 +375,9 @@
         }
         else
-        if (PGM_PAGE_HAS_ACTIVE_HANDLERS(pPage))
+        if (    PGM_PAGE_HAS_ACTIVE_HANDLERS(pPage)
+#ifdef PGMPOOL_WITH_OPTIMIZED_DIRTY_PT
+            ||  pgmPoolIsDirtyPage(pVM, GCPhys)
+#endif
+           )
         {
             /* We *must* flush any corresponding pgm pool page here, otherwise we'll
@@ -445,4 +449,7 @@
              */
             if (    PGM_PAGE_HAS_ACTIVE_HANDLERS(pPage)
+#ifdef PGMPOOL_WITH_OPTIMIZED_DIRTY_PT
+                ||  pgmPoolIsDirtyPage(pVM, GCPhys)
+#endif
                 ||  RT_UNLIKELY(PGM_PAGE_GET_STATE(pPage) != PGM_PAGE_STATE_ALLOCATED))
             {
Index: /trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp	(revision 22708)
+++ /trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp	(revision 22709)
@@ -1609,4 +1609,32 @@
 
 /**
+ * Check if the specified page is dirty (not write monitored)
+ *
+ * @return dirty or not
+ * @param   pVM             VM Handle.
+ * @param   GCPhys          Guest physical address
+ */
+bool pgmPoolIsDirtyPage(PVM pVM, RTGCPHYS GCPhys)
+{
+    if (!pPool->cDirtyPages)
+        return false;
+
+    for (unsigned i = 0; i < RT_ELEMENTS(pPool->aIdxDirtyPages); i++)
+    {
+        if (pPool->aIdxDirtyPages[idxSlot] != NIL_PGMPOOL_IDX)
+        {
+            PPGMPOOLPAGE pPage;
+            unsigned     idxPage = pPool->aIdxDirtyPages[idxSlot];
+            AssertRelease(idxPage != NIL_PGMPOOL_IDX);
+
+            pPage = &pPool->aPages[idxPage];
+            if (pPage->GCPhys == GCPhys)
+                return true;
+        }
+    }
+    return false;
+}
+
+/**
  * Reset all dirty pages by reinstating page monitoring.
  *
