Lines Matching refs:pSet

111 #define PGMRZDYNMAP_SET_2_VMCPU(pSet)       (RT_FROM_MEMBER(pSet, VMCPU, pgm.s.AutoSet))
114 #define PGMRZDYNMAP_SET_2_VM(pSet) (PGMRZDYNMAP_SET_2_VMCPU(pSet)->CTX_SUFF(pVM))
118 # define PGMRZDYNMAP_SET_2_DYNMAP(pSet) (PGMRZDYNMAP_SET_2_VM(pSet)->pgm.s.pRCDynMap)
120 # define PGMRZDYNMAP_SET_2_DYNMAP(pSet) (g_pPGMR0DynMap)
349 PPGMMAPSET pSet = &pVM->aCpus[idCpu].pgm.s.AutoSet;
350 uint32_t j = RT_ELEMENTS(pSet->aEntries);
353 pSet->aEntries[j].pvPage = NULL;
354 pSet->aEntries[j].HCPhys = NIL_RTHCPHYS;
355 PGMRZDYNMAP_ZAP_ENTRY(&pSet->aEntries[j]);
357 pSet->cEntries = PGMMAPSET_CLOSED;
358 pSet->iSubset = UINT32_MAX;
359 pSet->iCpu = -1;
360 memset(&pSet->aiHashTable[0], 0xff, sizeof(pSet->aiHashTable));
553 PPGMMAPSET pSet = &pVM->aCpus[idCpu].pgm.s.AutoSet;
554 uint32_t j = pSet->cEntries;
555 if (j <= RT_ELEMENTS(pSet->aEntries))
562 int32_t cRefs = pSet->aEntries[j].cRefs;
563 uint32_t iPage = pSet->aEntries[j].iPage;
570 PGMRZDYNMAP_ZAP_ENTRY(&pSet->aEntries[j]);
572 pSet->cEntries = PGMMAPSET_CLOSED;
573 pSet->iSubset = UINT32_MAX;
574 pSet->iCpu = -1;
579 j = RT_ELEMENTS(pSet->aEntries);
582 Assert(pSet->aEntries[j].iPage == UINT16_MAX);
583 Assert(!pSet->aEntries[j].cRefs);
1717 * @param pSet The set.
1719 static void pgmDynMapOptimizeAutoSet(PPGMMAPSET pSet)
1723 for (uint32_t i = 0 ; i < pSet->cEntries; i++)
1728 uint16_t const iPage = pSet->aEntries[i].iPage;
1730 while ( j < pSet->cEntries
1731 && ( pSet->iSubset == UINT32_MAX
1732 || pSet->iSubset < pSet->cEntries) )
1734 if (pSet->aEntries[j].iPage != iPage)
1738 uint32_t const cHardRefs = (uint32_t)pSet->aEntries[i].cRefs
1739 + (uint32_t)pSet->aEntries[j].cRefs;
1740 uint32_t cInlinedRefs = (uint32_t)pSet->aEntries[i].cInlinedRefs
1741 + (uint32_t)pSet->aEntries[j].cInlinedRefs;
1742 uint32_t cUnrefs = (uint32_t)pSet->aEntries[i].cUnrefs
1743 + (uint32_t)pSet->aEntries[j].cUnrefs;
1754 pSet->aEntries[i].cRefs = cHardRefs;
1755 pSet->aEntries[i].cInlinedRefs = cInlinedRefs;
1756 pSet->aEntries[i].cUnrefs = cUnrefs;
1757 pSet->cEntries--;
1758 if (j < pSet->cEntries)
1760 pSet->aEntries[j] = pSet->aEntries[pSet->cEntries];
1761 PGMRZDYNMAP_ZAP_ENTRY(&pSet->aEntries[pSet->cEntries]);
1764 PGMRZDYNMAP_ZAP_ENTRY(&pSet->aEntries[j]);
1770 uint32_t cMigrate = UINT16_MAX - 1 - pSet->aEntries[i].cRefs;
1771 Assert(pSet->aEntries[j].cRefs > cMigrate);
1772 pSet->aEntries[j].cRefs -= cMigrate;
1773 pSet->aEntries[i].cRefs = UINT16_MAX - 1;
1785 uint32_t const cTotalRefs = (uint32_t)pSet->aEntries[i].cRefs + pSet->aEntries[i].cInlinedRefs;
1788 pSet->iSubset,
1789 pSet->cEntries,
1790 pSet->aEntries[i].pvPage,
1791 pSet->aEntries[i].iPage,
1792 pSet->aEntries[i].cRefs,
1793 pSet->aEntries[i].cInlinedRefs,
1794 pSet->aEntries[i].cUnrefs,
1796 Assert(cTotalRefs >= pSet->aEntries[i].cUnrefs);
1798 if ( cTotalRefs == pSet->aEntries[i].cUnrefs
1799 && ( pSet->iSubset == UINT32_MAX
1800 || pSet->iSubset < pSet->cEntries)
1803 Log2(("pgmDynMapOptimizeAutoSet: Releasing iPage=%d/%p\n", pSet->aEntries[i].iPage, pSet->aEntries[i].pvPage));
1804 //LogFlow(("pgmDynMapOptimizeAutoSet: Releasing iPage=%d/%p\n", pSet->aEntries[i].iPage, pSet->aEntries[i].pvPage));
1805 pgmRZDynMapReleasePage(PGMRZDYNMAP_SET_2_DYNMAP(pSet),
1806 pSet->aEntries[i].iPage,
1807 pSet->aEntries[i].cRefs);
1808 pSet->cEntries--;
1809 if (i < pSet->cEntries)
1811 pSet->aEntries[i] = pSet->aEntries[pSet->cEntries];
1812 PGMRZDYNMAP_ZAP_ENTRY(&pSet->aEntries[pSet->cEntries]);
1870 * @param pSet The set.
1872 DECLINLINE(bool) pgmRZDynMapHasHighLoad(PPGMMAPSET pSet)
1875 if (pSet->cEntries < MM_HYPER_DYNAMIC_SIZE / PAGE_SIZE / 2)
1879 PPGMRZDYNMAP pThis = PGMRZDYNMAP_SET_2_DYNMAP(pSet);
1892 * @param pSet The set to flush.
1895 DECLINLINE(void) pgmDynMapFlushAutoSetWorker(PPGMMAPSET pSet, uint32_t cEntries)
1901 && RT_LIKELY(cEntries <= RT_ELEMENTS(pSet->aEntries)))
1903 PPGMRZDYNMAP pThis = PGMRZDYNMAP_SET_2_DYNMAP(pSet);
1909 uint32_t iPage = pSet->aEntries[i].iPage;
1911 int32_t cRefs = pSet->aEntries[i].cRefs;
1915 PGMRZDYNMAP_ZAP_ENTRY(&pSet->aEntries[i]);
1932 PPGMMAPSET pSet = &pVCpu->pgm.s.AutoSet;
1937 uint32_t cEntries = pSet->cEntries;
1939 pSet->cEntries = PGMMAPSET_CLOSED;
1940 pSet->iSubset = UINT32_MAX;
1941 pSet->iCpu = -1;
1944 if (RT_ELEMENTS(pSet->aEntries) > MM_HYPER_DYNAMIC_SIZE / PAGE_SIZE)
1948 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->aStatRZDynMapSetFilledPct[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
1949 if (cEntries > RT_ELEMENTS(pSet->aEntries) * 50 / 100)
1954 pgmDynMapFlushAutoSetWorker(pSet, cEntries);
1965 PPGMMAPSET pSet = &pVCpu->pgm.s.AutoSet;
1966 AssertMsg(pSet->iCpu == PGMRZDYNMAP_CUR_CPU(), ("%d %d efl=%#x\n", pSet->iCpu, PGMRZDYNMAP_CUR_CPU(), ASMGetFlags()));
1971 uint32_t cEntries = pSet->cEntries;
1973 Assert(pSet->iSubset == UINT32_MAX);
1975 if (RT_ELEMENTS(pSet->aEntries) > MM_HYPER_DYNAMIC_SIZE / PAGE_SIZE)
1979 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->aStatRZDynMapSetFilledPct[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
1980 if ( cEntries >= RT_ELEMENTS(pSet->aEntries) * 45 / 100
1981 || pgmRZDynMapHasHighLoad(pSet))
1983 pSet->cEntries = 0;
1984 Log(("PGMDynMapFlushAutoSet: cEntries=%d\n", pSet->cEntries));
1986 pgmDynMapFlushAutoSetWorker(pSet, cEntries);
1987 AssertMsg(pSet->iCpu == PGMRZDYNMAP_CUR_CPU(), ("%d %d efl=%#x\n", pSet->iCpu, PGMRZDYNMAP_CUR_CPU(), ASMGetFlags()));
2009 PPGMMAPSET pSet = &pVCpu->pgm.s.AutoSet;
2011 if (pSet->iCpu != iRealCpu)
2013 uint32_t i = pSet->cEntries;
2016 AssertMsg(i <= RT_ELEMENTS(pSet->aEntries), ("%#x (%u)\n", i, i));
2017 if (i != 0 && RT_LIKELY(i <= RT_ELEMENTS(pSet->aEntries)))
2019 PPGMRZDYNMAP pThis = PGMRZDYNMAP_SET_2_DYNMAP(pSet);
2024 Assert(pSet->aEntries[i].cRefs > 0);
2025 uint32_t iPage = pSet->aEntries[i].iPage;
2042 pSet->iCpu = iRealCpu;
2056 * @param pSet The set which subset to flush.
2058 static void pgmDynMapFlushSubset(PPGMMAPSET pSet)
2060 uint32_t iSubset = pSet->iSubset;
2061 uint32_t i = pSet->cEntries;
2062 Assert(i <= RT_ELEMENTS(pSet->aEntries));
2064 && i <= RT_ELEMENTS(pSet->aEntries))
2066 Log(("pgmDynMapFlushSubset: cEntries=%d iSubset=%d\n", pSet->cEntries, iSubset));
2067 pSet->cEntries = iSubset;
2069 PPGMRZDYNMAP pThis = PGMRZDYNMAP_SET_2_DYNMAP(pSet);
2074 uint32_t iPage = pSet->aEntries[i].iPage;
2076 int32_t cRefs = pSet->aEntries[i].cRefs;
2080 PGMRZDYNMAP_ZAP_ENTRY(&pSet->aEntries[i]);
2104 PPGMMAPSET pSet = &pVCpu->pgm.s.AutoSet;
2105 AssertReturn(pSet->cEntries != PGMMAPSET_CLOSED, UINT32_MAX);
2106 uint32_t iPrevSubset = pSet->iSubset;
2113 if ( pSet->cEntries > RT_ELEMENTS(pSet->aEntries) * 60 / 100
2114 || pgmRZDynMapHasHighLoad(pSet))
2117 pgmDynMapOptimizeAutoSet(pSet);
2120 pSet->iSubset = pSet->cEntries;
2123 AssertMsg(iPrevSubset <= pSet->iSubset || iPrevSubset == UINT32_MAX, ("iPrevSubset=%#x iSubset=%#x\n", iPrevSubset, pSet->iSubset));
2136 PPGMMAPSET pSet = &pVCpu->pgm.s.AutoSet;
2137 uint32_t cEntries = pSet->cEntries;
2138 LogFlow(("PGMRZDynMapPopAutoSubset: pVCpu=%p iPrevSubset=%u iSubset=%u cEntries=%u\n", pVCpu, iPrevSubset, pSet->iSubset, cEntries));
2140 AssertMsgReturnVoid(pSet->iSubset >= iPrevSubset || iPrevSubset == UINT32_MAX, ("iPrevSubset=%u iSubset=%u cEntries=%u\n", iPrevSubset, pSet->iSubset, cEntries));
2142 if (RT_ELEMENTS(pSet->aEntries) > MM_HYPER_DYNAMIC_SIZE / PAGE_SIZE)
2146 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->aStatRZDynMapSetFilledPct[(cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
2147 if ( cEntries >= RT_ELEMENTS(pSet->aEntries) * 40 / 100
2148 && cEntries != pSet->iSubset)
2150 pgmDynMapFlushSubset(pSet);
2151 Assert(pSet->cEntries >= iPrevSubset || iPrevSubset == UINT32_MAX);
2153 pSet->iSubset = iPrevSubset;
2177 PPGMMAPSET pSet = &pVCpu->pgm.s.AutoSet;
2178 uint32_t iEntry = pSet->cEntries;
2186 #define IS_MATCHING_ENTRY(pSet, iEntry, pvHint) \
2187 ( (pSet)->aEntries[(iEntry)].pvPage == (pvHint) \
2188 && (uint32_t)(pSet)->aEntries[(iEntry)].cRefs + (pSet)->aEntries[(iEntry)].cInlinedRefs \
2189 > (pSet)->aEntries[(iEntry)].cUnrefs )
2190 if ( iEntry >= 1 && IS_MATCHING_ENTRY(pSet, iEntry - 1, pvHint))
2192 else if (iEntry >= 2 && IS_MATCHING_ENTRY(pSet, iEntry - 2, pvHint))
2194 else if (iEntry >= 3 && IS_MATCHING_ENTRY(pSet, iEntry - 3, pvHint))
2196 else if (iEntry >= 4 && IS_MATCHING_ENTRY(pSet, iEntry - 4, pvHint))
2198 else if (iEntry >= 5 && IS_MATCHING_ENTRY(pSet, iEntry - 5, pvHint))
2200 else if (iEntry >= 6 && IS_MATCHING_ENTRY(pSet, iEntry - 6, pvHint))
2202 else if (iEntry >= 7 && IS_MATCHING_ENTRY(pSet, iEntry - 7, pvHint))
2214 if (IS_MATCHING_ENTRY(pSet, iEntry, pvHint))
2229 pvHint, pSet->cEntries, pSet->iSubset,
2230 pSet->aEntries[0].iPage, pSet->aEntries[0].cRefs, pSet->aEntries[0].cInlinedRefs, pSet->aEntries[0].cUnrefs, pSet->aEntries[0].pvPage,
2231 pSet->aEntries[1].iPage, pSet->aEntries[1].cRefs, pSet->aEntries[1].cInlinedRefs, pSet->aEntries[1].cUnrefs, pSet->aEntries[1].pvPage,
2232 pSet->aEntries[2].iPage, pSet->aEntries[2].cRefs, pSet->aEntries[2].cInlinedRefs, pSet->aEntries[2].cUnrefs, pSet->aEntries[2].pvPage,
2233 pSet->aEntries[3].iPage, pSet->aEntries[3].cRefs, pSet->aEntries[3].cInlinedRefs, pSet->aEntries[3].cUnrefs, pSet->aEntries[3].pvPage,
2234 pSet->aEntries[4].iPage, pSet->aEntries[4].cRefs, pSet->aEntries[4].cInlinedRefs, pSet->aEntries[4].cUnrefs, pSet->aEntries[4].pvPage,
2235 pSet->aEntries[5].iPage, pSet->aEntries[5].cRefs, pSet->aEntries[5].cInlinedRefs, pSet->aEntries[5].cUnrefs, pSet->aEntries[5].pvPage));
2242 uint32_t const cTotalRefs = (uint32_t)pSet->aEntries[iEntry].cRefs + pSet->aEntries[iEntry].cInlinedRefs;
2243 uint32_t const cUnrefs = pSet->aEntries[iEntry].cUnrefs;
2245 pvHint, iEntry, pSet->aEntries[iEntry].cRefs, pSet->aEntries[iEntry].cInlinedRefs, cUnrefs, cTotalRefs, pszFile, iLine, pszFunction));
2249 pSet->aEntries[iEntry].cUnrefs++;
2250 else if (pSet->aEntries[iEntry].cInlinedRefs)
2252 uint32_t cSub = RT_MIN(pSet->aEntries[iEntry].cInlinedRefs, pSet->aEntries[iEntry].cUnrefs);
2253 pSet->aEntries[iEntry].cInlinedRefs -= cSub;
2254 pSet->aEntries[iEntry].cUnrefs -= cSub;
2255 pSet->aEntries[iEntry].cUnrefs++;
2265 pgmDynMapOptimizeAutoSet(pSet);
2275 * @param pSet The set.
2281 int pgmRZDynMapHCPageCommon(PPGMMAPSET pSet, RTHCPHYS HCPhys, void **ppv RTLOG_COMMA_SRC_POS_DECL)
2283 AssertMsg(pSet->iCpu == PGMRZDYNMAP_CUR_CPU(), ("%d %d efl=%#x\n", pSet->iCpu, PGMRZDYNMAP_CUR_CPU(), ASMGetFlags()));
2284 PVMCPU pVCpu = PGMRZDYNMAP_SET_2_VMCPU(pSet);
2291 PPGMRZDYNMAP pThis = PGMRZDYNMAP_SET_2_DYNMAP(pSet);
2292 uint32_t iPage = pgmR0DynMapPage(pThis, HCPhys, pSet->iCpu, pVCpu, &pvPage);
2300 pgmDynMapOptimizeAutoSet(pSet);
2302 iPage = pgmR0DynMapPage(pThis, HCPhys, pSet->iCpu, pVCpu, &pvPage);
2308 VMMRZCallRing3NoCpu(PGMRZDYNMAP_SET_2_VM(pSet), VMMCALLRING3_VM_R0_ASSERTION, 0);
2323 AssertCompile(RT_ELEMENTS(pSet->aEntries) >= 8);
2324 int32_t i = pSet->cEntries;
2327 unsigned iEntry = pSet->cEntries++;
2328 pSet->aEntries[iEntry].cRefs = 1;
2329 pSet->aEntries[iEntry].cUnrefs = 0;
2330 pSet->aEntries[iEntry].cInlinedRefs = 0;
2331 pSet->aEntries[iEntry].iPage = iPage;
2332 pSet->aEntries[iEntry].pvPage = pvPage;
2333 pSet->aEntries[iEntry].HCPhys = HCPhys;
2334 pSet->aiHashTable[PGMMAPSET_HASH(HCPhys)] = iEntry;
2335 LogFlow(("pgmRZDynMapHCPageCommon: pSet=%p HCPhys=%RHp #%u/%u/%p cRefs=%u/0/0 iPage=%#x [a] %s(%d) %s\n",
2336 pSet, HCPhys, iEntry, iEntry + 1, pvPage, 1, iPage, pszFile, iLine, pszFunction));
2339 else if ( pSet->aEntries[i - 0].iPage == iPage
2340 && pSet->aEntries[i - 0].cRefs < UINT16_MAX - 1)
2342 pSet->aEntries[i - 0].cRefs++;
2343 LogFlow(("pgmRZDynMapHCPageCommon: pSet=%p HCPhys=%RHp #%u/%u/%p cRefs=%u/%u/%u iPage=%#x [0] %s(%d) %s\n", pSet, HCPhys, i - 0, pSet->cEntries, pvPage, pSet->aEntries[i - 0].cRefs, pSet->aEntries[i - 0].cInlinedRefs, pSet->aEntries[i - 0].cUnrefs, iPage, pszFile, iLine, pszFunction));
2345 else if ( pSet->aEntries[i - 1].iPage == iPage
2346 && pSet->aEntries[i - 1].cRefs < UINT16_MAX - 1)
2348 pSet->aEntries[i - 1].cRefs++;
2349 LogFlow(("pgmRZDynMapHCPageCommon: pSet=%p HCPhys=%RHp #%u/%u/%p cRefs=%u/%u/%u iPage=%#x [1] %s(%d) %s\n", pSet, HCPhys, i - 1, pSet->cEntries, pvPage, pSet->aEntries[i - 1].cRefs, pSet->aEntries[i - 1].cInlinedRefs, pSet->aEntries[i - 1].cUnrefs, iPage, pszFile, iLine, pszFunction));
2351 else if ( pSet->aEntries[i - 2].iPage == iPage
2352 && pSet->aEntries[i - 2].cRefs < UINT16_MAX - 1)
2354 pSet->aEntries[i - 2].cRefs++;
2355 LogFlow(("pgmRZDynMapHCPageCommon: pSet=%p HCPhys=%RHp #%u/%u/%p cRefs=%u/%u/%u iPage=%#x [2] %s(%d) %s\n", pSet, HCPhys, i - 2, pSet->cEntries, pvPage, pSet->aEntries[i - 2].cRefs, pSet->aEntries[i - 2].cInlinedRefs, pSet->aEntries[i - 2].cUnrefs, iPage, pszFile, iLine, pszFunction));
2357 else if ( pSet->aEntries[i - 3].iPage == iPage
2358 && pSet->aEntries[i - 3].cRefs < UINT16_MAX - 1)
2360 pSet->aEntries[i - 3].cRefs++;
2361 LogFlow(("pgmRZDynMapHCPageCommon: pSet=%p HCPhys=%RHp #%u/%u/%p cRefs=%u/%u/%u iPage=%#x [4] %s(%d) %s\n", pSet, HCPhys, i - 3, pSet->cEntries, pvPage, pSet->aEntries[i - 3].cRefs, pSet->aEntries[i - 3].cInlinedRefs, pSet->aEntries[i - 3].cUnrefs, iPage, pszFile, iLine, pszFunction));
2363 else if ( pSet->aEntries[i - 4].iPage == iPage
2364 && pSet->aEntries[i - 4].cRefs < UINT16_MAX - 1)
2366 pSet->aEntries[i - 4].cRefs++;
2367 LogFlow(("pgmRZDynMapHCPageCommon: pSet=%p HCPhys=%RHp #%u/%u/%p cRefs=%u/%u/%u iPage=%#x [4] %s(%d) %s\n", pSet, HCPhys, i - 4, pSet->cEntries, pvPage, pSet->aEntries[i - 4].cRefs, pSet->aEntries[i - 4].cInlinedRefs, pSet->aEntries[i - 4].cUnrefs, iPage, pszFile, iLine, pszFunction));
2370 else if (RT_LIKELY(i <= (int32_t)RT_ELEMENTS(pSet->aEntries) * 60 / 100))
2372 unsigned iEntry = pSet->cEntries++;
2373 pSet->aEntries[iEntry].cRefs = 1;
2374 pSet->aEntries[iEntry].cUnrefs = 0;
2375 pSet->aEntries[iEntry].cInlinedRefs = 0;
2376 pSet->aEntries[iEntry].iPage = iPage;
2377 pSet->aEntries[iEntry].pvPage = pvPage;
2378 pSet->aEntries[iEntry].HCPhys = HCPhys;
2379 pSet->aiHashTable[PGMMAPSET_HASH(HCPhys)] = iEntry;
2380 LogFlow(("pgmRZDynMapHCPageCommon: pSet=%p HCPhys=%RHp #%u/%u/%p cRefs=1/0/0 iPage=%#x [b] %s(%d) %s\n", pSet, HCPhys, iEntry, pSet->cEntries, pvPage, iPage, pszFile, iLine, pszFunction));
2385 Assert(pSet->cEntries <= RT_ELEMENTS(pSet->aEntries));
2388 if ( pSet->aEntries[i].iPage == iPage
2389 && pSet->aEntries[i].cRefs < UINT16_MAX - 1)
2391 pSet->aEntries[i].cRefs++;
2393 LogFlow(("pgmRZDynMapHCPageCommon: pSet=%p HCPhys=%RHp #%u/%u/%p cRefs=%u/%u/%u iPage=%#x [c] %s(%d) %s\n", pSet, HCPhys, i, pSet->cEntries, pvPage, pSet->aEntries[i].cRefs, pSet->aEntries[i].cInlinedRefs, pSet->aEntries[i].cUnrefs, iPage, pszFile, iLine, pszFunction));
2400 if (pSet->iSubset < pSet->cEntries)
2403 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->aStatRZDynMapSetFilledPct[(pSet->cEntries * 10 / RT_ELEMENTS(pSet->aEntries)) % 11]);
2404 pgmDynMapFlushSubset(pSet);
2408 if (RT_UNLIKELY(pSet->cEntries >= RT_ELEMENTS(pSet->aEntries)))
2411 pgmDynMapOptimizeAutoSet(pSet);
2414 if (RT_LIKELY(pSet->cEntries < RT_ELEMENTS(pSet->aEntries)))
2416 unsigned iEntry = pSet->cEntries++;
2417 pSet->aEntries[iEntry].cRefs = 1;
2418 pSet->aEntries[iEntry].cUnrefs = 0;
2419 pSet->aEntries[iEntry].cInlinedRefs = 0;
2420 pSet->aEntries[iEntry].iPage = iPage;
2421 pSet->aEntries[iEntry].pvPage = pvPage;
2422 pSet->aEntries[iEntry].HCPhys = HCPhys;
2423 pSet->aiHashTable[PGMMAPSET_HASH(HCPhys)] = iEntry;
2424 LogFlow(("pgmRZDynMapHCPageCommon: pSet=%p HCPhys=%RHp #%u/%u/%p cRefs=1/0/0 iPage=%#x [d] %s(%d) %s\n", pSet, HCPhys, iEntry, pSet->cEntries, pvPage, iPage, pszFile, iLine, pszFunction));
2433 VMMRZCallRing3NoCpu(PGMRZDYNMAP_SET_2_VM(pSet), VMMCALLRING3_VM_R0_ASSERTION, 0);
2481 PPGMMAPSET pSet = &pVM->aCpus[0].pgm.s.AutoSet;
2482 PPGMRZDYNMAP pThis = PGMRZDYNMAP_SET_2_DYNMAP(pSet);
2515 LogRel(("Load=%u/%u/%u Set=%u/%u\n", pThis->cLoad, pThis->cMaxLoad, pThis->cPages - pThis->cPages, pSet->cEntries, RT_ELEMENTS(pSet->aEntries)));
2536 else if (pSet->cEntries != 5)
2538 LogRel(("failed(%d): cEntries=%d expected %d\n", __LINE__, pSet->cEntries, RT_ELEMENTS(pSet->aEntries) / 2));
2541 else if ( pSet->aEntries[4].cRefs != UINT16_MAX - 1
2542 || pSet->aEntries[3].cRefs != UINT16_MAX - 1
2543 || pSet->aEntries[2].cRefs != 1
2544 || pSet->aEntries[1].cRefs != 1
2545 || pSet->aEntries[0].cRefs != 1)
2548 for (i = 0; i < pSet->cEntries; i++)
2549 LogRel(("[%d]=%d, ", i, pSet->aEntries[i].cRefs));
2564 for (i = 0 ; i < RT_ELEMENTS(pSet->aEntries) - 5 && RT_SUCCESS(rc) && pv2 != pv; i++)
2575 else if (pSet->cEntries != RT_ELEMENTS(pSet->aEntries))
2577 LogRel(("failed(%d): cEntries=%d expected %d\n", __LINE__, pSet->cEntries, RT_ELEMENTS(pSet->aEntries)));
2580 LogRel(("Load=%u/%u/%u Set=%u/%u\n", pThis->cLoad, pThis->cMaxLoad, pThis->cPages - pThis->cPages, pSet->cEntries, RT_ELEMENTS(pSet->aEntries)));
2591 for (i = 0 ; i < RT_ELEMENTS(pSet->aEntries) + 2; i++)
2615 rc, VERR_PGM_DYNMAP_FULL_SET, pv2, pSet->cEntries, RT_ELEMENTS(pSet->aEntries), i));
2684 pThis->cLoad, pThis->cMaxLoad, pThis->cPages - pThis->cPages, pSet->cEntries, RT_ELEMENTS(pSet->aEntries)));