Index: trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/DevIchAc97.cpp	(revision 91943)
+++ trunk/src/VBox/Devices/Audio/DevIchAc97.cpp	(revision 91944)
@@ -2833,5 +2833,5 @@
 # ifdef LOG_ENABLED
                             if (LogIsFlowEnabled())
-                                ichac97R3DbgPrintBdl(pDevIns, pThis, pStream, DBGFR3InfoLogHlp(), "ichac97IoPortNabmWrite: ");
+                                ichac97R3DbgPrintBdl(pDevIns, pThis, pStream, PDMDevHlpDBGFInfoLogHlp(pDevIns), "ichac97IoPortNabmWrite: ");
 # endif
                             ichac97R3StreamEnable(pDevIns, pThis, pThisCC, pStream, pStreamCC, true /* fEnable */);
Index: trunk/src/VBox/Devices/Network/DevVirtioNet.cpp
===================================================================
--- trunk/src/VBox/Devices/Network/DevVirtioNet.cpp	(revision 91943)
+++ trunk/src/VBox/Devices/Network/DevVirtioNet.cpp	(revision 91944)
@@ -1925,5 +1925,5 @@
 
     /* Save the common part */
-    int rc = vpciR3SaveExec(pHlp, &pThis->VPCI, pSSM);
+    int rc = vpciR3SaveExec(pDevIns, pHlp, &pThis->VPCI, pSSM);
     AssertRCReturn(rc, rc);
 
@@ -1975,5 +1975,5 @@
         LogRel(("%s: The mac address differs: config=%RTmac saved=%RTmac\n", INSTANCE(pThis), &pThis->macConfigured, &macConfigured));
 
-    rc = vpciR3LoadExec(pHlp, &pThis->VPCI, pSSM, uVersion, uPass, VNET_N_QUEUES);
+    rc = vpciR3LoadExec(pDevIns, pHlp, &pThis->VPCI, pSSM, uVersion, uPass, VNET_N_QUEUES);
     AssertRCReturn(rc, rc);
 
Index: trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
===================================================================
--- trunk/src/VBox/Devices/VMMDev/VMMDev.cpp	(revision 91943)
+++ trunk/src/VBox/Devices/VMMDev/VMMDev.cpp	(revision 91944)
@@ -597,13 +597,12 @@
     {
         VMMDevReqNtBugCheck const *pReq = (VMMDevReqNtBugCheck const *)pReqHdr;
-        DBGFR3ReportBugCheck(PDMDevHlpGetVM(pDevIns), PDMDevHlpGetVMCPU(pDevIns), DBGFEVENT_BSOD_VMMDEV,
-                             pReq->uBugCheck, pReq->auParameters[0], pReq->auParameters[1],
-                             pReq->auParameters[2], pReq->auParameters[3]);
+        PDMDevHlpDBGFReportBugCheck(pDevIns, DBGFEVENT_BSOD_VMMDEV,
+                                    pReq->uBugCheck, pReq->auParameters[0], pReq->auParameters[1],
+                                    pReq->auParameters[2], pReq->auParameters[3]);
     }
     else if (pReqHdr->size == sizeof(VMMDevRequestHeader))
     {
         LogRel(("VMMDev: NT BugCheck w/o data.\n"));
-        DBGFR3ReportBugCheck(PDMDevHlpGetVM(pDevIns), PDMDevHlpGetVMCPU(pDevIns), DBGFEVENT_BSOD_VMMDEV,
-                             0, 0, 0, 0, 0);
+        PDMDevHlpDBGFReportBugCheck(pDevIns, DBGFEVENT_BSOD_VMMDEV, 0, 0, 0, 0, 0);
     }
     else
@@ -2631,6 +2630,5 @@
      * Write the core file.
      */
-    PUVM pUVM = PDMDevHlpGetUVM(pDevIns);
-    return DBGFR3CoreWrite(pUVM, szCorePath, true /*fReplaceFile*/);
+    return PDMDevHlpDBGFCoreWrite(pDevIns, szCorePath, true /*fReplaceFile*/);
 }
 
