Index: /trunk/include/VBox/rawpci.h
===================================================================
--- /trunk/include/VBox/rawpci.h	(revision 35958)
+++ /trunk/include/VBox/rawpci.h	(revision 35959)
@@ -48,5 +48,5 @@
 {
     /* in */
-    RTHCPHYS             StartAddress;
+    RTGCPHYS             StartAddress;
     uint64_t             iRegionSize;
     uint32_t             fFlags;
@@ -130,4 +130,10 @@
 } PCIRAWREQPCICFGREAD;
 
+
+/**
+ * Handle for the raw PCI device.
+ */
+typedef RTR0PTR PCIRAWDEVHANDLE;
+
 /**
  * Request buffer use for communication with the driver.
@@ -144,5 +150,5 @@
     int32_t         iRequest;
     /** Host device request targetted to. */
-    uint32_t        TargetDevice;
+    PCIRAWDEVHANDLE TargetDevice;
     /** Call parameters. */
     union
@@ -160,5 +166,4 @@
 } PCIRAWSENDREQ;
 typedef PCIRAWSENDREQ *PPCIRAWSENDREQ;
-
 
 /**
@@ -222,5 +227,16 @@
      */
     DECLR0CALLBACKMEMBER(void, pfnRelease,(PRAWPCIDEVPORT pPort));
+
+    /**
+     * Init device.
+     *
+     * @param   pPort     Pointer to this structure.
+     * @param   fFlags    Initialization flags.
+     */
+    DECLR0CALLBACKMEMBER(int,  pfnInit,(PRAWPCIDEVPORT pPort, 
+                                        uint32_t       fFlags));
     
+    
+
     /** Structure version number. (RAWPCIDEVPORT_VERSION) */
     uint32_t u32VersionEnd;
@@ -267,5 +283,4 @@
 } RAWPCIFACTORY;
 
-
 #define RAWPCIFACTORY_UUID_STR "c0268f49-e1e4-402b-b7e0-eb8d09659a9b"
 
Index: /trunk/src/VBox/HostDrivers/VBoxPci/VBoxPci.c
===================================================================
--- /trunk/src/VBox/HostDrivers/VBoxPci/VBoxPci.c	(revision 35958)
+++ /trunk/src/VBox/HostDrivers/VBoxPci/VBoxPci.c	(revision 35959)
@@ -85,4 +85,12 @@
 }
 
+/**
+ * @copydoc RAWPCIDEVPORT:: pfnRelease
+ */
+DECLHIDDEN(int) vboxPciDevInit(PRAWPCIDEVPORT pThis, uint32_t fFlags)
+{
+    return VINF_SUCCESS;
+}
+
 
 /**
@@ -113,10 +121,21 @@
     pNew->DevPort.pfnRetain             = vboxPciDevRetain;
     pNew->DevPort.pfnRelease            = vboxPciDevRelease;
+    pNew->DevPort.pfnInit               = vboxPciDevInit;
     pNew->DevPort.u32VersionEnd         = RAWPCIDEVPORT_VERSION;
     
     rc = RTSpinlockCreate(&pNew->hSpinlock);
-    if (RT_SUCCESS(rc))
-    {
-        *ppDevPort = &pNew->DevPort;
+
+    if (RT_SUCCESS(rc))
+    {
+        rc = pNew->DevPort.pfnInit(&pNew->DevPort, fFlags);
+        if (RT_SUCCESS(rc))
+        {
+            *ppDevPort = &pNew->DevPort;
+        }
+        else
+        {
+            RTSpinlockDestroy(pNew->hSpinlock);
+            RTMemFree(pNew);
+        }
         return rc;
     }
Index: /trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR0/VMMR0.cpp	(revision 35958)
+++ /trunk/src/VBox/VMM/VMMR0/VMMR0.cpp	(revision 35959)
@@ -1179,5 +1179,5 @@
             if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PPCIRAWSENDREQ)pReqHdr)->pSession, pSession) || idCpu != NIL_VMCPUID)
                 return VERR_INVALID_PARAMETER;
-            return PciRawR0ProcessReq(pSession, (PPCIRAWSENDREQ)pReqHdr);
+            return PciRawR0ProcessReq(pSession, pVM, (PPCIRAWSENDREQ)pReqHdr);
 #endif
         /*
@@ -1553,3 +1553,2 @@
     RTAssertMsg2V(pszFormat, va);
 }
-
