VirtualBox

Changeset 61771 in vbox


Ignore:
Timestamp:
Jun 20, 2016 4:13:26 PM (9 years ago)
Author:
vboxsync
Message:

VMM/GIM: Cleanup, unused functions and caps.

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

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

    r61632 r61771  
    429429 * @thread  EMT.
    430430 */
    431 VMMR3_INT_DECL(int) GIMR3DebugRead(PVM pVM, void *pvRead, size_t *pcbRead, PFNGIMDEBUGBUFREADCOMPLETED pfnReadComplete)
     431VMMR3_INT_DECL(int) gimR3DebugRead(PVM pVM, void *pvRead, size_t *pcbRead, PFNGIMDEBUGBUFREADCOMPLETED pfnReadComplete)
    432432{
    433433    PGIMDEBUG pDbg = pVM->gim.s.pDbgR3;
     
    466466 * @thread  EMT.
    467467 */
    468 VMMR3_INT_DECL(int) GIMR3DebugWrite(PVM pVM, void *pvWrite, size_t *pcbWrite)
     468VMMR3_INT_DECL(int) gimR3DebugWrite(PVM pVM, void *pvWrite, size_t *pcbWrite)
    469469{
    470470    PGIMDEBUG pDbg = pVM->gim.s.pDbgR3;
     
    521521
    522522/**
     523 * @callback_method_impl{FNPGMPHYSHANDLER,
     524 *      Write access handler for mapped MMIO2 pages.  Currently ignores writes.}
     525 *
     526 * @todo In the future we might want to let the GIM provider decide what the
     527 *       handler should do (like throwing \#GP faults).
     528 */
     529static DECLCALLBACK(VBOXSTRICTRC) gimR3Mmio2WriteHandler(PVM pVM, PVMCPU pVCpu, RTGCPHYS GCPhys, void *pvPhys, void *pvBuf,
     530                                                         size_t cbBuf, PGMACCESSTYPE enmAccessType, PGMACCESSORIGIN enmOrigin,
     531                                                         void *pvUser)
     532{
     533    /*
     534     * Ignore writes to the mapped MMIO2 page.
     535     */
     536    Assert(enmAccessType == PGMACCESSTYPE_WRITE);
     537    return VINF_SUCCESS;        /** @todo Hyper-V says we should \#GP(0) fault for writes to the Hypercall and TSC page. */
     538}
     539
     540
     541#if 0
     542/**
    523543 * Unmaps a registered MMIO2 region in the guest address space and removes any
    524544 * access handlers for it.
     
    528548 * @param   pRegion     Pointer to the GIM MMIO2 region.
    529549 */
    530 VMMR3_INT_DECL(int) GIMR3Mmio2Unmap(PVM pVM, PGIMMMIO2REGION pRegion)
     550VMMR3_INT_DECL(int) gimR3Mmio2Unmap(PVM pVM, PGIMMMIO2REGION pRegion)
    531551{
    532552    AssertPtr(pVM);
     
    548568    }
    549569    return VINF_SUCCESS;
    550 }
    551 
    552 
    553 /**
    554  * @callback_method_impl{FNPGMPHYSHANDLER,
    555  *      Write access handler for mapped MMIO2 pages.  Currently ignores writes.}
    556  *
    557  * @todo In the future we might want to let the GIM provider decide what the
    558  *       handler should do (like throwing \#GP faults).
    559  */
    560 static DECLCALLBACK(VBOXSTRICTRC)
    561 gimR3Mmio2WriteHandler(PVM pVM, PVMCPU pVCpu, RTGCPHYS GCPhys, void *pvPhys, void *pvBuf, size_t cbBuf,
    562                        PGMACCESSTYPE enmAccessType, PGMACCESSORIGIN enmOrigin, void *pvUser)
    563 {
    564     /*
    565      * Ignore writes to the mapped MMIO2 page.
    566      */
    567     Assert(enmAccessType == PGMACCESSTYPE_WRITE);
    568     return VINF_SUCCESS;        /** @todo Hyper-V says we should \#GP(0) fault for writes to the Hypercall and TSC page. */
    569570}
    570571
     
    644645}
    645646
    646 #if 0
     647
    647648/**
    648649 * Registers the physical handler for the registered and mapped MMIO2 region.
     
    652653 * @param   pRegion     Pointer to the GIM MMIO2 region.
    653654 */
    654 VMMR3_INT_DECL(int) GIMR3Mmio2HandlerPhysicalRegister(PVM pVM, PGIMMMIO2REGION pRegion)
     655VMMR3_INT_DECL(int) gimR3Mmio2HandlerPhysicalRegister(PVM pVM, PGIMMMIO2REGION pRegion)
    655656{
    656657    AssertPtr(pRegion);
     
    675676 * @param   pRegion     Pointer to the GIM MMIO2 region.
    676677 */
    677 VMMR3_INT_DECL(int) GIMR3Mmio2HandlerPhysicalDeregister(PVM pVM, PGIMMMIO2REGION pRegion)
     678VMMR3_INT_DECL(int) gimR3Mmio2HandlerPhysicalDeregister(PVM pVM, PGIMMMIO2REGION pRegion)
    678679{
    679680    return PGMHandlerPhysicalDeregister(pVM, pRegion->GCPhysPage);
  • trunk/src/VBox/VMM/VMMR3/GIMHv.cpp

    r61632 r61771  
    530530        PGIMMMIO2REGION pRegion = &pHv->aMmio2Regions[i];
    531531#if 0
    532         GIMR3Mmio2Unmap(pVM, pRegion);
     532        gimR3Mmio2Unmap(pVM, pRegion);
    533533#else
    534534        pRegion->fMapped    = false;
     
    910910     *               rewrite guest memory directly. */
    911911#if 0
    912     rc = GIMR3Mmio2Map(pVM, pRegion, GCPhysTscPage);
     912    rc = gimR3Mmio2Map(pVM, pRegion, GCPhysTscPage);
    913913    if (RT_SUCCESS(rc))
    914914    {
     
    942942    }
    943943    else
    944         LogRelFunc(("GIMR3Mmio2Map failed. rc=%Rrc\n", rc));
     944        LogRelFunc(("gimR3Mmio2Map failed. rc=%Rrc\n", rc));
    945945    return VERR_GIM_OPERATION_FAILED;
    946946#else
     
    997997    {
    998998#if 0
    999         GIMR3Mmio2Unmap(pVM, pRegion);
     999        gimR3Mmio2Unmap(pVM, pRegion);
    10001000        Assert(!pRegion->fMapped);
    10011001#else
     
    10231023    {
    10241024#if 0
    1025         GIMR3Mmio2Unmap(pVM, pRegion);
     1025        gimR3Mmio2Unmap(pVM, pRegion);
    10261026        Assert(!pRegion->fMapped);
    10271027#else
     
    10721072     *               rewrite guest memory directly. */
    10731073#if 0
    1074     int rc = GIMR3Mmio2Map(pVM, pRegion, GCPhysHypercallPage);
     1074    int rc = gimR3Mmio2Map(pVM, pRegion, GCPhysHypercallPage);
    10751075    if (RT_SUCCESS(rc))
    10761076    {
     
    11041104        }
    11051105
    1106         GIMR3Mmio2Unmap(pVM, pRegion);
    1107     }
    1108 
    1109     LogRel(("GIM: HyperV: GIMR3Mmio2Map failed. rc=%Rrc\n", rc));
     1106        gimR3Mmio2Unmap(pVM, pRegion);
     1107    }
     1108
     1109    LogRel(("GIM: HyperV: gimR3Mmio2Map failed. rc=%Rrc\n", rc));
    11101110    return rc;
    11111111#else
     
    12561256         */
    12571257        size_t cbReallyRead = cbRead;
    1258         rc = GIMR3DebugRead(pVM, pvBuf, &cbReallyRead, gimR3HvDebugBufReadCompleted);
     1258        rc = gimR3DebugRead(pVM, pvBuf, &cbReallyRead, gimR3HvDebugBufReadCompleted);
    12591259        *pcbRead = (uint32_t)cbReallyRead;
    12601260    }
     
    12711271            {
    12721272                size_t cbReallyRead = cbRead;
    1273                 rc = GIMR3DebugRead(pVM, pvBuf, &cbReallyRead, gimR3HvDebugBufReadCompleted);
     1273                rc = gimR3DebugRead(pVM, pvBuf, &cbReallyRead, gimR3HvDebugBufReadCompleted);
    12741274                if (   RT_SUCCESS(rc)
    12751275                    && cbReallyRead > 0)
     
    16341634        AssertCompile(sizeof(size_t) >= sizeof(uint32_t));
    16351635        size_t cbWriteBuf = cbWrite;
    1636         int rc = GIMR3DebugWrite(pVM, pbData, &cbWriteBuf);
     1636        int rc = gimR3DebugWrite(pVM, pbData, &cbWriteBuf);
    16371637        if (   RT_SUCCESS(rc)
    16381638            && cbWriteBuf == cbWrite)
  • trunk/src/VBox/VMM/include/GIMInternal.h

    r60307 r61771  
    102102
    103103#ifdef IN_RING3
    104 VMMR3_INT_DECL(int)           GIMR3Mmio2Unmap(PVM pVM, PGIMMMIO2REGION pRegion);
    105 VMMR3_INT_DECL(int)           GIMR3Mmio2Map(PVM pVM, PGIMMMIO2REGION pRegion, RTGCPHYS GCPhysRegion);
    106 VMMR3_INT_DECL(int)           GIMR3Mmio2HandlerPhysicalRegister(PVM pVM, PGIMMMIO2REGION pRegion);
    107 VMMR3_INT_DECL(int)           GIMR3Mmio2HandlerPhysicalDeregister(PVM pVM, PGIMMMIO2REGION pRegion);
     104#if 0
     105VMMR3_INT_DECL(int)           gimR3Mmio2Unmap(PVM pVM, PGIMMMIO2REGION pRegion);
     106VMMR3_INT_DECL(int)           gimR3Mmio2Map(PVM pVM, PGIMMMIO2REGION pRegion, RTGCPHYS GCPhysRegion);
     107VMMR3_INT_DECL(int)           gimR3Mmio2HandlerPhysicalRegister(PVM pVM, PGIMMMIO2REGION pRegion);
     108VMMR3_INT_DECL(int)           gimR3Mmio2HandlerPhysicalDeregister(PVM pVM, PGIMMMIO2REGION pRegion);
     109#endif
    108110
    109 VMMR3_INT_DECL(int)           GIMR3DebugRead(PVM pVM, void *pvRead, size_t *pcbRead, PFNGIMDEBUGBUFREADCOMPLETED pfnReadComplete);
    110 VMMR3_INT_DECL(int)           GIMR3DebugWrite(PVM pVM, void *pvWrite, size_t *pcbWrite);
     111VMMR3_INT_DECL(int)           gimR3DebugRead(PVM pVM, void *pvRead, size_t *pcbRead, PFNGIMDEBUGBUFREADCOMPLETED pfnReadComplete);
     112VMMR3_INT_DECL(int)           gimR3DebugWrite(PVM pVM, void *pvWrite, size_t *pcbWrite);
    111113#endif /* IN_RING3 */
    112114
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