Index: trunk/src/VBox/VMM/VMMAll/IOMAll.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMAll/IOMAll.cpp	(revision 37423)
+++ trunk/src/VBox/VMM/VMMAll/IOMAll.cpp	(revision 37424)
@@ -37,4 +37,5 @@
 #include <VBox/log.h>
 #include <iprt/assert.h>
+#include "IOMInline.h"
 
 
@@ -292,5 +293,5 @@
         ||   (unsigned)Port - (unsigned)pRange->Port >= (unsigned)pRange->cPorts)
     {
-        pRange = iomIOPortGetRange(&pVM->iom.s, Port);
+        pRange = iomIOPortGetRange(pVM, Port);
         if (pRange)
             pVM->iom.s.CTX_SUFF(pRangeLastRead) = pRange;
@@ -387,5 +388,5 @@
      * Handler in ring-3?
      */
-    PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(&pVM->iom.s, Port);
+    PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(pVM, Port);
     if (pRangeR3)
     {
@@ -488,5 +489,5 @@
         ||   (unsigned)Port - (unsigned)pRange->Port >= (unsigned)pRange->cPorts)
     {
-        pRange = iomIOPortGetRange(&pVM->iom.s, Port);
+        pRange = iomIOPortGetRange(pVM, Port);
         if (pRange)
             pVM->iom.s.CTX_SUFF(pRangeLastRead) = pRange;
@@ -569,5 +570,5 @@
      * Handler in ring-3?
      */
-    PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(&pVM->iom.s, Port);
+    PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(pVM, Port);
     if (pRangeR3)
     {
@@ -658,5 +659,5 @@
         ||   (unsigned)Port - (unsigned)pRange->Port >= (unsigned)pRange->cPorts)
     {
-        pRange = iomIOPortGetRange(&pVM->iom.s, Port);
+        pRange = iomIOPortGetRange(pVM, Port);
         if (pRange)
             pVM->iom.s.CTX_SUFF(pRangeLastWrite) = pRange;
@@ -738,5 +739,5 @@
      * Handler in ring-3?
      */
-    PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(&pVM->iom.s, Port);
+    PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(pVM, Port);
     if (pRangeR3)
     {
@@ -828,5 +829,5 @@
         ||   (unsigned)Port - (unsigned)pRange->Port >= (unsigned)pRange->cPorts)
     {
-        pRange = iomIOPortGetRange(&pVM->iom.s, Port);
+        pRange = iomIOPortGetRange(pVM, Port);
         if (pRange)
             pVM->iom.s.CTX_SUFF(pRangeLastWrite) = pRange;
@@ -909,5 +910,5 @@
      * Handler in ring-3?
      */
-    PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(&pVM->iom.s, Port);
+    PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(pVM, Port);
     if (pRangeR3)
     {
Index: trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp	(revision 37423)
+++ trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp	(revision 37424)
@@ -36,4 +36,5 @@
 #include <VBox/vmm/vmm.h>
 #include <VBox/vmm/hwaccm.h>
+#include "IOMInline.h"
 
 #include <VBox/dis.h>
@@ -81,5 +82,5 @@
 {
 #ifdef VBOX_WITH_STATISTICS
-    PIOMMMIOSTATS pStats = iomMMIOGetStats(&pVM->iom.s, GCPhysFault, pRange);
+    PIOMMMIOSTATS pStats = iomMMIOGetStats(pVM, GCPhysFault, pRange);
     Assert(pStats);
 #endif
@@ -103,5 +104,5 @@
 {
 #ifdef VBOX_WITH_STATISTICS
-    PIOMMMIOSTATS pStats = iomMMIOGetStats(&pVM->iom.s, GCPhys, pRange);
+    PIOMMMIOSTATS pStats = iomMMIOGetStats(pVM, GCPhys, pRange);
     Assert(pStats);
 #endif
@@ -455,5 +456,5 @@
         PhysDst |= (RTGCUINTPTR)pu8Virt & PAGE_OFFSET_MASK;
         if (    RT_SUCCESS(rc)
-            &&  (pMMIODst = iomMMIOGetRange(&pVM->iom.s, PhysDst)))
+            &&  (pMMIODst = iomMMIOGetRange(pVM, PhysDst)))
         {
             /** @todo implement per-device locks for MMIO access. */
@@ -1076,5 +1077,5 @@
     PIOMMMIORANGE pRange = (PIOMMMIORANGE)pvUser;
     Assert(pRange);
-    Assert(pRange == iomMMIOGetRange(&pVM->iom.s, GCPhysFault));
+    Assert(pRange == iomMMIOGetRange(pVM, GCPhysFault));
     /** @todo implement per-device locks for MMIO access. It can replace the IOM
      *        lock for most of the code, provided that we retake the lock while
@@ -1087,5 +1088,5 @@
      * Locate the statistics, if > PAGE_SIZE we'll use the first byte for everything.
      */
-    PIOMMMIOSTATS pStats = iomMMIOGetStats(&pVM->iom.s, GCPhysFault, pRange);
+    PIOMMMIOSTATS pStats = iomMMIOGetStats(pVM, GCPhysFault, pRange);
     if (!pStats)
     {
@@ -1309,5 +1310,5 @@
         return VINF_IOM_HC_MMIO_READ_WRITE;
 #endif
-    VBOXSTRICTRC rcStrict = iomMMIOHandler(pVM, (uint32_t)uErrorCode, pCtxCore, GCPhysFault, iomMMIOGetRange(&pVM->iom.s, GCPhysFault));
+    VBOXSTRICTRC rcStrict = iomMMIOHandler(pVM, (uint32_t)uErrorCode, pCtxCore, GCPhysFault, iomMMIOGetRange(pVM, GCPhysFault));
     iomUnlock(pVM);
     return VBOXSTRICTRC_VAL(rcStrict);
@@ -1340,5 +1341,5 @@
 
     Assert(pRange);
-    Assert(pRange == iomMMIOGetRange(&pVM->iom.s, GCPhysFault));
+    Assert(pRange == iomMMIOGetRange(pVM, GCPhysFault));
     /** @todo implement per-device locks for MMIO access. It can replace the IOM
      *        lock for most of the code, provided that we retake the lock while
@@ -1384,5 +1385,5 @@
      * Lookup the current context range node and statistics.
      */
-    PIOMMMIORANGE pRange = iomMMIOGetRange(&pVM->iom.s, GCPhys);
+    PIOMMMIORANGE pRange = iomMMIOGetRange(pVM, GCPhys);
     AssertMsg(pRange, ("Handlers and page tables are out of sync or something! GCPhys=%RGp cbValue=%d\n", GCPhys, cbValue));
     if (!pRange)
@@ -1394,5 +1395,5 @@
     Assert(!pRange->CTX_SUFF(pDevIns) || !pRange->CTX_SUFF(pDevIns)->CTX_SUFF(pCritSect));
 #ifdef VBOX_WITH_STATISTICS
-    PIOMMMIOSTATS pStats = iomMMIOGetStats(&pVM->iom.s, GCPhys, pRange);
+    PIOMMMIOSTATS pStats = iomMMIOGetStats(pVM, GCPhys, pRange);
     if (!pStats)
     {
@@ -1513,5 +1514,5 @@
      * Lookup the current context range node.
      */
-    PIOMMMIORANGE pRange = iomMMIOGetRange(&pVM->iom.s, GCPhys);
+    PIOMMMIORANGE pRange = iomMMIOGetRange(pVM, GCPhys);
     AssertMsg(pRange, ("Handlers and page tables are out of sync or something! GCPhys=%RGp cbValue=%d\n", GCPhys, cbValue));
     if (!pRange)
@@ -1523,5 +1524,5 @@
     Assert(!pRange->CTX_SUFF(pDevIns) || !pRange->CTX_SUFF(pDevIns)->CTX_SUFF(pCritSect));
 #ifdef VBOX_WITH_STATISTICS
-    PIOMMMIOSTATS pStats = iomMMIOGetStats(&pVM->iom.s, GCPhys, pRange);
+    PIOMMMIOSTATS pStats = iomMMIOGetStats(pVM, GCPhys, pRange);
     if (!pStats)
     {
@@ -1934,5 +1935,5 @@
      * Lookup the context range node the page belongs to.
      */
-    PIOMMMIORANGE pRange = iomMMIOGetRange(&pVM->iom.s, GCPhys);
+    PIOMMMIORANGE pRange = iomMMIOGetRange(pVM, GCPhys);
     AssertMsgReturn(pRange,
                     ("Handlers and page tables are out of sync or something! GCPhys=%RGp\n", GCPhys), VERR_IOM_MMIO_RANGE_NOT_FOUND);
@@ -1998,5 +1999,5 @@
 #ifdef VBOX_STRICT
     /* Can't lock IOM here due to potential deadlocks in the VGA device; not safe to access. */
-    PIOMMMIORANGE pRange = iomMMIOGetRangeUnsafe(&pVM->iom.s, GCPhys);
+    PIOMMMIORANGE pRange = iomMMIOGetRangeUnsafe(pVM, GCPhys);
     AssertMsgReturn(pRange,
             ("Handlers and page tables are out of sync or something! GCPhys=%RGp\n", GCPhys), VERR_IOM_MMIO_RANGE_NOT_FOUND);
@@ -2051,5 +2052,5 @@
 #ifdef VBOX_STRICT
     /* Can't lock IOM here due to potential deadlocks in the VGA device; not safe to access. */
-    PIOMMMIORANGE pRange = iomMMIOGetRangeUnsafe(&pVM->iom.s, GCPhys);
+    PIOMMMIORANGE pRange = iomMMIOGetRangeUnsafe(pVM, GCPhys);
     AssertMsgReturn(pRange,
             ("Handlers and page tables are out of sync or something! GCPhys=%RGp\n", GCPhys), VERR_IOM_MMIO_RANGE_NOT_FOUND);
