VirtualBox

Changeset 81433 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Oct 21, 2019 8:21:43 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
134151
Message:

IOM: Replaced IOMMMIOPhysHandler with the new version. bugref:9218

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp

    r81383 r81433  
    698698
    699699/**
    700  * Physical access handler for MMIO ranges.
    701  *
    702  * @returns VBox status code (appropriate for GC return).
    703  * @param   pVM         The cross context VM structure.
    704  * @param   pVCpu       The cross context virtual CPU structure of the calling EMT.
    705  * @param   uErrorCode  CPU Error code.
    706  * @param   pCtxCore    Trap register frame.
    707  * @param   GCPhysFault The GC physical address.
    708  */
    709 VMMDECL(VBOXSTRICTRC) IOMMMIOPhysHandler(PVMCC pVM, PVMCPUCC pVCpu, RTGCUINT uErrorCode, PCPUMCTXCORE pCtxCore, RTGCPHYS GCPhysFault)
    710 {
    711     /*
    712      * We don't have a range here, so look it up before calling the common function.
    713      */
    714     int rc2 = IOM_LOCK_SHARED(pVM); NOREF(rc2);
    715 #ifndef IN_RING3
    716     if (rc2 == VERR_SEM_BUSY)
    717         return VINF_IOM_R3_MMIO_READ_WRITE;
    718 #endif
    719     PIOMMMIORANGE pRange = iomMmioGetRange(pVM, pVCpu, GCPhysFault);
    720     if (RT_UNLIKELY(!pRange))
    721     {
    722         IOM_UNLOCK_SHARED(pVM);
    723         return VERR_IOM_MMIO_RANGE_NOT_FOUND;
    724     }
    725     iomMmioRetainRange(pRange);
    726     IOM_UNLOCK_SHARED(pVM);
    727 
    728     VBOXSTRICTRC rcStrict = iomMmioCommonPfHandlerOld(pVM, pVCpu, (uint32_t)uErrorCode, pCtxCore, GCPhysFault, pRange);
    729 
    730     iomMmioReleaseRange(pVM, pRange);
    731     return VBOXSTRICTRC_VAL(rcStrict);
    732 }
    733 
    734 
    735 /**
    736700 * @callback_method_impl{FNPGMPHYSHANDLER, MMIO page accesses}
    737701 *
  • trunk/src/VBox/VMM/VMMAll/IOMAllMmioNew.cpp

    r81383 r81433  
    742742 * @param   GCPhysFault The GC physical address.
    743743 */
    744 VMM_INT_DECL(VBOXSTRICTRC) IOMMmioPhysHandlerNew(PVMCC pVM, PVMCPUCC pVCpu, uint32_t uErrorCode, RTGCPHYS GCPhysFault)
     744VMM_INT_DECL(VBOXSTRICTRC) IOMR0MmioPhysHandler(PVMCC pVM, PVMCPUCC pVCpu, uint32_t uErrorCode, RTGCPHYS GCPhysFault)
    745745{
    746746    STAM_COUNTER_INC(&pVM->iom.s.StatMmioPhysHandlerNew);
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r81278 r81433  
    1548615486                 VMX_EXIT_QUAL_APIC_ACCESS_OFFSET(pVmxTransient->uExitQual)));
    1548715487
    15488             PVMCC      pVM  = pVCpu->CTX_SUFF(pVM);
    15489             PCPUMCTX pCtx = &pVCpu->cpum.GstCtx;
    15490             rcStrict = IOMMMIOPhysHandler(pVM, pVCpu,
    15491                                           uAccessType == VMX_APIC_ACCESS_TYPE_LINEAR_READ ? 0 : X86_TRAP_PF_RW,
    15492                                           CPUMCTX2CORE(pCtx), GCPhys);
     15488            rcStrict = IOMR0MmioPhysHandler(pVCpu->CTX_SUFF(pVM), pVCpu,
     15489                                            uAccessType == VMX_APIC_ACCESS_TYPE_LINEAR_READ ? 0 : X86_TRAP_PF_RW, GCPhys);
    1549315490            Log4Func(("IOMMMIOPhysHandler returned %Rrc\n", VBOXSTRICTRC_VAL(rcStrict)));
    1549415491            if (   rcStrict == VINF_SUCCESS
  • trunk/src/VBox/VMM/VMMR3/IOM.cpp

    r81375 r81433  
    221221    STAM_REG(pVM, &pVM->iom.s.StatMmioHandlerNewR3,   STAMTYPE_COUNTER, "/IOM/MmioHandlerNewR3",                    STAMUNIT_OCCURENCES,     "Number of calls to iomMmioHandlerNew from ring-3.");
    222222    STAM_REG(pVM, &pVM->iom.s.StatMmioHandlerNewR0,   STAMTYPE_COUNTER, "/IOM/MmioHandlerNewR0",                    STAMUNIT_OCCURENCES,     "Number of calls to iomMmioHandlerNew from ring-0.");
    223     STAM_REG(pVM, &pVM->iom.s.StatMmioPfHandlerNew,   STAMTYPE_COUNTER, "/IOM/MmioPfHandlerNew",                    STAMUNIT_OCCURENCES,     "Number of calls to iomMmioPfHandlerNew from ring-3.");
    224     STAM_REG(pVM, &pVM->iom.s.StatMmioPhysHandlerNew, STAMTYPE_COUNTER, "/IOM/MmioPhysHandlerNew",                  STAMUNIT_OCCURENCES,     "Number of calls to iomMmioPhysHandler from ring-3.");
     223    STAM_REG(pVM, &pVM->iom.s.StatMmioPfHandlerNew,   STAMTYPE_COUNTER, "/IOM/MmioPfHandlerNew",                    STAMUNIT_OCCURENCES,     "Number of calls to iomMmioPfHandlerNew.");
     224    STAM_REG(pVM, &pVM->iom.s.StatMmioPhysHandlerNew, STAMTYPE_COUNTER, "/IOM/MmioPhysHandlerNew",                  STAMUNIT_OCCURENCES,     "Number of calls to IOMR0MmioPhysHandler.");
    225225
    226226    /* Redundant, but just in case we change something in the future */
     
    19131913        Log5(("IOM: Dispatching pending MMIO write: %RGp LB %#x\n",
    19141914              pVCpu->iom.s.PendingMmioWrite.GCPhys, pVCpu->iom.s.PendingMmioWrite.cbValue));
    1915         /** @todo Try optimize this some day?  Currently easier and correcter to
     1915        /** @todo Try optimize this some day?  Currently easier and more correct to
    19161916         *        involve PGM here since we never know if the MMIO area is still mapped
    19171917         *        to the same location as when we wrote to it in RC/R0 context. */
Note: See TracChangeset for help on using the changeset viewer.

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