Index: /trunk/include/VBox/rawpci.h
===================================================================
--- /trunk/include/VBox/rawpci.h	(revision 35985)
+++ /trunk/include/VBox/rawpci.h	(revision 35986)
@@ -32,4 +32,28 @@
 RT_C_DECLS_BEGIN
 
+/**
+ * Handle for the raw PCI device.
+ */
+typedef RTR0PTR PCIRAWDEVHANDLE;
+
+
+/** Parameters buffer for PCIRAWR0_DO_OPEN_DEVICE call */
+typedef struct
+{
+    /* in */
+    uint32_t PciAddress;
+    uint32_t fFlags;
+    /* out */
+    PCIRAWDEVHANDLE Device;
+} PCIRAWREQOPENDEVICE;
+
+/** Parameters buffer for PCIRAWR0_DO_CLOSE_DEVICE call */
+typedef struct
+{
+    /* in */
+    uint32_t fFlags;
+} PCIRAWREQCLOSEDEVICE;
+
+
 /** Parameters buffer for PCIRAWR0_DO_GET_REGION_INFO call */
 typedef struct
@@ -130,10 +154,4 @@
 } PCIRAWREQPCICFGREAD;
 
-
-/**
- * Handle for the raw PCI device.
- */
-typedef RTR0PTR PCIRAWDEVHANDLE;
-
 /**
  * Request buffer use for communication with the driver.
@@ -154,4 +172,6 @@
     union
     {
+        PCIRAWREQOPENDEVICE    aOpenDevice;
+        PCIRAWREQCLOSEDEVICE   aCloseDevice;
         PCIRAWREQGETREGIONINFO aGetRegionInfo;
         PCIRAWREQMAPREGION     aMapRegion;
@@ -172,4 +192,8 @@
 typedef enum PCIRAWR0OPERATION
 {
+    /* Open device. */
+    PCIRAWR0_DO_OPEN_DEVICE,
+    /* Close device. */
+    PCIRAWR0_DO_CLOSE_DEVICE,
     /* Get PCI region info. */
     PCIRAWR0_DO_GET_REGION_INFO,
Index: /trunk/src/VBox/HostDrivers/VBoxPci/VBoxPci.c
===================================================================
--- /trunk/src/VBox/HostDrivers/VBoxPci/VBoxPci.c	(revision 35985)
+++ /trunk/src/VBox/HostDrivers/VBoxPci/VBoxPci.c	(revision 35986)
@@ -39,4 +39,8 @@
 
 
+#define DEVPORT_2_VBOXRAWPCIINS(pPort) \
+    ( (PVBOXRAWPCIINS)((uint8_t *)pPort - RT_OFFSETOF(VBOXRAWPCIINS, DevPort)) )
+
+
 /**
  * Implements the SUPDRV component factor interface query method.
@@ -74,5 +78,5 @@
  * @copydoc RAWPCIDEVPORT:: pfnRetain
  */
-DECLHIDDEN(void) vboxPciDevRetain(PRAWPCIDEVPORT pThis)
+DECLHIDDEN(void) vboxPciDevRetain(PRAWPCIDEVPORT pPort)
 {
 }
@@ -81,14 +85,18 @@
  * @copydoc RAWPCIDEVPORT:: pfnRelease
  */
-DECLHIDDEN(void) vboxPciDevRelease(PRAWPCIDEVPORT pThis)
-{
-}
-
-/**
- * @copydoc RAWPCIDEVPORT:: pfnRelease
- */
-DECLHIDDEN(int) vboxPciDevInit(PRAWPCIDEVPORT pThis, uint32_t fFlags)
-{
-    return VINF_SUCCESS;
+DECLHIDDEN(void) vboxPciDevRelease(PRAWPCIDEVPORT pPort)
+{
+}
+
+/**
+ * @copydoc RAWPCIDEVPORT:: pfnInit
+ */
+DECLHIDDEN(int) vboxPciDevInit(PRAWPCIDEVPORT pPort, uint32_t fFlags)
+{
+    PVBOXRAWPCIINS pThis = DEVPORT_2_VBOXRAWPCIINS(pPort);
+
+    int rc = vboxPciOsDevInit(pThis, fFlags);
+
+    return rc;
 }
 
@@ -144,5 +152,4 @@
 }
 
-
 /**
  * @copydoc RAWPCIFACTORY::pfnCreateAndConnect
Index: /trunk/src/VBox/HostDrivers/VBoxPci/VBoxPciInternal.h
===================================================================
--- /trunk/src/VBox/HostDrivers/VBoxPci/VBoxPciInternal.h	(revision 35985)
+++ /trunk/src/VBox/HostDrivers/VBoxPci/VBoxPciInternal.h	(revision 35986)
@@ -88,4 +88,7 @@
 DECLHIDDEN(void) vboxPciShutdown(PVBOXRAWPCIGLOBALS pGlobals);
 
+DECLHIDDEN(int)  vboxPciOsDevInit  (PVBOXRAWPCIINS pIns, uint32_t fFlags);
+DECLHIDDEN(int)  vboxPciOsDevDeinit(PVBOXRAWPCIINS pIns, uint32_t fFlags);
+
 RT_C_DECLS_END
 
