Changeset 88416 in vbox
- Timestamp:
- Apr 8, 2021 1:27:05 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevIommuIntel.cpp
r88414 r88416 449 449 450 450 #ifndef VBOX_DEVICE_STRUCT_TESTCASE 451 /** 452 * Gets the number of supported adjusted guest-address width (SAGAW) in bits given a 453 * CAP_REG.SAGAW value. 454 * 455 * @returns Number of SAGAW bits. 456 * @param uSagaw The CAP_REG.SAGAW value. 457 */ 458 DECLINLINE(uint8_t) vtdGetSupGstAddrBits(uint8_t uSagaw) 459 { 460 if (uSagaw > 0 && uSagaw < 4) 461 return uSagaw + 2; 462 return 0; 463 } 464 451 465 452 466 /** … … 1013 1027 uint64_t const fCap = dmarRegRead64(pThis, VTD_MMIO_OFF_CAP_REG); 1014 1028 uint64_t const fExtCap = dmarRegRead64(pThis, VTD_MMIO_OFF_ECAP_REG); 1015 uint8_t const uMaxGstAddrWidth = RT_BF_GET(fCap, VTD_BF_CAP_REG_MGAW) + 1; 1016 LogRel(("%s: CAP=%#RX64 ECAP=%#RX64 (MGAW=%u)\n", DMAR_LOG_PFX, fCap, fExtCap, uMaxGstAddrWidth)); 1029 uint8_t const uMaxGstAddrBits = RT_BF_GET(fCap, VTD_BF_CAP_REG_MGAW) + 1; 1030 uint8_t const uSupGstAddrBits = vtdGetSupGstAddrBits(RT_BF_GET(fCap, VTD_BF_CAP_REG_SAGAW)); 1031 LogRel(("%s: CAP=%#RX64 ECAP=%#RX64 (MGAW=%u bits, SAGAW=%u bits)\n", DMAR_LOG_PFX, fCap, fExtCap, uMaxGstAddrBits, 1032 uSupGstAddrBits)); 1017 1033 return VINF_SUCCESS; 1018 1034 }
Note:
See TracChangeset
for help on using the changeset viewer.