Changeset 81433 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Oct 21, 2019 8:21:43 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 134151
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
r81383 r81433 698 698 699 699 /** 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_RING3716 if (rc2 == VERR_SEM_BUSY)717 return VINF_IOM_R3_MMIO_READ_WRITE;718 #endif719 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 /**736 700 * @callback_method_impl{FNPGMPHYSHANDLER, MMIO page accesses} 737 701 * -
trunk/src/VBox/VMM/VMMAll/IOMAllMmioNew.cpp
r81383 r81433 742 742 * @param GCPhysFault The GC physical address. 743 743 */ 744 VMM_INT_DECL(VBOXSTRICTRC) IOM MmioPhysHandlerNew(PVMCC pVM, PVMCPUCC pVCpu, uint32_t uErrorCode, RTGCPHYS GCPhysFault)744 VMM_INT_DECL(VBOXSTRICTRC) IOMR0MmioPhysHandler(PVMCC pVM, PVMCPUCC pVCpu, uint32_t uErrorCode, RTGCPHYS GCPhysFault) 745 745 { 746 746 STAM_COUNTER_INC(&pVM->iom.s.StatMmioPhysHandlerNew); -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r81278 r81433 15486 15486 VMX_EXIT_QUAL_APIC_ACCESS_OFFSET(pVmxTransient->uExitQual))); 15487 15487 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); 15493 15490 Log4Func(("IOMMMIOPhysHandler returned %Rrc\n", VBOXSTRICTRC_VAL(rcStrict))); 15494 15491 if ( rcStrict == VINF_SUCCESS -
trunk/src/VBox/VMM/VMMR3/IOM.cpp
r81375 r81433 221 221 STAM_REG(pVM, &pVM->iom.s.StatMmioHandlerNewR3, STAMTYPE_COUNTER, "/IOM/MmioHandlerNewR3", STAMUNIT_OCCURENCES, "Number of calls to iomMmioHandlerNew from ring-3."); 222 222 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."); 225 225 226 226 /* Redundant, but just in case we change something in the future */ … … 1913 1913 Log5(("IOM: Dispatching pending MMIO write: %RGp LB %#x\n", 1914 1914 pVCpu->iom.s.PendingMmioWrite.GCPhys, pVCpu->iom.s.PendingMmioWrite.cbValue)); 1915 /** @todo Try optimize this some day? Currently easier and correcterto1915 /** @todo Try optimize this some day? Currently easier and more correct to 1916 1916 * involve PGM here since we never know if the MMIO area is still mapped 1917 1917 * to the same location as when we wrote to it in RC/R0 context. */
Note:
See TracChangeset
for help on using the changeset viewer.