Changeset 88796 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Apr 30, 2021 12:32:28 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevIommuIntel.cpp
r88791 r88796 1197 1197 && (uGcmdReg & VTD_BF_GCMD_REG_SIRTP_MASK)) 1198 1198 { 1199 /** @todo Perform global invalidation of all interrupt-entry cache when ESIRTPS is 1200 * supported. */ 1199 1201 pThis->uIrtaReg = dmarRegReadRaw64(pThis, VTD_MMIO_OFF_IRTA_REG); 1200 1202 dmarRegChangeRaw32(pThis, VTD_MMIO_OFF_GSTS_REG, UINT32_MAX /* fAndMask */, VTD_BF_GSTS_REG_IRTPS_MASK /* fOrMask */); … … 1206 1208 if (uGcmdReg & VTD_BF_GCMD_REG_SRTP_MASK) 1207 1209 { 1208 /** @todo Perform global invalidation of all remapping translation caches. */ 1209 #if 0 1210 if (pThis->fCapReg & VTD_BF_CAP_REG_ESRTPS_MASK) 1211 { 1212 } 1213 #endif 1210 /** @todo Perform global invalidation of all remapping translation caches when 1211 * ESRTPS is supported. */ 1214 1212 pThis->uRtaddrReg = dmarRegReadRaw64(pThis, VTD_MMIO_OFF_RTADDR_REG); 1215 1213 } … … 2111 2109 PDMDevHlpCpuGetGuestAddrWidths(pDevIns, &cGstPhysAddrBits, &cGstLinearAddrBits); 2112 2110 2113 uint8_t const fFl1gp = 1; /* First-Level 1GB pages support. */ 2114 uint8_t const fFl5lp = 1; /* First-level 5-level paging support (PML5E). */ 2115 uint8_t const fSl2mp = fSlts & 1; /* Second-Level 2MB pages support. */ 2116 uint8_t const fSl2gp = fSlts & 1; /* Second-Level 1GB pages support. */ 2117 uint8_t const fSllps = fSl2mp /* Second-Level large page Support. */ 2118 | ((fSl2mp & fFl1gp) & RT_BIT(1)); 2119 uint8_t const fMamv = (fSl2gp ? /* Maximum address mask value (for second-level invalidations). */ 2120 X86_PAGE_1G_SHIFT : X86_PAGE_2M_SHIFT) - X86_PAGE_4K_SHIFT; 2121 uint8_t const fNd = 2; /* Number of domains (0=16, 1=64, 2=256, 3=1K, 4=4K, 5=16K, 6=64K, 2122 7=Reserved). */ 2123 uint8_t const fPsi = 1; /* Page selective invalidation. */ 2124 uint8_t const uMgaw = cGstPhysAddrBits - 1; /* Maximum guest address width. */ 2125 uint8_t const uSagaw = vtdCapRegGetSagaw(uMgaw); /* Supported adjust guest address width. */ 2126 uint16_t const offFro = DMAR_MMIO_OFF_FRCD_LO_REG >> 4; /* MMIO offset of FRCD registers. */ 2127 uint8_t const fEsrtps = 1; /* Enhanced SRTPS (flush all caches on SRTP flow). */ 2111 uint8_t const fFl1gp = 1; /* First-Level 1GB pages support. */ 2112 uint8_t const fFl5lp = 1; /* First-level 5-level paging support (PML5E). */ 2113 uint8_t const fSl2mp = fSlts & 1; /* Second-Level 2MB pages support. */ 2114 uint8_t const fSl2gp = fSlts & 1; /* Second-Level 1GB pages support. */ 2115 uint8_t const fSllps = fSl2mp /* Second-Level large page Support. */ 2116 | ((fSl2mp & fFl1gp) & RT_BIT(1)); 2117 uint8_t const fMamv = (fSl2gp ? X86_PAGE_1G_SHIFT /* Maximum address mask value (for 2nd-level invalidations). */ 2118 : X86_PAGE_2M_SHIFT) 2119 - X86_PAGE_4K_SHIFT; 2120 uint8_t const fNd = 2; /* Number of domains supported (0=16, 1=64, 2=256, 3=1K, 4=4K, 2121 5=16K, 6=64K, 7=Reserved). */ 2122 uint8_t const fPsi = 1; /* Page selective invalidation. */ 2123 uint8_t const uMgaw = cGstPhysAddrBits - 1; /* Maximum guest address width. */ 2124 uint8_t const uSagaw = vtdCapRegGetSagaw(uMgaw); /* Supported adjust guest address width. */ 2125 uint16_t const offFro = DMAR_MMIO_OFF_FRCD_LO_REG >> 4; /* MMIO offset of FRCD registers. */ 2126 uint8_t const fEsrtps = 1; /* Enhanced SRTPS (auto invalidate cache on SRTP). */ 2127 uint8_t const fEsirtps = 1; /* Enhanced SIRTPS (auto invalidate cache on SIRTP). */ 2128 2128 2129 2129 pThis->fCapReg = RT_BF_MAKE(VTD_BF_CAP_REG_ND, fNd) … … 2146 2146 | RT_BF_MAKE(VTD_BF_CAP_REG_PI, 0) /* Posted Interrupts not supported. */ 2147 2147 | RT_BF_MAKE(VTD_BF_CAP_REG_FL5LP, fFlts & fFl5lp) 2148 | RT_BF_MAKE(VTD_BF_CAP_REG_ESIRTPS, 0) /* If we invalidate interrupt cache on SIRTP flow. */2148 | RT_BF_MAKE(VTD_BF_CAP_REG_ESIRTPS, fEsirtps) 2149 2149 | RT_BF_MAKE(VTD_BF_CAP_REG_ESRTPS, fEsrtps); 2150 2150 dmarRegWriteRaw64(pThis, VTD_MMIO_OFF_CAP_REG, pThis->fCapReg); … … 2153 2153 /* ECAP_REG */ 2154 2154 { 2155 uint8_t const fQi = 1; /* Queued-invalidations. */2156 uint8_t const fIr = !!(DMAR_ACPI_DMAR_FLAGS & ACPI_DMAR_F_INTR_REMAP); /* Interrupt remapping support. */2157 uint8_t const fMhmv = 0xf; /* Maximum handle mask value. */2158 uint16_t const offIro = DMAR_MMIO_OFF_IVA_REG >> 4; /* MMIO offset of IOTLB registers. */2159 uint8_t const fSrs = 1; /* Supervisor request support. */2160 uint8_t const fEim = 1; /* Extended interrupt mode.*/2161 uint8_t const fAdms = 1; /* Abort DMA mode support. */2155 uint8_t const fQi = 1; /* Queued-invalidations. */ 2156 uint8_t const fIr = !!(DMAR_ACPI_DMAR_FLAGS & ACPI_DMAR_F_INTR_REMAP); /* Interrupt remapping support. */ 2157 uint8_t const fMhmv = 0xf; /* Maximum handle mask value. */ 2158 uint16_t const offIro = DMAR_MMIO_OFF_IVA_REG >> 4; /* MMIO offset of IOTLB registers. */ 2159 uint8_t const fSrs = 1; /* Supervisor request support. */ 2160 uint8_t const fEim = 1; /* Extended interrupt mode.*/ 2161 uint8_t const fAdms = 1; /* Abort DMA mode support. */ 2162 2162 2163 2163 pThis->fExtCapReg = RT_BF_MAKE(VTD_BF_ECAP_REG_C, 0) /* Accesses don't snoop CPU cache. */
Note:
See TracChangeset
for help on using the changeset viewer.