Changeset 92424 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Nov 15, 2021 1:09:17 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp
r92391 r92424 1793 1793 * the PGMRAMRANGE structure. 1794 1794 * 1795 * See also pgmR3PhysMmio2CalcChunkCount. 1796 * 1795 1797 * Note! The sizes used here will influence the saved state. 1796 1798 */ 1797 1799 uint32_t cbChunk = 16U*_1M; 1798 uint32_t cPagesPerChunk = 1048048; /* max ~1048059 */ 1799 AssertCompile(sizeof(PGMRAMRANGE) + sizeof(PGMPAGE) * 1048048 < 16U*_1M - PAGE_SIZE * 2); 1800 uint32_t cPagesPerChunk = 1047552; /* max ~1048059 */ 1801 Assert(cPagesPerChunk / 512 * 512 == cPagesPerChunk); /* NEM large page requirement */ 1802 AssertCompile(sizeof(PGMRAMRANGE) + sizeof(PGMPAGE) * 1047552 < 16U*_1M - PAGE_SIZE * 2); 1800 1803 AssertRelease(RT_UOFFSETOF_DYN(PGMRAMRANGE, aPages[cPagesPerChunk]) + PAGE_SIZE * 2 <= cbChunk); 1801 1804 … … 2710 2713 * P.S. If we want to include a dirty bitmap, we'd have to drop down to 1040384 pages. 2711 2714 */ 2712 uint32_t cbChunk = 16U*_1M; 2713 uint32_t cPagesPerChunk = 1048000; /* max ~1048059 */ 2714 Assert(cPagesPerChunk / 64 * 64 == cPagesPerChunk); /* (NEM requirement) */ 2715 AssertCompile(sizeof(PGMREGMMIO2RANGE) + sizeof(PGMPAGE) * 1048000 < 16U*_1M - PAGE_SIZE * 2); 2715 uint32_t cbChunk = _16M; 2716 uint32_t cPagesPerChunk = 1047552; /* max ~1048059 */ 2717 Assert(cPagesPerChunk / 64 * 64 == cPagesPerChunk); /* (NEM requirement) */ 2718 Assert(cPagesPerChunk / 512 * 512 == cPagesPerChunk); /* (NEM large page requirement) */ 2719 AssertCompile(sizeof(PGMREGMMIO2RANGE) + sizeof(PGMPAGE) * 1047552 < _16M - PAGE_SIZE * 2); 2716 2720 AssertRelease(cPagesPerChunk <= PGM_MMIO2_MAX_PAGE_COUNT); /* See above note. */ 2717 2721 AssertRelease(RT_UOFFSETOF_DYN(PGMREGMMIO2RANGE, RamRange.aPages[cPagesPerChunk]) + PAGE_SIZE * 2 <= cbChunk);
Note:
See TracChangeset
for help on using the changeset viewer.