riscv-non-isa / riscv-iommu

RISC-V IOMMU Specification
https://jira.riscv.org/browse/RVG-55
Creative Commons Attribution 4.0 International
85 stars 17 forks source link

Does IOMMU need to check the EN_ATS for ATS Invalidation Completion? #395

Closed wangyongzhen0322 closed 1 month ago

wangyongzhen0322 commented 1 month ago

Is it possible that software send a ATS INVAL command whose EN_ATS is 0? And if it is possible,I think IOMMU needs to check the EN_ATS about the ATS Invalidation Completion.

ved-rivos commented 1 month ago

The IOMMU processes invalidation completions only if there is an outstanding invalidation being tracked by the IOMMU i.e. software has submitted a invalidation request. Each invalidation request has a invalidation tag (ITAG) and a device may generate as many invalidation completions as the number of Traffic Classes (TCs) it may have used. The IOMMU tracks the pending invalidations using a tracker indexed by ITAG and DID . If a completion is received for which there is no outstanding invalidation then they are discarded as unsupported requests. There is no need to check EN_ATS for this action as the IOMMU does not accept completions from sources to which software did not explicitly send an invalidation request.

wangyongzhen0322 commented 1 month ago

I see. Thanks for your answer.