Changeset 89509 in vbox for trunk/src/VBox/Devices/Bus
- Timestamp:
- Jun 4, 2021 12:55:37 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevIommuIntel.cpp
r89499 r89509 1468 1468 * 1469 1469 * @param pDevIns The IOMMU device instance. 1470 * @param enmDiag The diagnostic reason.1471 1470 * @param uFrcdHi The FRCD_HI_REG value for this fault. 1472 1471 * @param uFrcdLo The FRCD_LO_REG value for this fault. 1473 1472 */ 1474 static void dmarPrimaryFaultRecord(PPDMDEVINS pDevIns, DMARDIAG enmDiag,uint64_t uFrcdHi, uint64_t uFrcdLo)1473 static void dmarPrimaryFaultRecord(PPDMDEVINS pDevIns, uint64_t uFrcdHi, uint64_t uFrcdLo) 1475 1474 { 1476 1475 PDMAR pThis = PDMDEVINS_2_DATA(pDevIns, PDMAR); … … 1478 1477 1479 1478 DMAR_LOCK(pDevIns, pThisCC); 1480 1481 /* Update the diagnostic reason. */1482 pThis->enmDiag = enmDiag;1483 1479 1484 1480 /* We don't support advance fault logging. */ … … 1513 1509 static void dmarIrFaultRecord(PPDMDEVINS pDevIns, DMARDIAG enmDiag, VTDIRFAULT enmIrFault, uint16_t idDevice, uint16_t idxIntr) 1514 1510 { 1511 /* Update the diagnostic reason. */ 1512 PDMAR pThis = PDMDEVINS_2_DATA(pDevIns, PDMAR); 1513 pThis->enmDiag = enmDiag; 1514 1515 1515 uint64_t const uFrcdHi = RT_BF_MAKE(VTD_BF_1_FRCD_REG_SID, idDevice) 1516 1516 | RT_BF_MAKE(VTD_BF_1_FRCD_REG_FR, enmIrFault) 1517 1517 | RT_BF_MAKE(VTD_BF_1_FRCD_REG_F, 1); 1518 1518 uint64_t const uFrcdLo = (uint64_t)idxIntr << 48; 1519 dmarPrimaryFaultRecord(pDevIns, enmDiag,uFrcdHi, uFrcdLo);1519 dmarPrimaryFaultRecord(pDevIns, uFrcdHi, uFrcdLo); 1520 1520 } 1521 1521 … … 1541 1541 if (!(pIrte->au64[0] & VTD_BF_0_IRTE_FPD_MASK)) 1542 1542 return dmarIrFaultRecord(pDevIns, enmDiag, enmIrFault, idDevice, idxIntr); 1543 1544 /* Update the diagnostic reason (even if software wants to supress faults). */ 1545 PDMAR pThis = PDMDEVINS_2_DATA(pDevIns, PDMAR); 1546 pThis->enmDiag = enmDiag; 1543 1547 } 1544 1548 … … 1556 1560 PCDMARMEMREQAUX pMemReqAux) 1557 1561 { 1562 /* Update the diagnostic reason (even if software wants to supress faults). */ 1563 PDMAR pThis = PDMDEVINS_2_DATA(pDevIns, PDMAR); 1564 pThis->enmDiag = enmDiag; 1565 1558 1566 /* 1559 1567 * Qualified faults are those that can be suppressed by software using the FPD bit … … 1582 1590 | RT_BF_MAKE(VTD_BF_1_FRCD_REG_F, 1); 1583 1591 uint64_t const uFrcdLo = pMemReqIn->AddrRange.uAddr & X86_PAGE_BASE_MASK; 1584 dmarPrimaryFaultRecord(pDevIns, enmDiag,uFrcdHi, uFrcdLo);1592 dmarPrimaryFaultRecord(pDevIns, uFrcdHi, uFrcdLo); 1585 1593 } 1586 1594 }
Note:
See TracChangeset
for help on using the changeset viewer.