Index: trunk/include/VBox/VBoxGuest.h
===================================================================
--- trunk/include/VBox/VBoxGuest.h	(revision 5035)
+++ trunk/include/VBox/VBoxGuest.h	(revision 5040)
@@ -107,4 +107,7 @@
 #define VMMDEV_VERSION_MINOR (0x4)
 #define VMMDEV_VERSION ((VMMDEV_VERSION_MAJOR << 16) | VMMDEV_VERSION_MINOR)
+
+/* Maximum request packet size */
+#define VMMDEV_MAX_VMMDEVREQ_SIZE           _1M
 
 /**
Index: trunk/include/VBox/pdmdev.h
===================================================================
--- trunk/include/VBox/pdmdev.h	(revision 5035)
+++ trunk/include/VBox/pdmdev.h	(revision 5040)
@@ -2343,5 +2343,5 @@
 
     /**
-     * Convert a guest physical address to a host virtual address.
+     * Convert a guest physical address to a host virtual address. (OBSOLETE)
      *
      * @returns VBox status code.
@@ -2355,8 +2355,8 @@
      * @remark  Do not use the mapping after you return to the caller! (it could get invalidated/changed)
      */
-    DECLR3CALLBACKMEMBER(int, pfnPhys2HCVirt,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTUINT cbRange, PRTHCPTR ppvHC));
-
-    /**
-     * Convert a guest virtual address to a host virtual address.
+    DECLR3CALLBACKMEMBER(int, pfnObsoletePhys2HCVirt,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTUINT cbRange, PRTHCPTR ppvHC));
+
+    /**
+     * Convert a guest virtual address to a host virtual address. (OBSOLETE)
      *
      * @returns VBox status code.
@@ -2369,5 +2369,5 @@
      * @remark  Do not use the mapping after you return to the caller! (it could get invalidated/changed)
      */
-    DECLR3CALLBACKMEMBER(int, pfnPhysGCPtr2HCPtr,(PPDMDEVINS pDevIns, RTGCPTR GCPtr, PRTHCPTR pHCPtr));
+    DECLR3CALLBACKMEMBER(int, pfnObsoletePhysGCPtr2HCPtr,(PPDMDEVINS pDevIns, RTGCPTR GCPtr, PRTHCPTR pHCPtr));
 
     /**
@@ -3207,20 +3207,4 @@
 
 /**
- * @copydoc PDMDEVHLP::pfnPhys2HCVirt
- */
-DECLINLINE(int) PDMDevHlpPhys2HCVirt(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTUINT cbRange, PRTHCPTR ppvHC)
-{
-    return pDevIns->pDevHlp->pfnPhys2HCVirt(pDevIns, GCPhys, cbRange, ppvHC);
-}
-
-/**
- * @copydoc PDMDEVHLP::pfnPhysGCPtr2HCPtr
- */
-DECLINLINE(int) PDMDevHlpPhysGCPtr2HCPtr(PPDMDEVINS pDevIns, RTGCPTR GCPtr, PRTHCPTR pHCPtr)
-{
-    return pDevIns->pDevHlp->pfnPhysGCPtr2HCPtr(pDevIns, GCPtr, pHCPtr);
-}
-
-/**
  * @copydoc PDMDEVHLP::pfnPhysGCPtr2GCPhys
  */
Index: trunk/include/VBox/pgm.h
===================================================================
--- trunk/include/VBox/pgm.h	(revision 5035)
+++ trunk/include/VBox/pgm.h	(revision 5040)
@@ -837,4 +837,5 @@
 typedef struct PGMPAGEMAPLOCK
 {
+    /** @todo see PGMPhysIsPageMappingLockValid for possibly incorrect assumptions */
 #ifdef IN_GC
     /** Just a dummy for the time being. */
@@ -965,4 +966,21 @@
 PGMDECL(void) PGMPhysReleasePageMappingLock(PVM pVM, PPGMPAGEMAPLOCK pLock);
 
+
+/**
+ * Checks if the lock structure is valid
+ * 
+ * @param   pVM         The VM handle.
+ * @param   pLock       The lock structure initialized by the mapping function.
+ */
+DECLINLINE(bool) PGMPhysIsPageMappingLockValid(PVM pVM, PPGMPAGEMAPLOCK pLock)
+{
+    /** @todo -> complete/change this  */
+#ifdef IN_GC
+    return !!(pLock->u32Dummy);
+#else
+    return !!(pLock->pvPage);
+#endif
+}
+
 /**
  * Converts a GC physical address to a HC pointer.
@@ -977,4 +995,6 @@
  * @param   cbRange Physical range
  * @param   pHCPtr  Where to store the HC pointer on success.
+ *
+ * @remark  Do *not* assume this mapping will be around forever!
  */
 PGMDECL(int) PGMPhysGCPhys2HCPtr(PVM pVM, RTGCPHYS GCPhys, RTUINT cbRange, PRTHCPTR pHCPtr);
@@ -989,4 +1009,6 @@
  * @param   GCPtr       The guest pointer to convert.
  * @param   pHCPtr      Where to store the HC virtual address.
+ *
+ * @remark  Do *not* assume this mapping will be around forever!
  */
 PGMDECL(int) PGMPhysGCPtr2HCPtr(PVM pVM, RTGCPTR GCPtr, PRTHCPTR pHCPtr);
@@ -1002,4 +1024,5 @@
  * @param   pHCPtr      Where to store the HC pointer.
  *
+ * @remark  Do *not* assume this mapping will be around forever!
  * @remark  This function is used by the REM at a time where PGM could
  *          potentially not be in sync. It could also be used by a
