VirtualBox

Changeset 91980 in vbox


Ignore:
Timestamp:
Oct 21, 2021 6:12:53 PM (3 years ago)
Author:
vboxsync
Message:

VMM,GIMDev: Missing PDMDevHlpGIMGetMmio2Regions for ring-0 variant, bugref:10074

Location:
trunk
Files:
3 edited

Legend:

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

    r91973 r91980  
    59485948    DECLR0CALLBACKMEMBER(int, pfnMmioResetRegion, (PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion));
    59495949
     5950    /**
     5951     * Returns the array of MMIO2 regions that are expected to be registered and
     5952     * later mapped into the guest-physical address space for the GIM provider
     5953     * configured for the VM.
     5954     *
     5955     * @returns Pointer to an array of GIM MMIO2 regions, may return NULL.
     5956     * @param   pDevIns         Pointer to the GIM device instance.
     5957     * @param   pcRegions       Where to store the number of items in the array.
     5958     *
     5959     * @remarks The caller does not own and therefore must -NOT- try to free the
     5960     *          returned pointer.
     5961     */
     5962    DECLR0CALLBACKMEMBER(PGIMMMIO2REGION, pfnGIMGetMmio2Regions,(PPDMDEVINS pDevIns, uint32_t *pcRegions));
     5963
    59505964    /** Space reserved for future members.
    59515965     * @{ */
     
    59715985
    59725986/** Current PDMDEVHLP version number. */
    5973 #define PDM_DEVHLPR0_VERSION                    PDM_VERSION_MAKE(0xffe5, 24, 0)
     5987#define PDM_DEVHLPR0_VERSION                    PDM_VERSION_MAKE(0xffe5, 25, 0)
    59745988
    59755989
     
    94459459    return pDevIns->pHlpR3->pfnGIMGetDebugSetup(pDevIns, pDbgSetup);
    94469460}
     9461#endif
    94479462
    94489463/**
     
    94519466DECLINLINE(PGIMMMIO2REGION) PDMDevHlpGIMGetMmio2Regions(PPDMDEVINS pDevIns, uint32_t *pcRegions)
    94529467{
    9453     return pDevIns->pHlpR3->pfnGIMGetMmio2Regions(pDevIns, pcRegions);
    9454 }
    9455 
     9468    return pDevIns->CTX_SUFF(pHlp)->pfnGIMGetMmio2Regions(pDevIns, pcRegions);
     9469}
     9470
     9471#ifdef IN_RING3
    94569472/** Wrapper around SSMR3GetU32 for simplifying getting enum values saved as uint32_t. */
    94579473# define PDMDEVHLP_SSM_GET_ENUM32_RET(a_pHlp, a_pSSM, a_enmDst, a_EnumType) \
  • trunk/src/VBox/Devices/GIMDev/GIMDev.cpp

    r91968 r91980  
    389389     */
    390390/** @todo r=bird: consider ditching this as GIM doesn't actually make use of it */
    391     PVMCC           pVM       = PDMDevHlpGetVM(pDevIns);
    392391    uint32_t        cRegions  = 0;
    393     PGIMMMIO2REGION paRegions = GIMGetMmio2Regions(pVM, &cRegions);
     392    PGIMMMIO2REGION paRegions = PDMDevHlpGIMGetMmio2Regions(pDevIns, &cRegions);
    394393    if (   cRegions
    395394        && paRegions)
  • trunk/src/VBox/VMM/VMMR0/PDMR0DevHlp.cpp

    r91930 r91980  
    13621362         pDevIns->pReg->szName, pDevIns->iInstance, rc));
    13631363    return rc;
     1364}
     1365
     1366
     1367/** @interface_method_impl{PDMDEVHLPR0,pfnGIMGetMmio2Regions} */
     1368static DECLCALLBACK(PGIMMMIO2REGION) pdmR0DevHlp_GIMGetMmio2Regions(PPDMDEVINS pDevIns, uint32_t *pcRegions)
     1369{
     1370    PDMDEV_ASSERT_DEVINS(pDevIns);
     1371
     1372    LogFlow(("pdmR0DevHlp_GIMGetMmio2Regions: caller='%s'/%d: pcRegions=%p\n",
     1373             pDevIns->pReg->szName, pDevIns->iInstance, pcRegions));
     1374
     1375    PGIMMMIO2REGION pRegion = GIMGetMmio2Regions(pDevIns->Internal.s.pGVM, pcRegions);
     1376
     1377    LogFlow(("pdmR0DevHlp_GIMGetMmio2Regions: caller='%s'/%d: returns %p\n", pDevIns->pReg->szName, pDevIns->iInstance, pRegion));
     1378    return pRegion;
    13641379}
    13651380
     
    14601475    pdmR0DevHlp_MmioMapMmio2Page,
    14611476    pdmR0DevHlp_MmioResetRegion,
     1477    pdmR0DevHlp_GIMGetMmio2Regions,
    14621478    NULL /*pfnReserved1*/,
    14631479    NULL /*pfnReserved2*/,
     
    15701586    pdmR0DevHlp_MmioMapMmio2Page,
    15711587    pdmR0DevHlp_MmioResetRegion,
     1588    pdmR0DevHlp_GIMGetMmio2Regions,
    15721589    NULL /*pfnReserved1*/,
    15731590    NULL /*pfnReserved2*/,
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