VirtualBox

Changeset 31136 in vbox


Ignore:
Timestamp:
Jul 27, 2010 12:06:18 PM (14 years ago)
Author:
vboxsync
Message:

PGM: cache the last physical handler lookup result in each ring.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGM.cpp

    r31124 r31136  
    16961696    PGM_REG_COUNTER(&pStats->StatRZPhysHandlerReset,            "/PGM/RZ/PhysHandlerReset",           "The number of times PGMHandlerPhysicalReset is called.");
    16971697    PGM_REG_COUNTER(&pStats->StatR3PhysHandlerReset,            "/PGM/R3/PhysHandlerReset",           "The number of times PGMHandlerPhysicalReset is called.");
     1698    PGM_REG_COUNTER(&pStats->StatRZPhysHandlerLookupHits,       "/PGM/RZ/PhysHandlerLookupHits",      "The number of cache hits when looking up physical handlers.");
     1699    PGM_REG_COUNTER(&pStats->StatR3PhysHandlerLookupHits,       "/PGM/R3/PhysHandlerLookupHits",      "The number of cache hits when looking up physical handlers.");
     1700    PGM_REG_COUNTER(&pStats->StatRZPhysHandlerLookupMisses,     "/PGM/RZ/PhysHandlerLookupMisses",    "The number of cache misses when looking up physical handlers.");
     1701    PGM_REG_COUNTER(&pStats->StatR3PhysHandlerLookupMisses,     "/PGM/R3/PhysHandlerLookupMisses",    "The number of cache misses when looking up physical handlers.");
    16981702    PGM_REG_PROFILE(&pStats->StatRZVirtHandlerSearchByPhys,     "/PGM/RZ/VirtHandlerSearchByPhys",    "Profiling of pgmHandlerVirtualFindByPhysAddr.");
    16991703    PGM_REG_PROFILE(&pStats->StatR3VirtHandlerSearchByPhys,     "/PGM/R3/VirtHandlerSearchByPhys",    "Profiling of pgmHandlerVirtualFindByPhysAddr.");
     
    20292033    AssertRelease(pMapping);
    20302034    const uintptr_t off = pVM->pgm.s.pbDynPageMapBaseGC - pMapping->GCPtr;
    2031     const unsigned iPT = off >> X86_PD_SHIFT;
     2035    const unsigned iPT =  off >> X86_PD_SHIFT;
    20322036    const unsigned iPG = (off >> X86_PT_SHIFT) & X86_PT_MASK;
    20332037    pVM->pgm.s.paDynPageMap32BitPTEsGC = pMapping->aPTs[iPT].pPTRC      + iPG * sizeof(pMapping->aPTs[0].pPTR3->a[0]);
     
    22192223     */
    22202224    RTAvlroGCPhysDoWithAll(&pVM->pgm.s.pTreesR3->PhysHandlers,     true, pgmR3RelocatePhysHandler,      &offDelta);
     2225    pVM->pgm.s.pLastPhysHandlerRC = NIL_RTRCPTR;
    22212226    RTAvlroGCPtrDoWithAll(&pVM->pgm.s.pTreesR3->VirtHandlers,      true, pgmR3RelocateVirtHandler,      &offDelta);
    22222227    RTAvlroGCPtrDoWithAll(&pVM->pgm.s.pTreesR3->HyperVirtHandlers, true, pgmR3RelocateHyperVirtHandler, &offDelta);
     
    45874592     */
    45884593    int cErrors = 0;
    4589     const static PGMCHECKINTARGS s_LeftToRight = { true, NULL, NULL, NULL, pVM };
     4594    const static PGMCHECKINTARGS s_LeftToRight = {  true, NULL, NULL, NULL, pVM };
    45904595    const static PGMCHECKINTARGS s_RightToLeft = { false, NULL, NULL, NULL, pVM };
    45914596    PGMCHECKINTARGS Args = s_LeftToRight;
  • trunk/src/VBox/VMM/PGMInline.h

    r31126 r31136  
    11861186
    11871187#endif /* !IN_RC */
     1188
     1189
     1190/**
     1191 * Cached physical handler lookup.
     1192 *
     1193 * @returns Physical handler covering @a GCPhys.
     1194 * @param   pVM                 The VM handle.
     1195 * @param   GCPhys              The lookup address.
     1196 */
     1197DECLINLINE(PPGMPHYSHANDLER) pgmHandlerPhysicalLookup(PVM pVM, RTGCPHYS GCPhys)
     1198{
     1199    PPGMPHYSHANDLER pHandler = pVM->pgm.s.CTX_SUFF(pLastPhysHandler);
     1200    if (   pHandler
     1201        && GCPhys >= pHandler->Core.Key
     1202        && GCPhys < pHandler->Core.KeyLast)
     1203    {
     1204        STAM_COUNTER_INC(&pVM->pgm.s.CTX_SUFF(pStats)->CTX_MID_Z(Stat,PhysHandlerLookupHits));
     1205        return pHandler;
     1206    }
     1207
     1208    STAM_COUNTER_INC(&pVM->pgm.s.CTX_SUFF(pStats)->CTX_MID_Z(Stat,PhysHandlerLookupMisses));
     1209    pHandler = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
     1210    if (pHandler)
     1211        pVM->pgm.s.CTX_SUFF(pLastPhysHandler) = pHandler;
     1212    return pHandler;
     1213}
     1214
    11881215
    11891216/**
  • trunk/src/VBox/VMM/PGMInternal.h

    r31123 r31136  
    26212621    STAMPROFILE StatR3ResolveConflict;              /**< R3: pgmR3SyncPTResolveConflict() profiling (includes the entire relocation). */
    26222622
     2623    /* R3+RZ */
    26232624    STAMCOUNTER StatRZChunkR3MapTlbHits;            /**< RC/R0: Ring-3/0 chunk mapper TLB hits. */
    26242625    STAMCOUNTER StatRZChunkR3MapTlbMisses;          /**< RC/R0: Ring-3/0 chunk mapper TLB misses. */
     
    26372638    STAMCOUNTER StatR3PhysHandlerReset;             /**< R3: The number of times PGMHandlerPhysicalReset is called. */
    26382639    STAMCOUNTER StatRZPhysHandlerReset;             /**< RC/R0: The number of times PGMHandlerPhysicalReset is called. */
     2640    STAMCOUNTER StatR3PhysHandlerLookupHits;        /**< R3: Number of cache hits when looking up physical handlers. */
     2641    STAMCOUNTER StatR3PhysHandlerLookupMisses;      /**< R3: Number of cache misses when looking up physical handlers. */
     2642    STAMCOUNTER StatRZPhysHandlerLookupHits;        /**< RC/R0: Number of cache hits when lookup up physical handlers. */
     2643    STAMCOUNTER StatRZPhysHandlerLookupMisses;      /**< RC/R0: Number of cache misses when looking up physical handlers */
    26392644    STAMPROFILE StatRZVirtHandlerSearchByPhys;      /**< RC/R0: Profiling of pgmHandlerVirtualFindByPhysAddr. */
    26402645    STAMPROFILE StatR3VirtHandlerSearchByPhys;      /**< R3: Profiling of pgmHandlerVirtualFindByPhysAddr. */
     
    27162721{
    27172722    /** Offset to the VM structure. */
    2718     RTINT                           offVM;
     2723    int32_t                         offVM;
    27192724    /** Offset of the PGMCPU structure relative to VMCPU. */
    2720     RTINT                           offVCpuPGM;
     2725    int32_t                         offVCpuPGM;
    27212726
    27222727    /** @cfgm{RamPreAlloc, boolean, false}
     
    27402745    /** The host paging mode. (This is what SUPLib reports.) */
    27412746    SUPPAGINGMODE                   enmHostMode;
    2742 
    2743     /** Pointer to the page table entries for the dynamic page mapping area - GCPtr. */
    2744     RCPTRTYPE(PX86PTE)              paDynPageMap32BitPTEsGC;
    2745     /** Pointer to the page table entries for the dynamic page mapping area - GCPtr. */
    2746     RCPTRTYPE(PX86PTEPAE)           paDynPageMapPaePTEsGC;
    2747 
    2748     /** 4 MB page mask; 32 or 36 bits depending on PSE-36 (identical for all VCPUs) */
    2749     RTGCPHYS                        GCPhys4MBPSEMask;
    2750     /** Mask containing the invalid bits of a guest physical address.
    2751      * @remarks this does not stop at bit 52.  */
    2752     RTGCPHYS                        GCPhysInvAddrMask;
    2753 
    2754     /** Pointer to the list of RAM ranges (Phys GC -> Phys HC conversion) - for R3.
    2755      * This is sorted by physical address and contains no overlapping ranges. */
    2756     R3PTRTYPE(PPGMRAMRANGE)         pRamRangesR3;
    2757     /** R0 pointer corresponding to PGM::pRamRangesR3. */
    2758     R0PTRTYPE(PPGMRAMRANGE)         pRamRangesR0;
    2759     /** RC pointer corresponding to PGM::pRamRangesR3. */
    2760     RCPTRTYPE(PPGMRAMRANGE)         pRamRangesRC;
    2761     /** Generation ID for the RAM ranges. This member is incremented everytime a RAM
    2762      * range is linked or unlinked. */
    2763     uint32_t volatile               idRamRangesGen;
    2764 
    2765     /** Pointer to the list of ROM ranges - for R3.
    2766      * This is sorted by physical address and contains no overlapping ranges. */
    2767     R3PTRTYPE(PPGMROMRANGE)         pRomRangesR3;
    2768     /** R0 pointer corresponding to PGM::pRomRangesR3. */
    2769     R0PTRTYPE(PPGMROMRANGE)         pRomRangesR0;
    2770     /** RC pointer corresponding to PGM::pRomRangesR3. */
    2771     RCPTRTYPE(PPGMROMRANGE)         pRomRangesRC;
    2772 #if HC_ARCH_BITS == 64
    2773     /** Alignment padding. */
    2774     RTRCPTR                         GCPtrPadding2;
    2775 #endif
    2776 
    2777     /** Pointer to the list of MMIO2 ranges - for R3.
    2778      * Registration order. */
    2779     R3PTRTYPE(PPGMMMIO2RANGE)       pMmio2RangesR3;
    2780 
    2781     /** PGM offset based trees - R3 Ptr. */
    2782     R3PTRTYPE(PPGMTREES)            pTreesR3;
    2783     /** PGM offset based trees - R0 Ptr. */
    2784     R0PTRTYPE(PPGMTREES)            pTreesR0;
    2785     /** PGM offset based trees - RC Ptr. */
    2786     RCPTRTYPE(PPGMTREES)            pTreesRC;
    2787 
    2788     /** Linked list of GC mappings - for RC.
    2789      * The list is sorted ascending on address.
    2790      */
    2791     RCPTRTYPE(PPGMMAPPING)          pMappingsRC;
    2792     /** Linked list of GC mappings - for HC.
    2793      * The list is sorted ascending on address.
    2794      */
    2795     R3PTRTYPE(PPGMMAPPING)          pMappingsR3;
    2796     /** Linked list of GC mappings - for R0.
    2797      * The list is sorted ascending on address.
    2798      */
    2799     R0PTRTYPE(PPGMMAPPING)          pMappingsR0;
    2800 
    2801     /** Pointer to the 5 page CR3 content mapping.
    2802      * The first page is always the CR3 (in some form) while the 4 other pages
    2803      * are used of the PDs in PAE mode. */
    2804     RTGCPTR                         GCPtrCR3Mapping;
    2805 #if HC_ARCH_BITS == 64 && GC_ARCH_BITS == 32
    2806     uint32_t                        u32Alignment1;
    2807 #endif
     2747    /** We're not in a state which permits writes to guest memory.
     2748     * (Only used in strict builds.) */
     2749    bool                            fNoMorePhysWrites;
     2750    /** Alignment padding that makes the next member start on a 8 byte boundrary. */
     2751    bool                            afAlignment1[3];
    28082752
    28092753    /** Indicates that PGMR3FinalizeMappings has been called and that further
     
    28212765     * This is valid if either fMappingsFixed or fMappingsFixedRestored is set. */
    28222766    uint32_t                        cbMappingFixed;
     2767    /** Generation ID for the RAM ranges. This member is incremented everytime
     2768     * a RAM range is linked or unlinked. */
     2769    uint32_t volatile               idRamRangesGen;
     2770
    28232771    /** Base address (GC) of fixed mapping.
    28242772     * This is valid if either fMappingsFixed or fMappingsFixedRestored is set. */
     
    28262774    /** The address of the previous RAM range mapping. */
    28272775    RTGCPTR                         GCPtrPrevRamRangeMapping;
     2776
     2777    /** 4 MB page mask; 32 or 36 bits depending on PSE-36 (identical for all VCPUs) */
     2778    RTGCPHYS                        GCPhys4MBPSEMask;
     2779    /** Mask containing the invalid bits of a guest physical address.
     2780     * @remarks this does not stop at bit 52.  */
     2781    RTGCPHYS                        GCPhysInvAddrMask;
     2782
     2783
     2784    /** Pointer to the list of RAM ranges (Phys GC -> Phys HC conversion) - for R3.
     2785     * This is sorted by physical address and contains no overlapping ranges. */
     2786    R3PTRTYPE(PPGMRAMRANGE)         pRamRangesR3;
     2787    /** PGM offset based trees - R3 Ptr. */
     2788    R3PTRTYPE(PPGMTREES)            pTreesR3;
     2789    /** Caching the last physical handler we looked up in R3. */
     2790    R3PTRTYPE(PPGMPHYSHANDLER)      pLastPhysHandlerR3;
     2791    /** Shadow Page Pool - R3 Ptr. */
     2792    R3PTRTYPE(PPGMPOOL)             pPoolR3;
     2793    /** Linked list of GC mappings - for HC.
     2794     * The list is sorted ascending on address. */
     2795    R3PTRTYPE(PPGMMAPPING)          pMappingsR3;
     2796    /** Pointer to the list of ROM ranges - for R3.
     2797     * This is sorted by physical address and contains no overlapping ranges. */
     2798    R3PTRTYPE(PPGMROMRANGE)         pRomRangesR3;
     2799    /** Pointer to the list of MMIO2 ranges - for R3.
     2800     * Registration order. */
     2801    R3PTRTYPE(PPGMMMIO2RANGE)       pMmio2RangesR3;
     2802    /** Pointer to SHW+GST mode data (function pointers).
     2803     * The index into this table is made up from */
     2804    R3PTRTYPE(PPGMMODEDATA)         paModeData;
     2805    /*RTR3PTR                         R3PtrAlignment0;*/
     2806
     2807
     2808    /** R0 pointer corresponding to PGM::pRamRangesR3. */
     2809    R0PTRTYPE(PPGMRAMRANGE)         pRamRangesR0;
     2810    /** PGM offset based trees - R0 Ptr. */
     2811    R0PTRTYPE(PPGMTREES)            pTreesR0;
     2812    /** Caching the last physical handler we looked up in R0. */
     2813    R0PTRTYPE(PPGMPHYSHANDLER)      pLastPhysHandlerR0;
     2814    /** Shadow Page Pool - R0 Ptr. */
     2815    R0PTRTYPE(PPGMPOOL)             pPoolR0;
     2816    /** Linked list of GC mappings - for R0.
     2817     * The list is sorted ascending on address. */
     2818    R0PTRTYPE(PPGMMAPPING)          pMappingsR0;
     2819    /** R0 pointer corresponding to PGM::pRomRangesR3. */
     2820    R0PTRTYPE(PPGMROMRANGE)         pRomRangesR0;
     2821    /*RTR0PTR                         R0PtrAlignment0;*/
     2822
     2823
     2824    /** RC pointer corresponding to PGM::pRamRangesR3. */
     2825    RCPTRTYPE(PPGMRAMRANGE)         pRamRangesRC;
     2826    /** PGM offset based trees - RC Ptr. */
     2827    RCPTRTYPE(PPGMTREES)            pTreesRC;
     2828    /** Caching the last physical handler we looked up in RC. */
     2829    RCPTRTYPE(PPGMPHYSHANDLER)      pLastPhysHandlerRC;
     2830    /** Shadow Page Pool - RC Ptr. */
     2831    RCPTRTYPE(PPGMPOOL)             pPoolRC;
     2832    /** Linked list of GC mappings - for RC.
     2833     * The list is sorted ascending on address. */
     2834    RCPTRTYPE(PPGMMAPPING)          pMappingsRC;
     2835    /** RC pointer corresponding to PGM::pRomRangesR3. */
     2836    RCPTRTYPE(PPGMROMRANGE)         pRomRangesRC;
     2837    /*RTRCPTR                         RCPtrAlignment0;*/
     2838    /** Pointer to the page table entries for the dynamic page mapping area - GCPtr. */
     2839    RCPTRTYPE(PX86PTE)              paDynPageMap32BitPTEsGC;
     2840    /** Pointer to the page table entries for the dynamic page mapping area - GCPtr. */
     2841    RCPTRTYPE(PX86PTEPAE)           paDynPageMapPaePTEsGC;
     2842
     2843
     2844    /** Pointer to the 5 page CR3 content mapping.
     2845     * The first page is always the CR3 (in some form) while the 4 other pages
     2846     * are used of the PDs in PAE mode. */
     2847    RTGCPTR                         GCPtrCR3Mapping;
    28282848
    28292849    /** @name Intermediate Context
     
    28772897     */
    28782898    PDMCRITSECT                     CritSect;
    2879 
    2880     /** Pointer to SHW+GST mode data (function pointers).
    2881      * The index into this table is made up from */
    2882     R3PTRTYPE(PPGMMODEDATA)         paModeData;
    2883 
    2884     /** Shadow Page Pool - R3 Ptr. */
    2885     R3PTRTYPE(PPGMPOOL)             pPoolR3;
    2886     /** Shadow Page Pool - R0 Ptr. */
    2887     R0PTRTYPE(PPGMPOOL)             pPoolR0;
    2888     /** Shadow Page Pool - RC Ptr. */
    2889     RCPTRTYPE(PPGMPOOL)             pPoolRC;
    2890 
    2891     /** We're not in a state which permits writes to guest memory.
    2892      * (Only used in strict builds.) */
    2893     bool                            fNoMorePhysWrites;
    2894     /** Alignment padding that makes the next member start on a 8 byte boundrary. */
    2895     bool                            afAlignment3[HC_ARCH_BITS == 32 ? 7: 3];
    28962899
    28972900    /**
     
    33503353    bool                            fGst32BitPageSizeExtension;
    33513354    /** Alignment padding. */
    3352     bool                            afAlignment4[3];
     3355    bool                            afAlignment2[3];
    33533356    /** @} */
    33543357
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r31123 r31136  
    162162        const RTGCPHYS  GCPhysFault = (RTGCPHYS)pvFault;
    163163# endif
    164         PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhysFault);
     164        PPGMPHYSHANDLER pCur = pgmHandlerPhysicalLookup(pVM, GCPhysFault);
    165165        if (pCur)
    166166        {
     
    212212                STAM_PROFILE_START(&pCur->Stat, h);
    213213                if (fLeaveLock)
    214                     pgmUnlock(pVM); /* @todo: Not entirely safe. */
     214                    pgmUnlock(pVM); /** @todo: Not entirely safe. */
    215215
    216216                rc = pfnHandler(pVM, uErr, pRegFrame, pvFault, GCPhysFault, pvUser);
     
    218218                    pgmLock(pVM);
    219219#  ifdef VBOX_WITH_STATISTICS
    220                 pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhysFault);
     220                pCur = pgmHandlerPhysicalLookup(pVM, GCPhysFault);
    221221                if (pCur)
    222222                    STAM_PROFILE_STOP(&pCur->Stat, h);
  • trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp

    r31123 r31136  
    55
    66/*
    7  * Copyright (C) 2006-2007 Oracle Corporation
     7 * Copyright (C) 2006-2010 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    262262
    263263        /*
    264          * Clear the page bits and notify the REM about this change.
     264         * Clear the page bits, notify the REM about this change and clear
     265         * the cache.
    265266         */
    266267        pgmHandlerPhysicalResetRamFlags(pVM, pCur);
    267268        pgmHandlerPhysicalDeregisterNotifyREM(pVM, pCur);
     269        pVM->pgm.s.pLastPhysHandlerR0 = 0;
     270        pVM->pgm.s.pLastPhysHandlerR3 = 0;
     271        pVM->pgm.s.pLastPhysHandlerRC = 0;
    268272        MMHyperFree(pVM, pCur);
    269273        pgmUnlock(pVM);
     
    575579
    576580        /*
    577          * Invalid new location, free it.
     581         * Invalid new location, flush the cache and free it.
    578582         * We've only gotta notify REM and free the memory.
    579583         */
    580584        pgmHandlerPhysicalDeregisterNotifyREM(pVM, pCur);
     585        pVM->pgm.s.pLastPhysHandlerR0 = 0;
     586        pVM->pgm.s.pLastPhysHandlerR3 = 0;
     587        pVM->pgm.s.pLastPhysHandlerRC = 0;
    581588        MMHyperFree(pVM, pCur);
    582589    }
     
    746753                        LogFlow(("PGMHandlerPhysicalJoin: %RGp-%RGp %RGp-%RGp\n",
    747754                                 pCur1->Core.Key, pCur1->Core.KeyLast, pCur2->Core.Key, pCur2->Core.KeyLast));
     755                        pVM->pgm.s.pLastPhysHandlerR0 = 0;
     756                        pVM->pgm.s.pLastPhysHandlerR3 = 0;
     757                        pVM->pgm.s.pLastPhysHandlerRC = 0;
    748758                        MMHyperFree(pVM, pCur2);
    749759                        pgmUnlock(pVM);
     
    11751185     */
    11761186    pgmLock(pVM);
    1177     PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
     1187    PPGMPHYSHANDLER pCur = pgmHandlerPhysicalLookup(pVM, GCPhys);
    11781188    if (pCur)
    11791189    {
     
    12041214{
    12051215    pgmLock(pVM);
    1206     PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
     1216    PPGMPHYSHANDLER pCur = pgmHandlerPhysicalLookup(pVM, GCPhys);
    12071217    if (!pCur)
    12081218    {
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r31123 r31136  
    17581758    {
    17591759#ifdef IN_RING3
    1760         pPhys = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
     1760        pPhys = pgmHandlerPhysicalLookup(pVM, GCPhys);
    17611761        AssertReleaseMsg(pPhys, ("GCPhys=%RGp cb=%#x\n", GCPhys, cb));
    17621762        Assert(GCPhys >= pPhys->Core.Key && GCPhys <= pPhys->Core.KeyLast);
     
    17761776        pgmLock(pVM);
    17771777# ifdef VBOX_WITH_STATISTICS
    1778         pPhys = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
     1778        pPhys = pgmHandlerPhysicalLookup(pVM, GCPhys);
    17791779        if (pPhys)
    17801780            STAM_PROFILE_STOP(&pPhys->Stat, h);
     
    19871987        ||  PGM_PAGE_IS_MMIO(pPage) /* screw virtual handlers on MMIO pages */)
    19881988    {
    1989         PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
     1989        PPGMPHYSHANDLER pCur = pgmHandlerPhysicalLookup(pVM, GCPhys);
    19901990        if (pCur)
    19911991        {
     
    20212021                pgmLock(pVM);
    20222022# ifdef VBOX_WITH_STATISTICS
    2023                 pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
     2023                pCur = pgmHandlerPhysicalLookup(pVM, GCPhys);
    20242024                if (pCur)
    20252025                    STAM_PROFILE_STOP(&pCur->Stat, h);
     
    21742174        if (fMorePhys && !pPhys)
    21752175        {
    2176             pPhys = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
     2176            pPhys = pgmHandlerPhysicalLookup(pVM, GCPhys);
    21772177            if (pPhys)
    21782178            {
     
    22332233            pgmLock(pVM);
    22342234# ifdef VBOX_WITH_STATISTICS
    2235             pPhys = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
     2235            pPhys = pgmHandlerPhysicalLookup(pVM, GCPhys);
    22362236            if (pPhys)
    22372237                STAM_PROFILE_STOP(&pPhys->Stat, h);
     
    23022302            pgmLock(pVM);
    23032303# ifdef VBOX_WITH_STATISTICS
    2304             pPhys = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
     2304            pPhys = pgmHandlerPhysicalLookup(pVM, GCPhys);
    23052305            if (pPhys)
    23062306                STAM_PROFILE_STOP(&pPhys->Stat, h);
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