Index: trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp	(revision 18234)
+++ trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp	(revision 18266)
@@ -169,9 +169,6 @@
     {
         rc = pgmHandlerPhysicalSetRamFlagsAndFlushShadowPTs(pVM, pNew, pRam);
-        if (rc == VINF_PGM_GCPHYS_ALIASED)
-        {
-            pVM->pgm.s.fSyncFlags |= PGM_SYNC_CLEAR_PGM_POOL;
-            VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);
-        }
+        if (rc == VINF_PGM_SYNC_CR3)
+            rc = VINF_PGM_GCPHYS_ALIASED;
         pVM->pgm.s.fPhysCacheFlushPending = true;
         HWACCMFlushTLB(pVM);
@@ -203,6 +200,6 @@
  * @returns VBox status code.
  * @retval  VINF_SUCCESS when shadow PTs was successfully updated.
- * @retval  VINF_PGM_GCPHYS_ALIASED when the shadow PTs could be updated because
- *          the guest page aliased or/and mapped by multiple PTs.
+ * @retval  VINF_PGM_SYNC_CR3 when the shadow PTs could be updated because
+ *          the guest page aliased or/and mapped by multiple PTs. FFs set.
  * @param   pVM     The VM handle.
  * @param   pCur    The physical handler.
@@ -441,12 +438,6 @@
     int rc = pgmPoolTrackFlushGCPhys(pVM, pPage, &fFlushTLBs);
     AssertLogRelRCReturnVoid(rc);
-    if (rc == VINF_PGM_GCPHYS_ALIASED)
-    {
-        pVM->pgm.s.fSyncFlags |= PGM_SYNC_CLEAR_PGM_POOL;
-        VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);
-        rc = VINF_PGM_SYNC_CR3;
-    }
 # ifdef IN_RC
-    else if (fFlushTLBs)
+    if (fFlushTLBs && rc != VINF_PGM_SYNC_CR3)
         PGM_INVL_GUEST_TLBS();
 # else
@@ -580,9 +571,4 @@
                      */
                     rc = pgmHandlerPhysicalSetRamFlagsAndFlushShadowPTs(pVM, pCur, pRam);
-                    if (rc == VINF_PGM_GCPHYS_ALIASED)
-                    {
-                        pVM->pgm.s.fSyncFlags |= PGM_SYNC_CLEAR_PGM_POOL;
-                        VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);
-                    }
                     pVM->pgm.s.fPhysCacheFlushPending = true;
 
@@ -891,9 +877,4 @@
                      */
                     rc = pgmHandlerPhysicalSetRamFlagsAndFlushShadowPTs(pVM, pCur, pRam);
-                    if (rc == VINF_PGM_GCPHYS_ALIASED)
-                    {
-                        pVM->pgm.s.fSyncFlags |= PGM_SYNC_CLEAR_PGM_POOL;
-                        VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);
-                    }
                     pVM->pgm.s.fPhysCacheFlushPending = true;
                     HWACCMFlushTLB(pVM);
Index: trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp	(revision 18234)
+++ trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp	(revision 18266)
@@ -382,17 +382,5 @@
     bool fFlushTLBs = false;
     int rc = pgmPoolTrackFlushGCPhys(pVM, pPage, &fFlushTLBs);
-    if (rc == VINF_SUCCESS)
-        /* nothing */;
-    else if (rc == VINF_PGM_GCPHYS_ALIASED)
-    {
-        pVM->pgm.s.fSyncFlags |= PGM_SYNC_CLEAR_PGM_POOL;
-        VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);
-        rc = VINF_PGM_SYNC_CR3;
-    }
-    else
-    {
-        AssertRCReturn(rc, rc);
-        AssertMsgFailedReturn(("%Rrc\n", rc), VERR_INTERNAL_ERROR);
-    }
+    AssertMsgReturn(rc == VINF_SUCCESS || rc == VINF_PGM_GCPHYS_ALIASED, ("%Rrc\n", rc), RT_FAILURE(rc) ? rc : VERR_INTERNAL_ERROR);
 
     /*
Index: trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp	(revision 18234)
+++ trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp	(revision 18266)
@@ -2630,6 +2630,6 @@
  * @returns VBox status code.
  * @retval  VINF_SUCCESS if all references has been successfully cleared.
- * @retval  VINF_PGM_GCPHYS_ALIASED if we're better off with a CR3 sync and
- *          a page pool cleaning.
+ * @retval  VINF_PGM_SYNC_CR3 if we're better off with a CR3 sync and a page
+ *          pool cleaning. FF and sync flags are set.
  *
  * @param   pVM         The VM handle.
@@ -2706,4 +2706,11 @@
     rc = VINF_PGM_GCPHYS_ALIASED;
 #endif
+
+    if (rc == VINF_PGM_GCPHYS_ALIASED)
+    {
+        pVM->pgm.s.fSyncFlags |= PGM_SYNC_CLEAR_PGM_POOL;
+        VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);
+        rc = VINF_PGM_SYNC_CR3;
+    }
 
     return rc;
@@ -3954,8 +3961,10 @@
     }
 
-    /* Force a shadow mode reinit (necessary for nested paging and ept). */
+    /*
+     * Force a shadow mode reinit (necessary for nested paging and ept).
+     * Reinit the current shadow paging mode as well; nested paging and
+     * EPT use a root CR3 which will get flushed here.
+     */
     pVM->pgm.s.enmShadowMode = PGMMODE_INVALID;
-
-    /* Reinit the current shadow paging mode as well; nested paging and EPT use a root CR3 which will get flushed here. */
     rc = PGMR3ChangeMode(pVM, PGMGetGuestMode(pVM));
     AssertRC(rc);
