Changeset 89236 in vbox
- Timestamp:
- May 24, 2021 9:30:08 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 144579
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/iommu-intel.h
r89235 r89236 2322 2322 * In accordance with the Intel spec. 2323 2323 * @{ */ 2324 typedef enum VTDI NTRFAULT2324 typedef enum VTDIRFAULT 2325 2325 { 2326 2326 /** Reserved bits invalid in remappable interrupt. */ 2327 VTDINTRFAULT_REMAPPABLE_INTR_RSVD = 0x20, 2327 VTDIRFAULT_REMAPPABLE_INTR_RSVD = 0x20, 2328 2328 2329 /** Interrupt index for remappable interrupt exceeds table size or referenced 2329 2330 * address above host address width (HAW) */ 2330 VTDINTRFAULT_INTR_INDEX_INVALID = 0x21, 2331 VTDIRFAULT_INTR_INDEX_INVALID = 0x21, 2332 2331 2333 /** The IRTE is not present. */ 2332 VTDI NTRFAULT_IRTE_NOT_PRESENT = 0x22,2334 VTDIRFAULT_IRTE_NOT_PRESENT = 0x22, 2333 2335 /** Reading IRTE from memory failed. */ 2334 VTDI NTRFAULT_IRTE_READ_FAILED = 0x23,2336 VTDIRFAULT_IRTE_READ_FAILED = 0x23, 2335 2337 /** IRTE reserved bits invalid for an IRTE with Present bit set. */ 2336 VTDINTRFAULT_IRTE_PRESENT_RSVD = 0x24, 2338 VTDIRFAULT_IRTE_PRESENT_RSVD = 0x24, 2339 2337 2340 /** Compatibility format interrupt (CFI) blocked due to EIME being enabled or CFIs 2338 2341 * were disabled. */ 2339 VTDINTRFAULT_CFI_BLOCKED = 0x25, 2342 VTDIRFAULT_CFI_BLOCKED = 0x25, 2343 2340 2344 /** IRTE SID, SVT, SQ bits invalid for an IRTE with Present bit set. */ 2341 VTDINTRFAULT_IRTE_PRESENT_INVALID = 0x26, 2345 VTDIRFAULT_IRTE_PRESENT_INVALID = 0x26, 2346 2342 2347 /** Reading posted interrupt descriptor (PID) failed. */ 2343 VTDI NTRFAULT_PID_READ_FAILED = 0x27,2348 VTDIRFAULT_PID_READ_FAILED = 0x27, 2344 2349 /** PID reserved bits invalid. */ 2345 VTDINTRFAULT_PID_RSVD = 0x28, 2350 VTDIRFAULT_PID_RSVD = 0x28, 2351 2346 2352 /** Untranslated interrupt requested (without PASID) is invalid. */ 2347 VTDI NTRFAULT_IR_WITHOUT_PASID_INVALID = 0x292348 } VTDI NTRFAULT;2349 AssertCompileSize(VTDI NTRFAULT, 4);2353 VTDIRFAULT_IR_WITHOUT_PASID_INVALID = 0x29 2354 } VTDIRFAULT; 2355 AssertCompileSize(VTDIRFAULT, 4); 2350 2356 /** @} */ 2351 2357 … … 2354 2360 * In accordance with the Intel spec. 2355 2361 * @{ */ 2356 typedef enum VTDA DDRFAULT2362 typedef enum VTDATFAULT 2357 2363 { 2358 2364 /* Legacy root table faults (LRT). */ 2359 VTDA DDRFAULT_LRT_1 = 0x8,2360 VTDA DDRFAULT_LRT_2 = 0x1,2361 VTDA DDRFAULT_LRT_3 = 0xa,2365 VTDATFAULT_LRT_1 = 0x8, 2366 VTDATFAULT_LRT_2 = 0x1, 2367 VTDATFAULT_LRT_3 = 0xa, 2362 2368 2363 2369 /* Legacy Context-Table Faults (LCT). */ 2364 VTDA DDRFAULT_LCT_1 = 0x9,2365 VTDA DDRFAULT_LCT_2 = 0x2,2366 VTDA DDRFAULT_LCT_3 = 0xb,2367 VTDA DDRFAULT_LCT_4_0 = 0x3,2368 VTDA DDRFAULT_LCT_4_1 = 0x3,2369 VTDA DDRFAULT_LCT_4_2 = 0x3,2370 VTDA DDRFAULT_LCT_4_3 = 0x3,2371 VTDA DDRFAULT_LCT_5 = 0xd,2370 VTDATFAULT_LCT_1 = 0x9, 2371 VTDATFAULT_LCT_2 = 0x2, 2372 VTDATFAULT_LCT_3 = 0xb, 2373 VTDATFAULT_LCT_4_0 = 0x3, 2374 VTDATFAULT_LCT_4_1 = 0x3, 2375 VTDATFAULT_LCT_4_2 = 0x3, 2376 VTDATFAULT_LCT_4_3 = 0x3, 2377 VTDATFAULT_LCT_5 = 0xd, 2372 2378 2373 2379 /* Legacy Second-Level Table Faults (LSL). */ 2374 VTDA DDRFAULT_LSL_1 = 0x7,2375 VTDA DDRFAULT_LSL_2 = 0xc,2380 VTDATFAULT_LSL_1 = 0x7, 2381 VTDATFAULT_LSL_2 = 0xc, 2376 2382 2377 2383 /* Legacy General Faults (LGN). */ 2378 VTDA DDRFAULT_LGN_1_0 = 0x4,2379 VTDA DDRFAULT_LGN_1_1 = 0x4,2380 VTDA DDRFAULT_LGN_1_2 = 0x4,2381 VTDA DDRFAULT_LGN_1_3 = 0x4,2382 VTDA DDRFAULT_LGN_2 = 0x5,2383 VTDA DDRFAULT_LGN_3 = 0x6,2384 VTDA DDRFAULT_LGN_4 = 0xe,2384 VTDATFAULT_LGN_1_0 = 0x4, 2385 VTDATFAULT_LGN_1_1 = 0x4, 2386 VTDATFAULT_LGN_1_2 = 0x4, 2387 VTDATFAULT_LGN_1_3 = 0x4, 2388 VTDATFAULT_LGN_2 = 0x5, 2389 VTDATFAULT_LGN_3 = 0x6, 2390 VTDATFAULT_LGN_4 = 0xe, 2385 2391 2386 2392 /* Root-Table Address Register Faults (RTA). */ 2387 VTDA DDRFAULT_RTA_1_0 = 0x30,2388 VTDA DDRFAULT_RTA_1_1 = 0x30,2389 VTDA DDRFAULT_RTA_1_2 = 0x30,2390 VTDA DDRFAULT_RTA_1_3 = 0x30,2391 VTDA DDRFAULT_RTA_2 = 0x31,2392 VTDA DDRFAULT_RTA_3 = 0x32,2393 VTDA DDRFAULT_RTA_4 = 0x33,2393 VTDATFAULT_RTA_1_0 = 0x30, 2394 VTDATFAULT_RTA_1_1 = 0x30, 2395 VTDATFAULT_RTA_1_2 = 0x30, 2396 VTDATFAULT_RTA_1_3 = 0x30, 2397 VTDATFAULT_RTA_2 = 0x31, 2398 VTDATFAULT_RTA_3 = 0x32, 2399 VTDATFAULT_RTA_4 = 0x33, 2394 2400 2395 2401 /* Scalable-Mode Root-Table Faults (SRT). */ 2396 VTDA DDRFAULT_SRT_1 = 0x38,2397 VTDA DDRFAULT_SRT_2 = 0x39,2398 VTDA DDRFAULT_SRT_3 = 0x3a,2402 VTDATFAULT_SRT_1 = 0x38, 2403 VTDATFAULT_SRT_2 = 0x39, 2404 VTDATFAULT_SRT_3 = 0x3a, 2399 2405 2400 2406 /* Scalable-Mode Context-Table Faults (SCT). */ 2401 VTDA DDRFAULT_SCT_1 = 0x40,2402 VTDA DDRFAULT_SCT_2 = 0x41,2403 VTDA DDRFAULT_SCT_3 = 0x42,2404 VTDA DDRFAULT_SCT_4_0 = 0x43,2405 VTDA DDRFAULT_SCT_4_1 = 0x43,2406 VTDA DDRFAULT_SCT_4_2 = 0x43,2407 VTDA DDRFAULT_SCT_5 = 0x44,2408 VTDA DDRFAULT_SCT_6 = 0x45,2409 VTDA DDRFAULT_SCT_7 = 0x46,2410 VTDA DDRFAULT_SCT_8 = 0x47,2411 VTDA DDRFAULT_SCT_9 = 0x48,2407 VTDATFAULT_SCT_1 = 0x40, 2408 VTDATFAULT_SCT_2 = 0x41, 2409 VTDATFAULT_SCT_3 = 0x42, 2410 VTDATFAULT_SCT_4_0 = 0x43, 2411 VTDATFAULT_SCT_4_1 = 0x43, 2412 VTDATFAULT_SCT_4_2 = 0x43, 2413 VTDATFAULT_SCT_5 = 0x44, 2414 VTDATFAULT_SCT_6 = 0x45, 2415 VTDATFAULT_SCT_7 = 0x46, 2416 VTDATFAULT_SCT_8 = 0x47, 2417 VTDATFAULT_SCT_9 = 0x48, 2412 2418 2413 2419 /* Scalable-Mode PASID-Directory Faults (SPD). */ 2414 VTDA DDRFAULT_SPD_1 = 0x50,2415 VTDA DDRFAULT_SPD_2 = 0x51,2416 VTDA DDRFAULT_SPD_3 = 0x52,2420 VTDATFAULT_SPD_1 = 0x50, 2421 VTDATFAULT_SPD_2 = 0x51, 2422 VTDATFAULT_SPD_3 = 0x52, 2417 2423 2418 2424 /* Scalable-Mode PASID-Table Faults (SPT). */ 2419 VTDA DDRFAULT_SPT_1 = 0x58,2420 VTDA DDRFAULT_SPT_2 = 0x59,2421 VTDA DDRFAULT_SPT_3 = 0x5a,2422 VTDA DDRFAULT_SPT_4_0 = 0x5b,2423 VTDA DDRFAULT_SPT_4_1 = 0x5b,2424 VTDA DDRFAULT_SPT_4_2 = 0x5b,2425 VTDA DDRFAULT_SPT_4_3 = 0x5b,2426 VTDA DDRFAULT_SPT_4_4 = 0x5b,2427 VTDA DDRFAULT_SPT_5 = 0x5c,2428 VTDA DDRFAULT_SPT_6 = 0x5d,2425 VTDATFAULT_SPT_1 = 0x58, 2426 VTDATFAULT_SPT_2 = 0x59, 2427 VTDATFAULT_SPT_3 = 0x5a, 2428 VTDATFAULT_SPT_4_0 = 0x5b, 2429 VTDATFAULT_SPT_4_1 = 0x5b, 2430 VTDATFAULT_SPT_4_2 = 0x5b, 2431 VTDATFAULT_SPT_4_3 = 0x5b, 2432 VTDATFAULT_SPT_4_4 = 0x5b, 2433 VTDATFAULT_SPT_5 = 0x5c, 2434 VTDATFAULT_SPT_6 = 0x5d, 2429 2435 2430 2436 /* Scalable-Mode First-Level Table Faults (SFL). */ 2431 VTDA DDRFAULT_SFL_1 = 0x70,2432 VTDA DDRFAULT_SFL_2 = 0x71,2433 VTDA DDRFAULT_SFL_3 = 0x72,2434 VTDA DDRFAULT_SFL_4 = 0x73,2435 VTDA DDRFAULT_SFL_5 = 0x74,2436 VTDA DDRFAULT_SFL_6 = 0x75,2437 VTDA DDRFAULT_SFL_7 = 0x76,2438 VTDA DDRFAULT_SFL_8 = 0x77,2439 VTDA DDRFAULT_SFL_9 = 0x90,2440 VTDA DDRFAULT_SFL_10 = 0x91,2437 VTDATFAULT_SFL_1 = 0x70, 2438 VTDATFAULT_SFL_2 = 0x71, 2439 VTDATFAULT_SFL_3 = 0x72, 2440 VTDATFAULT_SFL_4 = 0x73, 2441 VTDATFAULT_SFL_5 = 0x74, 2442 VTDATFAULT_SFL_6 = 0x75, 2443 VTDATFAULT_SFL_7 = 0x76, 2444 VTDATFAULT_SFL_8 = 0x77, 2445 VTDATFAULT_SFL_9 = 0x90, 2446 VTDATFAULT_SFL_10 = 0x91, 2441 2447 2442 2448 /* Scalable-Mode Second-Level Table Faults (SSL). */ 2443 VTDA DDRFAULT_SSL_1 = 0x78,2444 VTDA DDRFAULT_SSL_2 = 0x79,2445 VTDA DDRFAULT_SSL_3 = 0x7a,2446 VTDA DDRFAULT_SSL_4 = 0x7b,2447 VTDA DDRFAULT_SSL_5 = 0x7c,2448 VTDA DDRFAULT_SSL_6 = 0x7d,2449 VTDATFAULT_SSL_1 = 0x78, 2450 VTDATFAULT_SSL_2 = 0x79, 2451 VTDATFAULT_SSL_3 = 0x7a, 2452 VTDATFAULT_SSL_4 = 0x7b, 2453 VTDATFAULT_SSL_5 = 0x7c, 2454 VTDATFAULT_SSL_6 = 0x7d, 2449 2455 2450 2456 /* Scalable-Mode General Faults (SGN). */ 2451 VTDA DDRFAULT_SGN_1 = 0x80,2452 VTDA DDRFAULT_SGN_2 = 0x81,2453 VTDA DDRFAULT_SGN_3 = 0x82,2454 VTDA DDRFAULT_SGN_4_0 = 0x83,2455 VTDA DDRFAULT_SGN_4_1 = 0x83,2456 VTDA DDRFAULT_SGN_4_2 = 0x83,2457 VTDA DDRFAULT_SGN_5 = 0x84,2458 VTDA DDRFAULT_SGN_6 = 0x85,2459 VTDA DDRFAULT_SGN_7 = 0x86,2460 VTDA DDRFAULT_SGN_8 = 0x87,2461 VTDA DDRFAULT_SGN_9 = 0x88,2462 VTDA DDRFAULT_SGN_10 = 0x892463 } VTDA DDRFAULT;2464 AssertCompileSize(VTDA DDRFAULT, 4);2457 VTDATFAULT_SGN_1 = 0x80, 2458 VTDATFAULT_SGN_2 = 0x81, 2459 VTDATFAULT_SGN_3 = 0x82, 2460 VTDATFAULT_SGN_4_0 = 0x83, 2461 VTDATFAULT_SGN_4_1 = 0x83, 2462 VTDATFAULT_SGN_4_2 = 0x83, 2463 VTDATFAULT_SGN_5 = 0x84, 2464 VTDATFAULT_SGN_6 = 0x85, 2465 VTDATFAULT_SGN_7 = 0x86, 2466 VTDATFAULT_SGN_8 = 0x87, 2467 VTDATFAULT_SGN_9 = 0x88, 2468 VTDATFAULT_SGN_10 = 0x89 2469 } VTDATFAULT; 2470 AssertCompileSize(VTDATFAULT, 4); 2465 2471 /** @} */ 2466 2472 -
trunk/src/VBox/Devices/Bus/DevIommuIntel.cpp
r89235 r89236 684 684 * 685 685 * @returns @c true if qualified, @c false otherwise. 686 * @param enmI ntrFaultThe interrupt remapping fault condition.687 */ 688 static bool vtdIrFaultIsQualified(VTDI NTRFAULT enmIntrFault)689 { 690 switch (enmI ntrFault)691 { 692 case VTDI NTRFAULT_IRTE_NOT_PRESENT:693 case VTDI NTRFAULT_IRTE_PRESENT_RSVD:694 case VTDI NTRFAULT_IRTE_PRESENT_INVALID:695 case VTDI NTRFAULT_PID_READ_FAILED:696 case VTDI NTRFAULT_PID_RSVD:686 * @param enmIrFault The interrupt remapping fault condition. 687 */ 688 static bool vtdIrFaultIsQualified(VTDIRFAULT enmIrFault) 689 { 690 switch (enmIrFault) 691 { 692 case VTDIRFAULT_IRTE_NOT_PRESENT: 693 case VTDIRFAULT_IRTE_PRESENT_RSVD: 694 case VTDIRFAULT_IRTE_PRESENT_INVALID: 695 case VTDIRFAULT_PID_READ_FAILED: 696 case VTDIRFAULT_PID_RSVD: 697 697 return true; 698 698 default: … … 1302 1302 * @param pDevIns The IOMMU device instance. 1303 1303 * @param enmDiag The diagnostic reason. 1304 * @param enmI ntrFault The interrupt fault reason.1304 * @param enmIrFault The interrupt fault reason. 1305 1305 * @param idDevice The device ID (bus, device, function). 1306 1306 * @param idxIntr The interrupt index. 1307 1307 */ 1308 static void dmarIntrFaultRecord(PPDMDEVINS pDevIns, DMARDIAG enmDiag, VTDINTRFAULT enmIntrFault, uint16_t idDevice, 1309 uint16_t idxIntr) 1308 static void dmarIrFaultRecord(PPDMDEVINS pDevIns, DMARDIAG enmDiag, VTDIRFAULT enmIrFault, uint16_t idDevice, uint16_t idxIntr) 1310 1309 { 1311 1310 uint64_t const uFrcdHi = RT_BF_MAKE(VTD_BF_1_FRCD_REG_SID, idDevice) 1312 | RT_BF_MAKE(VTD_BF_1_FRCD_REG_FR, enmI ntrFault)1311 | RT_BF_MAKE(VTD_BF_1_FRCD_REG_FR, enmIrFault) 1313 1312 | RT_BF_MAKE(VTD_BF_1_FRCD_REG_F, 1); 1314 1313 uint64_t const uFrcdLo = (uint64_t)idxIntr << 48; … … 1325 1324 * @param pDevIns The IOMMU device instance. 1326 1325 * @param enmDiag The diagnostic reason. 1327 * @param enmI ntrFault The interrupt fault reason.1326 * @param enmIrFault The interrupt fault reason. 1328 1327 * @param idDevice The device ID (bus, device, function). 1329 1328 * @param idxIntr The interrupt index. 1330 1329 * @param pIrte The IRTE that caused this fault. 1331 1330 */ 1332 static void dmarI ntrFaultRecordQualified(PPDMDEVINS pDevIns, DMARDIAG enmDiag, VTDINTRFAULT enmIntrFault, uint16_t idDevice,1333 1334 { 1335 Assert(vtdIrFaultIsQualified(enmI ntrFault));1331 static void dmarIrFaultRecordQualified(PPDMDEVINS pDevIns, DMARDIAG enmDiag, VTDIRFAULT enmIrFault, uint16_t idDevice, 1332 uint16_t idxIntr, PCVTD_IRTE_T pIrte) 1333 { 1334 Assert(vtdIrFaultIsQualified(enmIrFault)); 1336 1335 Assert(pIrte); 1337 1336 if (!(pIrte->au64[0] & VTD_BF_0_IRTE_FPD_MASK)) 1338 return dmarI ntrFaultRecord(pDevIns, enmDiag, enmIntrFault, idDevice, idxIntr);1337 return dmarIrFaultRecord(pDevIns, enmDiag, enmIrFault, idDevice, idxIntr); 1339 1338 } 1340 1339 … … 1343 1342 * Records an address translation fault (extensive version). 1344 1343 * 1345 * @param pDevIns The IOMMU device instance. 1346 * @param enmDiag The diagnostic reason. 1347 * @param enmAddrFault The address translation fault reason. 1348 * @param idDevice The device ID (bus, device, function). 1349 * @param uFaultAddr The page address of the faulted request. 1350 * @param enmReqType The type of the faulted request. 1351 * @param uAddrType The address type of the faulted request (only applicable 1352 * when device-TLB is supported). 1353 * @param fHasPasid Whether the faulted request has a PASID TLP prefix. 1354 * @param uPasid The PASID value when a PASID TLP prefix is present. 1355 * @param fReqAttr The attributes of the faulted requested 1356 * (VTD_REQ_ATTR_XXX). 1357 */ 1358 static void dmarAddrFaultRecordEx(PPDMDEVINS pDevIns, DMARDIAG enmDiag, VTDADDRFAULT enmAddrFault, uint16_t idDevice, 1359 uint64_t uFaultAddr, VTDREQTYPE enmReqType, uint8_t uAddrType, bool fHasPasid, uint32_t uPasid, 1360 uint8_t fReqAttr) 1344 * @param pDevIns The IOMMU device instance. 1345 * @param enmDiag The diagnostic reason. 1346 * @param enmAtFault The address translation fault reason. 1347 * @param idDevice The device ID (bus, device, function). 1348 * @param uFaultAddr The page address of the faulted request. 1349 * @param enmReqType The type of the faulted request. 1350 * @param uAddrType The address type of the faulted request (only applicable 1351 * when device-TLB is supported). 1352 * @param fHasPasid Whether the faulted request has a PASID TLP prefix. 1353 * @param uPasid The PASID value when a PASID TLP prefix is present. 1354 * @param fReqAttr The attributes of the faulted requested (VTD_REQ_ATTR_XXX). 1355 */ 1356 static void dmarAtFaultRecordEx(PPDMDEVINS pDevIns, DMARDIAG enmDiag, VTDATFAULT enmAtFault, uint16_t idDevice, 1357 uint64_t uFaultAddr, VTDREQTYPE enmReqType, uint8_t uAddrType, bool fHasPasid, uint32_t uPasid, 1358 uint8_t fReqAttr) 1361 1359 { 1362 1360 uint8_t const fType1 = enmReqType & RT_BIT(1); … … 1369 1367 | RT_BF_MAKE(VTD_BF_1_FRCD_REG_EXE, fExec) 1370 1368 | RT_BF_MAKE(VTD_BF_1_FRCD_REG_PRIV, fPriv) 1371 | RT_BF_MAKE(VTD_BF_1_FRCD_REG_FR, enmA ddrFault)1369 | RT_BF_MAKE(VTD_BF_1_FRCD_REG_FR, enmAtFault) 1372 1370 | RT_BF_MAKE(VTD_BF_1_FRCD_REG_PV, uPasid) 1373 1371 | RT_BF_MAKE(VTD_BF_1_FRCD_REG_AT, uAddrType) … … 1385 1383 * where the device-TLB and PASID is not relevant/present. 1386 1384 * 1387 * @param pDevIns 1388 * @param enmDiag 1389 * @param enmA ddrFaultThe address translation fault reason.1390 * @param idDevice 1391 * @param uFaultAddr 1392 * @param enmReqType 1393 */ 1394 static void dmarA ddrFaultRecord(PPDMDEVINS pDevIns, DMARDIAG enmDiag, VTDADDRFAULT enmAddrFault, uint16_t idDevice,1395 1396 { 1397 dmarA ddrFaultRecordEx(pDevIns, enmDiag, enmAddrFault, idDevice, uFaultAddr, enmReqType, 0 /* uAddrType */,1385 * @param pDevIns The IOMMU device instance. 1386 * @param enmDiag The diagnostic reason. 1387 * @param enmAtFault The address translation fault reason. 1388 * @param idDevice The device ID (bus, device, function). 1389 * @param uFaultAddr The page address of the faulted request. 1390 * @param enmReqType The type of the faulted request. 1391 */ 1392 static void dmarAtFaultRecord(PPDMDEVINS pDevIns, DMARDIAG enmDiag, VTDATFAULT enmAtFault, uint16_t idDevice, 1393 uint64_t uFaultAddr, VTDREQTYPE enmReqType) 1394 { 1395 dmarAtFaultRecordEx(pDevIns, enmDiag, enmAtFault, idDevice, uFaultAddr, enmReqType, 0 /* uAddrType */, 1398 1396 false /* fHasPasid */, 0 /* uPasid */, 0 /* fReqAttr */); 1399 1397 } … … 1754 1752 1755 1753 /** 1756 * Performs a PCI target abort for a DMA operation.1754 * Performs a PCI target abort for a DMA remapping operation. 1757 1755 * 1758 1756 * @param pDevIns The IOMMU device instance. 1759 1757 */ 1760 static void dmarD maTargetAbort(PPDMDEVINS pDevIns)1758 static void dmarDrTargetAbort(PPDMDEVINS pDevIns) 1761 1759 { 1762 1760 /** @todo r=ramshankar: I don't know for sure if a PCI target abort is caused or not … … 1770 1768 1771 1769 /** 1772 * Validates the table translation mode for a DMA re quest.1770 * Validates the table translation mode for a DMA remapping operation. 1773 1771 * 1774 1772 * @returns @c true if the TTM is valid, @c false otherwise. … … 1779 1777 * @param enmReqType The type of the request (for fault recording). 1780 1778 */ 1781 static bool dmarD maIsTtmValid(PPDMDEVINS pDevIns, uint64_t uRtaddrReg, uint16_t idDevice, uint64_t uIova, VTDREQTYPE enmReqType)1779 static bool dmarDrIsTtmValid(PPDMDEVINS pDevIns, uint64_t uRtaddrReg, uint16_t idDevice, uint64_t uIova, VTDREQTYPE enmReqType) 1782 1780 { 1783 1781 bool fValid = true; … … 1793 1791 if (pThis->fExtCapReg & VTD_BF_ECAP_REG_SMTS_MASK) 1794 1792 break; 1795 dmarA ddrFaultRecord(pDevIns, kDmarDiag_Atf_Rta_1_3, VTDADDRFAULT_RTA_1_3, idDevice, uIova, enmReqType);1793 dmarAtFaultRecord(pDevIns, kDmarDiag_Atf_Rta_1_3, VTDATFAULT_RTA_1_3, idDevice, uIova, enmReqType); 1796 1794 fValid = false; 1797 1795 break; … … 1801 1799 { 1802 1800 if (pThis->fExtCapReg & VTD_BF_ECAP_REG_ADMS_MASK) 1803 dmarD maTargetAbort(pDevIns);1801 dmarDrTargetAbort(pDevIns); 1804 1802 else 1805 dmarA ddrFaultRecord(pDevIns, kDmarDiag_Atf_Rta_1_1, VTDADDRFAULT_RTA_1_1, idDevice, uIova, enmReqType);1803 dmarAtFaultRecord(pDevIns, kDmarDiag_Atf_Rta_1_1, VTDATFAULT_RTA_1_1, idDevice, uIova, enmReqType); 1806 1804 fValid = false; 1807 1805 break; … … 1810 1808 default: 1811 1809 { 1812 dmarA ddrFaultRecord(pDevIns, kDmarDiag_Atf_Rta_1_2, VTDADDRFAULT_RTA_1_2, idDevice, uIova, enmReqType);1810 dmarAtFaultRecord(pDevIns, kDmarDiag_Atf_Rta_1_2, VTDATFAULT_RTA_1_2, idDevice, uIova, enmReqType); 1813 1811 fValid = false; 1814 1812 break; … … 1887 1885 } 1888 1886 1889 bool fTtmValid = dmarDmaIsTtmValid(pDevIns, uRtaddrReg, idDevice, uIova, enmReqType);1887 bool const fTtmValid = dmarDrIsTtmValid(pDevIns, uRtaddrReg, idDevice, uIova, enmReqType); 1890 1888 if (!fTtmValid) 1891 1889 return VERR_IOMMU_ADDR_TRANSLATION_FAILED; … … 2064 2062 return VINF_SUCCESS; 2065 2063 } 2066 dmarI ntrFaultRecordQualified(pDevIns, kDmarDiag_Ir_Rfi_Irte_Mode_Invalid,2067 VTDI NTRFAULT_IRTE_PRESENT_RSVD, idDevice, idxIntr, &Irte);2064 dmarIrFaultRecordQualified(pDevIns, kDmarDiag_Ir_Rfi_Irte_Mode_Invalid, 2065 VTDIRFAULT_IRTE_PRESENT_RSVD, idDevice, idxIntr, &Irte); 2068 2066 } 2069 2067 else 2070 dmarI ntrFaultRecordQualified(pDevIns, enmIrDiag, VTDINTRFAULT_IRTE_PRESENT_RSVD, idDevice, idxIntr,2068 dmarIrFaultRecordQualified(pDevIns, enmIrDiag, VTDIRFAULT_IRTE_PRESENT_RSVD, idDevice, idxIntr, 2071 2069 &Irte); 2072 2070 } 2073 2071 else 2074 dmarI ntrFaultRecordQualified(pDevIns, kDmarDiag_Ir_Rfi_Irte_Rsvd, VTDINTRFAULT_IRTE_PRESENT_RSVD,2072 dmarIrFaultRecordQualified(pDevIns, kDmarDiag_Ir_Rfi_Irte_Rsvd, VTDIRFAULT_IRTE_PRESENT_RSVD, 2075 2073 idDevice, idxIntr, &Irte); 2076 2074 } 2077 2075 else 2078 dmarI ntrFaultRecordQualified(pDevIns, kDmarDiag_Ir_Rfi_Irte_Not_Present, VTDINTRFAULT_IRTE_NOT_PRESENT,2076 dmarIrFaultRecordQualified(pDevIns, kDmarDiag_Ir_Rfi_Irte_Not_Present, VTDIRFAULT_IRTE_NOT_PRESENT, 2079 2077 idDevice, idxIntr, &Irte); 2080 2078 } 2081 2079 else 2082 dmarI ntrFaultRecord(pDevIns, kDmarDiag_Ir_Rfi_Irte_Read_Failed, VTDINTRFAULT_IRTE_READ_FAILED, idDevice, idxIntr);2080 dmarIrFaultRecord(pDevIns, kDmarDiag_Ir_Rfi_Irte_Read_Failed, VTDIRFAULT_IRTE_READ_FAILED, idDevice, idxIntr); 2083 2081 } 2084 2082 else 2085 dmarI ntrFaultRecord(pDevIns, kDmarDiag_Ir_Rfi_Intr_Index_Invalid, VTDINTRFAULT_INTR_INDEX_INVALID, idDevice, idxIntr);2083 dmarIrFaultRecord(pDevIns, kDmarDiag_Ir_Rfi_Intr_Index_Invalid, VTDIRFAULT_INTR_INDEX_INVALID, idDevice, idxIntr); 2086 2084 } 2087 2085 else 2088 dmarI ntrFaultRecord(pDevIns, kDmarDiag_Ir_Rfi_Rsvd, VTDINTRFAULT_REMAPPABLE_INTR_RSVD, idDevice, 0 /* idxIntr */);2086 dmarIrFaultRecord(pDevIns, kDmarDiag_Ir_Rfi_Rsvd, VTDIRFAULT_REMAPPABLE_INTR_RSVD, idDevice, 0 /* idxIntr */); 2089 2087 return VERR_IOMMU_INTR_REMAP_DENIED; 2090 2088 } … … 2130 2128 || !(uGstsReg & VTD_BF_GSTS_REG_CFIS_MASK)) 2131 2129 { 2132 dmarI ntrFaultRecord(pDevIns, kDmarDiag_Ir_Cfi_Blocked, VTDINTRFAULT_CFI_BLOCKED, idDevice, 0 /* idxIntr */);2130 dmarIrFaultRecord(pDevIns, kDmarDiag_Ir_Cfi_Blocked, VTDIRFAULT_CFI_BLOCKED, idDevice, 0 /* idxIntr */); 2133 2131 return VERR_IOMMU_INTR_REMAP_DENIED; 2134 2132 }
Note:
See TracChangeset
for help on using the changeset viewer.