Changeset 88858 in vbox for trunk/include/VBox
- Timestamp:
- May 4, 2021 2:29:52 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 144192
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/iommu-intel.h
r88841 r88858 671 671 (SID, SQ, SVT, RSVD_63_20)); 672 672 673 /** IRTE: Qword 0 valid mask. */ 674 #define VTD_IRTE_0_VALID_MASK ( VTD_BF_0_IRTE_P_MASK | VTD_BF_0_IRTE_FPD_MASK \ 675 | VTD_BF_0_IRTE_DM_MASK | VTD_BF_0_IRTE_RH_MASK \ 676 | VTD_BF_0_IRTE_TM_MASK | VTD_BF_0_IRTE_DLM_MASK \ 677 | VTD_BF_0_IRTE_AVAIL_MASK | VTD_BF_0_IRTE_IM_MASK \ 678 | VTD_BF_0_IRTE_V_MASK | VTD_BF_0_IRTE_DST_MASK) 679 /** IRTE: Qword 1 valid mask. */ 680 #define VTD_IRTE_1_VALID_MASK ( VTD_BF_1_IRTE_SID_MASK | VTD_BF_1_IRTE_SQ_MASK \ 681 | VTD_BF_1_IRTE_SVT_MASK) 682 673 683 /** Interrupt Remapping Table Entry (IRTE) for remapped interrupts. */ 674 684 typedef struct VTD_IRTE_T … … 681 691 /** Pointer to a const IRTE. */ 682 692 typedef VTD_IRTE_T const *PCVTD_IRTE_T; 693 694 /** IRTE SVT: No validation required. */ 695 #define VTD_IRTE_SVT_NONE 0 696 /** IRTE SVT: Validate using a mask derived from SID and SQT. */ 697 #define VTD_IRTE_SVT_VALIDATE_MASK 1 698 /** IRTE SVT: Validate using Bus range in the SID. */ 699 #define VTD_IRTE_SVT_VALIDATE_BUS_RANGE 2 700 /** IRTE SVT: Reserved. */ 701 #define VTD_IRTE_SVT_VALIDATE_RSVD 3 683 702 /** @} */ 684 703 … … 1548 1567 #define VTD_IRTA_REG_RW_MASK ( VTD_BF_IRTA_REG_S_MASK | VTD_BF_IRTA_REG_EIME_MASK \ 1549 1568 | VTD_BF_IRTA_REG_IRTA_MASK) 1569 /** IRTA_REG: Get number of interrupt entries. */ 1570 #define VTD_IRTA_REG_GET_ENTRIES(a) (UINT32_C(1) << (1 + ((a) & VTD_BF_IRTA_REG_S_MASK))) 1550 1571 /** @} */ 1551 1572 … … 2205 2226 2206 2227 2228 /** @name Remappable Format Interrupt Request. 2229 * In accordance with the Intel spec. 2230 * @{ */ 2231 /** IGN: Ignored (bits 1:0). */ 2232 #define VTD_BF_REMAPPABLE_MSI_ADDR_IGN_1_0_SHIFT 0 2233 #define VTD_BF_REMAPPABLE_MSI_ADDR_IGN_1_0_MASK UINT32_C(0x00000003) 2234 /** Handle (Hi). */ 2235 #define VTD_BF_REMAPPABLE_MSI_ADDR_HANDLE_HI_SHIFT 2 2236 #define VTD_BF_REMAPPABLE_MSI_ADDR_HANDLE_HI_MASK UINT32_C(0x00000004) 2237 /** SHV: Subhandle Valid. */ 2238 #define VTD_BF_REMAPPABLE_MSI_ADDR_SHV_SHIFT 3 2239 #define VTD_BF_REMAPPABLE_MSI_ADDR_SHV_MASK UINT32_C(0x00000008) 2240 /** Interrupt format. */ 2241 #define VTD_BF_REMAPPABLE_MSI_ADDR_INTR_FMT_SHIFT 4 2242 #define VTD_BF_REMAPPABLE_MSI_ADDR_INTR_FMT_MASK UINT32_C(0x00000010) 2243 /** Handle (Lo). */ 2244 #define VTD_BF_REMAPPABLE_MSI_ADDR_HANDLE_LO_SHIFT 5 2245 #define VTD_BF_REMAPPABLE_MSI_ADDR_HANDLE_LO_MASK UINT32_C(0x000fffe0) 2246 /** Address. */ 2247 #define VTD_BF_REMAPPABLE_MSI_ADDR_ADDR_SHIFT 20 2248 #define VTD_BF_REMAPPABLE_MSI_ADDR_ADDR_MASK UINT32_C(0xfff00000) 2249 RT_BF_ASSERT_COMPILE_CHECKS(VTD_BF_REMAPPABLE_MSI_ADDR_, UINT32_C(0), UINT32_MAX, 2250 (IGN_1_0, HANDLE_HI, SHV, INTR_FMT, HANDLE_LO, ADDR)); 2251 2252 /** Subhandle. */ 2253 #define VTD_BF_REMAPPABLE_MSI_DATA_SUBHANDLE_SHIFT 0 2254 #define VTD_BF_REMAPPABLE_MSI_DATA_SUBHANDLE_MASK UINT32_C(0x0000ffff) 2255 /** R: Reserved (bits 31:16). */ 2256 #define VTD_BF_REMAPPABLE_MSI_DATA_RSVD_31_16_SHIFT 16 2257 #define VTD_BF_REMAPPABLE_MSI_DATA_RSVD_31_16_MASK UINT32_C(0xffff0000) 2258 RT_BF_ASSERT_COMPILE_CHECKS(VTD_BF_REMAPPABLE_MSI_DATA_, UINT32_C(0), UINT32_MAX, 2259 (SUBHANDLE, RSVD_31_16)); 2260 2261 /** Remappable MSI Address: Valid mask. */ 2262 #define VTD_REMAPPABLE_MSI_ADDR_VALID_MASK UINT32_MAX 2263 /** Remappable MSI Data: Valid mask. */ 2264 #define VTD_REMAPPABLE_MSI_DATA_VALID_MASK VTD_BF_REMAPPABLE_MSI_DATA_SUBHANDLE_MASK 2265 2207 2266 /** Gets the interrupt format from an MSI address. */ 2208 2267 #define VTD_MSI_ADDR_GET_INTR_FORMAT(a_uMsiAddr) ((a_uMsiAddr) & RT_BIT_64(4)) … … 2211 2270 /** Interrupt format: Remappable. */ 2212 2271 #define VTD_INTR_FORMAT_REMAPPABLE 1 2213 2214 2215 /** @name Remappable Format Interrupt Request. 2216 * In accordance with the Intel spec. 2217 * @{ */ 2218 /** IGN: Ignored (bits 1:0). */ 2219 #define VTD_BF_REMAPPABLE_IR_ADDR_IGN_1_0_SHIFT 0 2220 #define VTD_BF_REMAPPABLE_IR_ADDR_IGN_1_0_MASK UINT32_C(0x00000003) 2221 /** Handle (Hi). */ 2222 #define VTD_BF_REMAPPABLE_IR_ADDR_HANDLE_HI_SHIFT 2 2223 #define VTD_BF_REMAPPABLE_IR_ADDR_HANDLE_HI_MASK UINT32_C(0x00000004) 2224 /** SHV: Subhandle Valid. */ 2225 #define VTD_BF_REMAPPABLE_IR_ADDR_SHV_SHIFT 3 2226 #define VTD_BF_REMAPPABLE_IR_ADDR_SHV_MASK UINT32_C(0x00000008) 2227 /** Interrupt format. */ 2228 #define VTD_BF_REMAPPABLE_IR_ADDR_INTR_FMT_SHIFT 4 2229 #define VTD_BF_REMAPPABLE_IR_ADDR_INTR_FMT_MASK UINT32_C(0x00000010) 2230 /** Handle (Lo). */ 2231 #define VTD_BF_REMAPPABLE_IR_ADDR_HANDLE_LO_SHIFT 5 2232 #define VTD_BF_REMAPPABLE_IR_ADDR_HANDLE_LO_MASK UINT32_C(0x000fffe0) 2233 /** Address. */ 2234 #define VTD_BF_REMAPPABLE_IR_ADDR_ADDR_SHIFT 20 2235 #define VTD_BF_REMAPPABLE_IR_ADDR_ADDR_MASK UINT32_C(0xfff00000) 2236 RT_BF_ASSERT_COMPILE_CHECKS(VTD_BF_REMAPPABLE_IR_ADDR_, UINT32_C(0), UINT32_MAX, 2237 (IGN_1_0, HANDLE_HI, SHV, INTR_FMT, HANDLE_LO, ADDR)); 2238 2239 /** Subhandle. */ 2240 #define VTD_BF_REMAPPABLE_IR_DATA_SUBHANDLE_SHIFT 0 2241 #define VTD_BF_REMAPPABLE_IR_DATA_SUBHANDLE_MASK UINT32_C(0x0000ffff) 2242 /** R: Reserved (bits 31:16). */ 2243 #define VTD_BF_REMAPPABLE_IR_DATA_RSVD_31_16_SHIFT 16 2244 #define VTD_BF_REMAPPABLE_IR_DATA_RSVD_31_16_MASK UINT32_C(0xffff0000) 2245 RT_BF_ASSERT_COMPILE_CHECKS(VTD_BF_REMAPPABLE_IR_DATA_, UINT32_C(0), UINT32_MAX, 2246 (SUBHANDLE, RSVD_31_16)); 2272 /** @} */ 2273 2274 2275 /** @name Interrupt Remapping Fault Conditions. 2276 * In accordance with the Intel spec. 2277 * @{ */ 2278 typedef enum VTD_IR_FAULT_T 2279 { 2280 /** Reserved bits invalid in remappable interrupt. */ 2281 kIrf_Remappable_Intr_Rsvd = 0x20, 2282 /** Interrupt index for remappable interrupt exceeds table size or referenced 2283 * address above host address width (HAW) */ 2284 kIrf_Intr_Index_Invalid = 0x21, 2285 /** The IRTE is not present. */ 2286 kIrf_Irte_Not_Present = 0x22, 2287 /** Reading IRTE from memory failed. */ 2288 kIrf_Irte_Read_Failed = 0x23, 2289 /** IRTE reserved bits invalid for an IRTE with Present bit set. */ 2290 kIrf_Irte_Present_Rsvd = 0x24, 2291 /** Compatibility format interrupt (CFI) blocked due to EIME is enabled or CFIs 2292 * disabled. */ 2293 kIrf_Cfi_Blocked = 0x25, 2294 /** IRTE SID, SVT, SQ bits invalid for an IRTE with Present bit set. */ 2295 kIrf_Irte_Present_Invalid = 0x26, 2296 /** Reading posted interrupt descriptor (PID) failed. */ 2297 kIrf_Pid_Read_Failed = 0x27, 2298 /** PID reserved bits invalid. */ 2299 kIrf_Pid_Rsvd = 0x28, 2300 /** Untranslated interrupt requested (without PASID) is invalid. */ 2301 kIrf_Ir_Without_Pasid_Invalid = 0x29 2302 } VTD_IR_FAULT_T; 2247 2303 /** @} */ 2248 2304
Note:
See TracChangeset
for help on using the changeset viewer.