VirtualBox

Changeset 89949 in vbox for trunk


Ignore:
Timestamp:
Jun 29, 2021 12:18:45 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145407
Message:

VMM/PDMDriver: Add PDMDRVHLPR3::pfnQueryGenericUserObject/PDMDevHlpQueryGenericUserObject mapping to VMM2USERMETHODS::pfnQueryGenericObject, bugref:10053

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmdrv.h

    r88775 r89949  
    13351335    DECLR3CALLBACKMEMBER(int, pfnSTAMDeregisterByPrefix,(PPDMDRVINS pDrvIns, const char *pszPrefix));
    13361336
     1337    /**
     1338     * Queries a generic object from the VMM user.
     1339     *
     1340     * @returns Pointer to the object if found, NULL if not.
     1341     * @param   pDrvIns     The driver instance.
     1342     * @param   pUuid       The UUID of what's being queried.  The UUIDs and
     1343     *                      the usage conventions are defined by the user.
     1344     */
     1345    DECLR3CALLBACKMEMBER(void *, pfnQueryGenericUserObject,(PPDMDRVINS pDrvIns, PCRTUUID pUuid));
     1346
    13371347    DECLR3CALLBACKMEMBER(void, pfnReserved2,(PPDMDRVINS pDrvIns));
    13381348    DECLR3CALLBACKMEMBER(void, pfnReserved3,(PPDMDRVINS pDrvIns));
     
    13421352    DECLR3CALLBACKMEMBER(void, pfnReserved7,(PPDMDRVINS pDrvIns));
    13431353    DECLR3CALLBACKMEMBER(void, pfnReserved8,(PPDMDRVINS pDrvIns));
    1344     DECLR3CALLBACKMEMBER(void, pfnReserved9,(PPDMDRVINS pDrvIns));
    13451354    /** @}  */
    13461355
     
    18641873}
    18651874
     1875/**
     1876 * @copydoc PDMDRVHLPR3::pfnQueryGenericUserObject
     1877 */
     1878DECLINLINE(void *) PDMDrvHlpQueryGenericUserObject(PPDMDRVINS pDrvIns, PCRTUUID pUuid)
     1879{
     1880    return pDrvIns->pHlpR3->pfnQueryGenericUserObject(pDrvIns, pUuid);
     1881}
     1882
    18661883
    18671884/** Pointer to callbacks provided to the VBoxDriverRegister() call. */
  • trunk/src/VBox/VMM/VMMR3/PDMDriver.cpp

    r88811 r89949  
    18761876
    18771877
     1878/** @interface_method_impl{PDMDRVHLPR3,pfnQueryGenericUserObject} */
     1879static DECLCALLBACK(void *) pdmR3DrvHlp_QueryGenericUserObject(PPDMDRVINS pDrvIns, PCRTUUID pUuid)
     1880{
     1881    PDMDRV_ASSERT_DRVINS(pDrvIns);
     1882    LogFlow(("pdmR3DrvHlp_QueryGenericUserObject: caller='%s'/%d: pUuid=%p:%RTuuid\n",
     1883             pDrvIns->pReg->szName, pDrvIns->iInstance, pUuid, pUuid));
     1884
     1885    void *pvRet;
     1886    PUVM  pUVM = pDrvIns->Internal.s.pVMR3->pUVM;
     1887    if (pUVM->pVmm2UserMethods->pfnQueryGenericObject)
     1888        pvRet = pUVM->pVmm2UserMethods->pfnQueryGenericObject(pUVM->pVmm2UserMethods, pUVM, pUuid);
     1889    else
     1890        pvRet = NULL;
     1891
     1892    LogRel(("pdmR3DrvHlp_QueryGenericUserObject: caller='%s'/%d: returns %#p for %RTuuid\n",
     1893            pDrvIns->pReg->szName, pDrvIns->iInstance, pvRet, pUuid));
     1894    return pvRet;
     1895}
     1896
     1897
    18781898/**
    18791899 * The driver helper structure.
     
    19271947    pdmR3DrvHlp_TimerSetMillies,
    19281948    pdmR3DrvHlp_STAMDeregisterByPrefix,
    1929     NULL,
     1949    pdmR3DrvHlp_QueryGenericUserObject,
    19301950    NULL,
    19311951    NULL,
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