VirtualBox

Changeset 91944 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Oct 21, 2021 1:02:36 PM (3 years ago)
Author:
vboxsync
Message:

VMM,Devices: Eliminate direct calls to DBGFR3* and use the device helper callbacks, bugref:10074

Location:
trunk/src/VBox/Devices
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevIchAc97.cpp

    r91735 r91944  
    28332833# ifdef LOG_ENABLED
    28342834                            if (LogIsFlowEnabled())
    2835                                 ichac97R3DbgPrintBdl(pDevIns, pThis, pStream, DBGFR3InfoLogHlp(), "ichac97IoPortNabmWrite: ");
     2835                                ichac97R3DbgPrintBdl(pDevIns, pThis, pStream, PDMDevHlpDBGFInfoLogHlp(pDevIns), "ichac97IoPortNabmWrite: ");
    28362836# endif
    28372837                            ichac97R3StreamEnable(pDevIns, pThis, pThisCC, pStream, pStreamCC, true /* fEnable */);
  • trunk/src/VBox/Devices/Network/DevVirtioNet.cpp

    r91069 r91944  
    19251925
    19261926    /* Save the common part */
    1927     int rc = vpciR3SaveExec(pHlp, &pThis->VPCI, pSSM);
     1927    int rc = vpciR3SaveExec(pDevIns, pHlp, &pThis->VPCI, pSSM);
    19281928    AssertRCReturn(rc, rc);
    19291929
     
    19751975        LogRel(("%s: The mac address differs: config=%RTmac saved=%RTmac\n", INSTANCE(pThis), &pThis->macConfigured, &macConfigured));
    19761976
    1977     rc = vpciR3LoadExec(pHlp, &pThis->VPCI, pSSM, uVersion, uPass, VNET_N_QUEUES);
     1977    rc = vpciR3LoadExec(pDevIns, pHlp, &pThis->VPCI, pSSM, uVersion, uPass, VNET_N_QUEUES);
    19781978    AssertRCReturn(rc, rc);
    19791979
  • trunk/src/VBox/Devices/VMMDev/VMMDev.cpp

    r91921 r91944  
    597597    {
    598598        VMMDevReqNtBugCheck const *pReq = (VMMDevReqNtBugCheck const *)pReqHdr;
    599         DBGFR3ReportBugCheck(PDMDevHlpGetVM(pDevIns), PDMDevHlpGetVMCPU(pDevIns), DBGFEVENT_BSOD_VMMDEV,
    600                              pReq->uBugCheck, pReq->auParameters[0], pReq->auParameters[1],
    601                              pReq->auParameters[2], pReq->auParameters[3]);
     599        PDMDevHlpDBGFReportBugCheck(pDevIns, DBGFEVENT_BSOD_VMMDEV,
     600                                    pReq->uBugCheck, pReq->auParameters[0], pReq->auParameters[1],
     601                                    pReq->auParameters[2], pReq->auParameters[3]);
    602602    }
    603603    else if (pReqHdr->size == sizeof(VMMDevRequestHeader))
    604604    {
    605605        LogRel(("VMMDev: NT BugCheck w/o data.\n"));
    606         DBGFR3ReportBugCheck(PDMDevHlpGetVM(pDevIns), PDMDevHlpGetVMCPU(pDevIns), DBGFEVENT_BSOD_VMMDEV,
    607                              0, 0, 0, 0, 0);
     606        PDMDevHlpDBGFReportBugCheck(pDevIns, DBGFEVENT_BSOD_VMMDEV, 0, 0, 0, 0, 0);
    608607    }
    609608    else
     
    26312630     * Write the core file.
    26322631     */
    2633     PUVM pUVM = PDMDevHlpGetUVM(pDevIns);
    2634     return DBGFR3CoreWrite(pUVM, szCorePath, true /*fReplaceFile*/);
     2632    return PDMDevHlpDBGFCoreWrite(pDevIns, szCorePath, true /*fReplaceFile*/);
    26352633}
    26362634
  • trunk/src/VBox/Devices/VMMDev/VMMDevTesting.cpp

    r90609 r91944  
    260260    if (cchValueNm && pszRegNm && *pszRegNm)
    261261    {
    262         PUVM        pUVM  = PDMDevHlpGetUVM(pDevIns);
    263         PVM         pVM   = PDMDevHlpGetVM(pDevIns);
    264         VMCPUID     idCpu = VMMGetCpuId(pVM);
     262        VMCPUID     idCpu = PDMDevHlpGetCurrentCpuId(pDevIns);
    265263        uint64_t    u64Value;
    266         int rc2 = DBGFR3RegNmQueryU64(pUVM, idCpu, pszRegNm, &u64Value);
     264        int rc2 = PDMDevHlpDBGFRegNmQueryU64(pDevIns, idCpu, pszRegNm, &u64Value);
    267265        if (RT_SUCCESS(rc2))
    268266        {
     
    271269            char szFormat[128], szValue[128];
    272270            RTStrPrintf(szFormat, sizeof(szFormat), "%%VR{%s}", pszRegNm);
    273             rc2 = DBGFR3RegPrintf(pUVM, idCpu, szValue, sizeof(szValue), szFormat);
     271            rc2 = PDMDevHlpDBGFRegPrintf(pDevIns, idCpu, szValue, sizeof(szValue), szFormat);
    274272            if (RT_SUCCESS(rc2))
    275273                VMMDEV_TESTING_OUTPUT(("testing: VALUE '%s'%*s: %16s {reg=%s}%s\n",
  • trunk/src/VBox/Devices/VirtIO/Virtio.cpp

    r90447 r91944  
    693693
    694694# ifdef LOG_ENABLED
    695 void vpciR3DumpState(PVPCISTATE pThis, const char *pcszCaller)
     695void vpciR3DumpState(PPDMDEVINS pDevIns, PVPCISTATE pThis, const char *pcszCaller)
    696696{
    697697    if (LogIs2Enabled())
    698698    {
    699699        Log2(("vpciR3DumpState: (called from %s)\n", pcszCaller));
    700         vpciR3DumpStateWorker(pThis, DBGFR3InfoLogHlp());
     700        vpciR3DumpStateWorker(pThis, PDMDevHlpDBGFInfoLogHlp(pDevIns));
    701701    }
    702702}
     
    709709 *
    710710 * @returns VBox status code.
     711 * @param   pDevIns     The device insatnce data.
    711712 * @param   pHlp        The device helpers.
    712713 * @param   pThis       The shared virtio core instance data.
    713714 * @param   pSSM        The handle to the saved state.
    714715 */
    715 int vpciR3SaveExec(PCPDMDEVHLPR3 pHlp, PVPCISTATE pThis, PSSMHANDLE pSSM)
    716 {
    717     vpciR3DumpState(pThis, "vpciR3SaveExec");
     716int vpciR3SaveExec(PPDMDEVINS pDevIns, PCPDMDEVHLPR3 pHlp, PVPCISTATE pThis, PSSMHANDLE pSSM)
     717{
     718    vpciR3DumpState(pDevIns, pThis, "vpciR3SaveExec");
    718719
    719720    pHlp->pfnSSMPutU32(pSSM, pThis->uGuestFeatures);
     
    741742 *
    742743 * @returns VBox status code.
     744 * @param   pDevIns     The device insatnce data.
    743745 * @param   pHlp        The device helpers.
    744746 * @param   pThis       The shared virtio core instance data.
     
    748750 * @param   cQueues     The default queue count (for old states).
    749751 */
    750 int vpciR3LoadExec(PCPDMDEVHLPR3 pHlp, PVPCISTATE pThis, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass, uint32_t cQueues)
     752int vpciR3LoadExec(PPDMDEVINS pDevIns, PCPDMDEVHLPR3 pHlp, PVPCISTATE pThis, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass, uint32_t cQueues)
    751753{
    752754    int rc;
     
    790792    }
    791793
    792     vpciR3DumpState(pThis, "vpciLoadExec");
     794    vpciR3DumpState(pDevIns, pThis, "vpciLoadExec");
    793795
    794796    return VINF_SUCCESS;
  • trunk/src/VBox/Devices/VirtIO/Virtio.h

    r90447 r91944  
    283283void  vpciR3SetWriteLed(PVPCISTATE pThis, bool fOn);
    284284void  vpciR3SetReadLed(PVPCISTATE pThis, bool fOn);
    285 int   vpciR3SaveExec(PCPDMDEVHLPR3 pHlp, PVPCISTATE pThis, PSSMHANDLE pSSM);
    286 int   vpciR3LoadExec(PCPDMDEVHLPR3 pHlp, PVPCISTATE pThis, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass, uint32_t cQueues);
     285int   vpciR3SaveExec(PPDMDEVINS pDevIns, PCPDMDEVHLPR3 pHlp, PVPCISTATE pThis, PSSMHANDLE pSSM);
     286int   vpciR3LoadExec(PPDMDEVINS pDevIns, PCPDMDEVHLPR3 pHlp, PVPCISTATE pThis, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass, uint32_t cQueues);
    287287void  vpciR3DumpStateWorker(PVPCISTATE pThis, PCDBGFINFOHLP pHlp);
    288288
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette