Changeset 96897 in vbox for trunk/src/VBox/VMM/VMMR3/PGMPool.cpp
- Timestamp:
- Sep 27, 2022 1:15:05 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PGMPool.cpp
r96879 r96897 125 125 * Internal Functions * 126 126 *********************************************************************************************************************************/ 127 static FNDBGFHANDLERINT pgmR3PoolInfoRoots; 128 127 129 #ifdef VBOX_WITH_DEBUGGER 128 130 static FNDBGCCMD pgmR3PoolCmdCheck; 129 #endif 130 131 #ifdef VBOX_WITH_DEBUGGER 131 132 132 /** Command descriptors. */ 133 133 static const DBGCCMD g_aCmds[] = … … 451 451 #endif /* VBOX_WITH_STATISTICS */ 452 452 453 DBGFR3InfoRegisterInternalEx(pVM, "pgmpoolroots", "Lists page pool roots.", pgmR3PoolInfoRoots, 0); 454 453 455 #ifdef VBOX_WITH_DEBUGGER 454 456 /* … … 602 604 void *pvShw = PGMPOOL_PAGE_2_PTR_V2(pPool->CTX_SUFF(pVM), pVCpu, pPage); 603 605 STAM_PROFILE_START(&pPool->StatZeroPage, z); 604 605 606 #ifdef VBOX_STRICT 606 607 if (PGMPOOL_PAGE_IS_NESTED(pPage)) 607 608 { 608 609 PEPTPT pPT = (PEPTPT)pvShw; 609 for (unsigned ptIndex = 0; ptIndex < RT_ELEMENTS(pPT->a); ptIndex++) 610 { 611 if (pPT->a[ptIndex].u & EPT_PRESENT_MASK) 612 Assert(!(pPT->a[ptIndex].u & EPT_E_LEAF)); /* We don't support large pages as of yet. */ 613 } 610 for (unsigned idxPt = 0; idxPt < RT_ELEMENTS(pPT->a); idxPt++) 611 if (pPT->a[idxPt].u & EPT_PRESENT_MASK) 612 Assert(!(pPT->a[idxPt].u & EPT_E_LEAF)); /* We don't support large pages as of yet. */ 614 613 } 615 614 #endif … … 843 842 } 844 843 844 845 /** 846 * @callback_method_impl{FNDBGFHANDLERINT, pgmpoolroots} 847 */ 848 static DECLCALLBACK(void) pgmR3PoolInfoRoots(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs) 849 { 850 RT_NOREF(pszArgs); 851 852 PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool); 853 unsigned cLeft = pPool->cUsedPages; 854 unsigned iPage = pPool->cCurPages; 855 while (--iPage >= PGMPOOL_IDX_FIRST) 856 { 857 PGMPOOLPAGE volatile const *pPage = (PGMPOOLPAGE volatile const *)&pPool->aPages[iPage]; 858 RTGCPHYS const GCPhys = pPage->GCPhys; 859 if (GCPhys != NIL_RTGCPHYS) 860 { 861 uint8_t const enmKind = pPage->enmKind; 862 switch (enmKind) 863 { 864 default: 865 break; 866 867 case PGMPOOLKIND_PAE_PDPT_FOR_32BIT: 868 case PGMPOOLKIND_PAE_PDPT: 869 case PGMPOOLKIND_PAE_PDPT_PHYS: 870 case PGMPOOLKIND_64BIT_PML4: 871 case PGMPOOLKIND_ROOT_NESTED: 872 case PGMPOOLKIND_EPT_PML4_FOR_EPT_PML4: 873 { 874 const char *pszKind = "wtf!"; 875 switch (enmKind) 876 { 877 case PGMPOOLKIND_PAE_PDPT_FOR_32BIT: pszKind = "PAE_PDPT_FOR_32BIT"; break; 878 case PGMPOOLKIND_PAE_PDPT: pszKind = "PAE_PDPT"; break; 879 case PGMPOOLKIND_PAE_PDPT_PHYS: pszKind = "PAE_PDPT_PHYS"; break; 880 case PGMPOOLKIND_64BIT_PML4: pszKind = "64BIT_PML4"; break; 881 case PGMPOOLKIND_ROOT_NESTED: pszKind = "ROOT_NESTED"; break; 882 case PGMPOOLKIND_EPT_PML4_FOR_EPT_PML4: pszKind = "EPT_PML4_FOR_EPT_PML4"; break; 883 } 884 pHlp->pfnPrintf(pHlp, "#%04x: GCPhys=%RGp %s %s\n", 885 iPage, GCPhys, pszKind, pPage->fMonitored ? " monitored" : ""); 886 break; 887 } 888 } 889 if (!--cLeft) 890 break; 891 } 892 } 893 894 } 895 896 845 897 #ifdef VBOX_WITH_DEBUGGER 846 898 /**
Note:
See TracChangeset
for help on using the changeset viewer.