Index: trunk/src/VBox/Devices/VMMDev/VMMDevTesting.cpp
===================================================================
--- trunk/src/VBox/Devices/VMMDev/VMMDevTesting.cpp	(revision 91943)
+++ trunk/src/VBox/Devices/VMMDev/VMMDevTesting.cpp	(revision 91944)
@@ -260,9 +260,7 @@
     if (cchValueNm && pszRegNm && *pszRegNm)
     {
-        PUVM        pUVM  = PDMDevHlpGetUVM(pDevIns);
-        PVM         pVM   = PDMDevHlpGetVM(pDevIns);
-        VMCPUID     idCpu = VMMGetCpuId(pVM);
+        VMCPUID     idCpu = PDMDevHlpGetCurrentCpuId(pDevIns);
         uint64_t    u64Value;
-        int rc2 = DBGFR3RegNmQueryU64(pUVM, idCpu, pszRegNm, &u64Value);
+        int rc2 = PDMDevHlpDBGFRegNmQueryU64(pDevIns, idCpu, pszRegNm, &u64Value);
         if (RT_SUCCESS(rc2))
         {
@@ -271,5 +269,5 @@
             char szFormat[128], szValue[128];
             RTStrPrintf(szFormat, sizeof(szFormat), "%%VR{%s}", pszRegNm);
-            rc2 = DBGFR3RegPrintf(pUVM, idCpu, szValue, sizeof(szValue), szFormat);
+            rc2 = PDMDevHlpDBGFRegPrintf(pDevIns, idCpu, szValue, sizeof(szValue), szFormat);
             if (RT_SUCCESS(rc2))
                 VMMDEV_TESTING_OUTPUT(("testing: VALUE '%s'%*s: %16s {reg=%s}%s\n",
Index: trunk/src/VBox/Devices/VirtIO/Virtio.cpp
===================================================================
--- trunk/src/VBox/Devices/VirtIO/Virtio.cpp	(revision 91943)
+++ trunk/src/VBox/Devices/VirtIO/Virtio.cpp	(revision 91944)
@@ -693,10 +693,10 @@
 
 # ifdef LOG_ENABLED
-void vpciR3DumpState(PVPCISTATE pThis, const char *pcszCaller)
+void vpciR3DumpState(PPDMDEVINS pDevIns, PVPCISTATE pThis, const char *pcszCaller)
 {
     if (LogIs2Enabled())
     {
         Log2(("vpciR3DumpState: (called from %s)\n", pcszCaller));
-        vpciR3DumpStateWorker(pThis, DBGFR3InfoLogHlp());
+        vpciR3DumpStateWorker(pThis, PDMDevHlpDBGFInfoLogHlp(pDevIns));
     }
 }
@@ -709,11 +709,12 @@
  *
  * @returns VBox status code.
+ * @param   pDevIns     The device insatnce data.
  * @param   pHlp        The device helpers.
  * @param   pThis       The shared virtio core instance data.
  * @param   pSSM        The handle to the saved state.
  */
-int vpciR3SaveExec(PCPDMDEVHLPR3 pHlp, PVPCISTATE pThis, PSSMHANDLE pSSM)
-{
-    vpciR3DumpState(pThis, "vpciR3SaveExec");
+int vpciR3SaveExec(PPDMDEVINS pDevIns, PCPDMDEVHLPR3 pHlp, PVPCISTATE pThis, PSSMHANDLE pSSM)
+{
+    vpciR3DumpState(pDevIns, pThis, "vpciR3SaveExec");
 
     pHlp->pfnSSMPutU32(pSSM, pThis->uGuestFeatures);
@@ -741,4 +742,5 @@
  *
  * @returns VBox status code.
+ * @param   pDevIns     The device insatnce data.
  * @param   pHlp        The device helpers.
  * @param   pThis       The shared virtio core instance data.
@@ -748,5 +750,5 @@
  * @param   cQueues     The default queue count (for old states).
  */
-int vpciR3LoadExec(PCPDMDEVHLPR3 pHlp, PVPCISTATE pThis, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass, uint32_t cQueues)
+int vpciR3LoadExec(PPDMDEVINS pDevIns, PCPDMDEVHLPR3 pHlp, PVPCISTATE pThis, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass, uint32_t cQueues)
 {
     int rc;
@@ -790,5 +792,5 @@
     }
 
-    vpciR3DumpState(pThis, "vpciLoadExec");
+    vpciR3DumpState(pDevIns, pThis, "vpciLoadExec");
 
     return VINF_SUCCESS;
Index: trunk/src/VBox/Devices/VirtIO/Virtio.h
===================================================================
--- trunk/src/VBox/Devices/VirtIO/Virtio.h	(revision 91943)
+++ trunk/src/VBox/Devices/VirtIO/Virtio.h	(revision 91944)
@@ -283,6 +283,6 @@
 void  vpciR3SetWriteLed(PVPCISTATE pThis, bool fOn);
 void  vpciR3SetReadLed(PVPCISTATE pThis, bool fOn);
-int   vpciR3SaveExec(PCPDMDEVHLPR3 pHlp, PVPCISTATE pThis, PSSMHANDLE pSSM);
-int   vpciR3LoadExec(PCPDMDEVHLPR3 pHlp, PVPCISTATE pThis, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass, uint32_t cQueues);
+int   vpciR3SaveExec(PPDMDEVINS pDevIns, PCPDMDEVHLPR3 pHlp, PVPCISTATE pThis, PSSMHANDLE pSSM);
+int   vpciR3LoadExec(PPDMDEVINS pDevIns, PCPDMDEVHLPR3 pHlp, PVPCISTATE pThis, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass, uint32_t cQueues);
 void  vpciR3DumpStateWorker(PVPCISTATE pThis, PCDBGFINFOHLP pHlp);
 
Index: trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp	(revision 91943)
+++ trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp	(revision 91944)
@@ -1488,4 +1488,79 @@
     LogFlow(("pdmR3DevHlp_DBGFTraceBuf: caller='%s'/%d: returns %p\n", pDevIns->pReg->szName, pDevIns->iInstance, hTraceBuf));
     return hTraceBuf;
+}
+
+
+/** @interface_method_impl{PDMDEVHLPR3,pfnDBGFReportBugCheck} */
+static DECLCALLBACK(VBOXSTRICTRC) pdmR3DevHlp_DBGFReportBugCheck(PPDMDEVINS pDevIns, DBGFEVENTTYPE enmEvent, uint64_t uBugCheck,
+                                                                 uint64_t uP1, uint64_t uP2, uint64_t uP3, uint64_t uP4)
+{
+    PDMDEV_ASSERT_DEVINS(pDevIns);
+    LogFlow(("pdmR3DevHlp_DBGFReportBugCheck: caller='%s'/%d: enmEvent=%u uBugCheck=%#x uP1=%#x uP2=%#x uP3=%#x uP4=%#x\n",
+             pDevIns->pReg->szName, pDevIns->iInstance, enmEvent, uBugCheck, uP1, uP2, uP3, uP4));
+
+    PVM pVM = pDevIns->Internal.s.pVMR3;
+    VM_ASSERT_EMT(pVM);
+    VBOXSTRICTRC rcStrict = DBGFR3ReportBugCheck(pVM, VMMGetCpu(pVM), enmEvent, uBugCheck, uP1, uP2, uP3, uP4);
+
+    LogFlow(("pdmR3DevHlp_DBGFReportBugCheck: caller='%s'/%d: returns %Rrc\n",
+             pDevIns->pReg->szName, pDevIns->iInstance, VBOXSTRICTRC_VAL(rcStrict)));
+    return rcStrict;
+}
+
+
+/** @interface_method_impl{PDMDEVHLPR3,pfnDBGFCoreWrite} */
+static DECLCALLBACK(int) pdmR3DevHlp_DBGFCoreWrite(PPDMDEVINS pDevIns, const char *pszFilename, bool fReplaceFile)
+{
+    PDMDEV_ASSERT_DEVINS(pDevIns);
+    LogFlow(("pdmR3DevHlp_DBGFCoreWrite: caller='%s'/%d: pszFilename=%p:{%s} fReplaceFile=%RTbool\n",
+             pDevIns->pReg->szName, pDevIns->iInstance, pszFilename, pszFilename, fReplaceFile));
+
+    int rc = DBGFR3CoreWrite(pDevIns->Internal.s.pVMR3->pUVM, pszFilename, fReplaceFile);
+
+    LogFlow(("pdmR3DevHlp_DBGFCoreWrite: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
+    return rc;
+}
+
+
+/** @interface_method_impl{PDMDEVHLPR3,pfnDBGFInfoLogHlp} */
+static DECLCALLBACK(PCDBGFINFOHLP) pdmR3DevHlp_DBGFInfoLogHlp(PPDMDEVINS pDevIns)
+{
+    PDMDEV_ASSERT_DEVINS(pDevIns); RT_NOREF(pDevIns);
+    LogFlow(("pdmR3DevHlp_DBGFInfoLogHlp: caller='%s'/%d:\n", pDevIns->pReg->szName, pDevIns->iInstance));
+
+    PCDBGFINFOHLP pHlp = DBGFR3InfoLogHlp();
+
+    LogFlow(("pdmR3DevHlp_DBGFInfoLogHlp: caller='%s'/%d: returns %p\n", pDevIns->pReg->szName, pDevIns->iInstance, pHlp));
+    return pHlp;
+}
+
+
+/** @interface_method_impl{PDMDEVHLPR3,pfnDBGFRegNmQueryU64} */
+static DECLCALLBACK(int) pdmR3DevHlp_DBGFRegNmQueryU64(PPDMDEVINS pDevIns, VMCPUID idDefCpu, const char *pszReg, uint64_t *pu64)
+{
+    PDMDEV_ASSERT_DEVINS(pDevIns);
+    LogFlow(("pdmR3DevHlp_DBGFRegNmQueryU64: caller='%s'/%d: idDefCpu=%u pszReg=%p:{%s} pu64=%p\n",
+             pDevIns->pReg->szName, pDevIns->iInstance, idDefCpu, pszReg, pszReg, pu64));
+
+    int rc = DBGFR3RegNmQueryU64(pDevIns->Internal.s.pVMR3->pUVM, idDefCpu, pszReg, pu64);
+
+    LogFlow(("pdmR3DevHlp_DBGFRegNmQueryU64: caller='%s'/%d: returns %Rrc *pu64=%#RX64\n",
+             pDevIns->pReg->szName, pDevIns->iInstance, rc, *pu64));
+    return rc;
+}
+
+
+/** @interface_method_impl{PDMDEVHLPR3,pfnDBGFRegPrintfV} */
+static DECLCALLBACK(int) pdmR3DevHlp_DBGFRegPrintfV(PPDMDEVINS pDevIns, VMCPUID idCpu, char *pszBuf, size_t cbBuf,
+                                                    const char *pszFormat, va_list va)
+{
+    PDMDEV_ASSERT_DEVINS(pDevIns);
+    LogFlow(("pdmR3DevHlp_DBGFRegPrintfV: caller='%s'/%d: idCpu=%u pszBuf=%p cbBuf=%u pszFormat=%p:{%s}\n",
+             pDevIns->pReg->szName, pDevIns->iInstance, idCpu, pszBuf, cbBuf, pszFormat, pszFormat));
+
+    int rc = DBGFR3RegPrintfV(pDevIns->Internal.s.pVMR3->pUVM, idCpu, pszBuf, cbBuf, pszFormat, va);
+
+    LogFlow(("pdmR3DevHlp_DBGFRegPrintfV: caller='%s'/%d: returns %Rrc\n", pDevIns->pReg->szName, pDevIns->iInstance, rc));
+    return rc;
 }
 
@@ -4819,4 +4894,9 @@
     pdmR3DevHlp_DBGFRegRegister,
     pdmR3DevHlp_DBGFTraceBuf,
+    pdmR3DevHlp_DBGFReportBugCheck,
+    pdmR3DevHlp_DBGFCoreWrite,
+    pdmR3DevHlp_DBGFInfoLogHlp,
+    pdmR3DevHlp_DBGFRegNmQueryU64,
+    pdmR3DevHlp_DBGFRegPrintfV,
     pdmR3DevHlp_STAMRegister,
     pdmR3DevHlp_STAMRegisterV,
@@ -5201,4 +5281,9 @@
     pdmR3DevHlp_DBGFRegRegister,
     pdmR3DevHlp_DBGFTraceBuf,
+    pdmR3DevHlp_DBGFReportBugCheck,
+    pdmR3DevHlp_DBGFCoreWrite,
+    pdmR3DevHlp_DBGFInfoLogHlp,
+    pdmR3DevHlp_DBGFRegNmQueryU64,
+    pdmR3DevHlp_DBGFRegPrintfV,
     pdmR3DevHlp_STAMRegister,
     pdmR3DevHlp_STAMRegisterV,
@@ -5854,4 +5939,9 @@
     pdmR3DevHlp_DBGFRegRegister,
     pdmR3DevHlp_DBGFTraceBuf,
+    pdmR3DevHlp_DBGFReportBugCheck,
+    pdmR3DevHlp_DBGFCoreWrite,
+    pdmR3DevHlp_DBGFInfoLogHlp,
+    pdmR3DevHlp_DBGFRegNmQueryU64,
+    pdmR3DevHlp_DBGFRegPrintfV,
     pdmR3DevHlp_STAMRegister,
     pdmR3DevHlp_STAMRegisterV,
