Closed zetalog closed 6 months ago
In DTI-ATS checker, 257/258/259 fault reasons will lead to CA rather than UR. The rule is:
A checker written to this IOMMU specification should look for a UR response. Using a checker for a non RISC-V IOMMU - ARM/IBM/Intel/AMD/etc. IOMMU - with a RISC-V IOMMU will likely lead to unexpected results.
OK, so if you are sure the IOMMU fault type definitions are stable and won't affect the applicable ecosystem, we'll follow. Thanks for the response.
Another ATS compatibility issue is observed for the DTI-ATS "FAULT_TYPE" field:
DTI-ATS fault type
FAULT_TYPE: 00 InvalidTranslation 01 CompleterAbort 10 UnsupportedRequest 11 Reserved ... When the value of this field is CompleterAbort, this field indicates that there was an error during the translation process. The DTI master returns a Translation Completion message with the status value as CompleterAbort (CA). When the value of this field is UnsupportedRequest, this field indicates that ATS is disabled for this or all StreamIDs. The DTI master returns a Translation Completion message with a status value as UnsupportedRequest (UR).
SMMUv3 F_BAD_ATS_TREQ
And DTI-ATS follows ARM SMMUv3 specification, for UR FAULT_TYPE, the specification mentions it is related to the F_BAD_ATS_TREQ, which denotes:
Reported in response to an ATS Translation Request in any of the following conditions:
RISCV Unsupported Request (UR) causes
The incompatibility is then observed for the DTI-ATS checker developed based on the ARM DTI-ATS behavior for the FAULT_TYPE field as RISCV IOMMU specification mentions following UR result:
If there is a permanent error or if ATS transactions are disabled then an Unsupported Request (UR) response is generated. The following cause codes belong to this category: • All inbound transactions disallowed (cause = 256) • DDT entry load access fault (cause = 257) • DDT entry not valid (cause = 258) • DDT entry misconfigured (cause = 259) • Transaction type disallowed (cause = 260)
Incompatibility observed
In DTI-ATS checker, 257/258/259 fault reasons will lead to CA rather than UR. The rule is:
RISCV IOMMU specification 2.1.3. also mentions UR is related to EN_ATS=0 which is DTI-ATS compliant. This actually can be interpreted as a specification ambiguity. This ambiguity leads to the following confusing hardware behaviors, affecting the software programming models:
As such, IMO, we may solve this specification ambiguity due to the following reasons: