- Timestamp:
- May 28, 2021 4:09:15 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Devices/Bus/DevIommuIntel.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevIommuIntel.cpp
r89365 r89366 1930 1930 { 1931 1931 PCDMAR pThis = PDMDEVINS_2_DATA(pDevIns, PCDMAR); 1932 static uint8_t const s_acLevelShifts[] = { 12, 21, 30, 39, 48 }; 1933 static uint64_t const s_auLevelMasks[] = { UINT64_C(0x00000000001ff000), 1934 UINT64_C(0x000000003fe00000), 1935 UINT64_C(0x0000007fc0000000), 1936 UINT64_C(0x0000ff8000000000), 1937 UINT64_C(0x01ff000000000000) }; 1938 AssertCompile(RT_ELEMENTS(s_acLevelShifts) == RT_ELEMENTS(s_auLevelMasks)); 1939 Assert(uPagingLevel >= 3 && uPagingLevel <= RT_ELEMENTS(s_auLevelMasks)); 1932 Assert(uPagingLevel >= 3 && uPagingLevel <= 5); 1940 1933 1941 1934 /* … … 1950 1943 /* Read the paging entry for the current level. */ 1951 1944 { 1952 uint16_t const idxPte = (uDmaAddr >> s_acLevelShifts[iLevel]) & UINT64_C(0x1ff); 1945 uint8_t const cShift = 12 + ((iLevel - 1) * 9); 1946 uint16_t const idxPte = (uDmaAddr >> cShift) & UINT64_C(0x1ff); 1953 1947 uint64_t const offPte = idxPte << 3; 1954 1948 RTGCPHYS const GCPhysPtEntity = (uPtEntity & fHawMask) | offPte;
Note:
See TracChangeset
for help on using the changeset viewer.

