Index: /trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp	(revision 40726)
+++ /trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp	(revision 40727)
@@ -2332,5 +2332,6 @@
  * (This is a special optimization used by the VGA device.)
  *
- * @returns VBox status code.
+ * @returns VBox status code.  This API may return VINF_SUCCESS even if no
+ *          remapping is made,.
  *
  * @param   pVM             The virtual machine.
@@ -2353,5 +2354,7 @@
         return VINF_SUCCESS;    /* ignore */
 
-    IOM_LOCK(pVM);
+    int rc = IOM_LOCK(pVM);
+    if (RT_FAILURE(rc))
+        return VINF_SUCCESS; /* better luck the next time around */
 
     /*
@@ -2371,5 +2374,5 @@
     GCPhysRemapped &= ~(RTGCPHYS)PAGE_OFFSET_MASK;
 
-    int rc = PGMHandlerPhysicalPageAlias(pVM, pRange->GCPhys, GCPhys, GCPhysRemapped);
+    rc = PGMHandlerPhysicalPageAlias(pVM, pRange->GCPhys, GCPhys, GCPhysRemapped);
 
     IOM_UNLOCK(pVM);
