VirtualBox

Ignore:
Timestamp:
Feb 7, 2022 10:43:45 AM (3 years ago)
Author:
vboxsync
Message:

VMM/PGM,VMM/PDM,VGA: Consolidate the user parameters of the physical access handlers into a single uint64_t value that shouldn't be a pointer, at least not for ring-0 callbacks. Special hack for devices where it's translated from a ring-0 device instance index into a current context PPDMDEVINS (not really tested yet). bugref:10094

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/IOMR3Mmio.cpp

    r93554 r93635  
    399399                        ASMAtomicWriteU64(&pRegEntry->GCPhysMapping, GCPhys);
    400400                        rc = PGMR3PhysMMIORegister(pVM, GCPhys, cbRegion, pVM->iom.s.hNewMmioHandlerType,
    401                                                    (void *)(uintptr_t)hRegion, hRegion, hRegion, pRegEntry->pszDesc);
     401                                                   hRegion, pRegEntry->pszDesc);
    402402                        AssertRCReturnStmt(rc, ASMAtomicWriteU64(&pRegEntry->GCPhysMapping, NIL_RTGCPHYS); IOM_UNLOCK_EXCL(pVM), rc);
    403403
     
    418418                        ASMAtomicWriteU64(&pRegEntry->GCPhysMapping, GCPhys);
    419419                        rc = PGMR3PhysMMIORegister(pVM, GCPhys, cbRegion, pVM->iom.s.hNewMmioHandlerType,
    420                                                    (void *)(uintptr_t)hRegion, hRegion, hRegion, pRegEntry->pszDesc);
     420                                                   hRegion, pRegEntry->pszDesc);
    421421                        AssertRCReturnStmt(rc, ASMAtomicWriteU64(&pRegEntry->GCPhysMapping, NIL_RTGCPHYS); IOM_UNLOCK_EXCL(pVM), rc);
    422422
     
    444444            /* First entry in the lookup table: */
    445445            ASMAtomicWriteU64(&pRegEntry->GCPhysMapping, GCPhys);
    446             rc = PGMR3PhysMMIORegister(pVM, GCPhys, cbRegion, pVM->iom.s.hNewMmioHandlerType,
    447                                        (void *)(uintptr_t)hRegion, hRegion, hRegion, pRegEntry->pszDesc);
     446            rc = PGMR3PhysMMIORegister(pVM, GCPhys, cbRegion, pVM->iom.s.hNewMmioHandlerType, hRegion, pRegEntry->pszDesc);
    448447            AssertRCReturnStmt(rc, ASMAtomicWriteU64(&pRegEntry->GCPhysMapping, NIL_RTGCPHYS); IOM_UNLOCK_EXCL(pVM), rc);
    449448
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