riscv-non-isa / riscv-iommu

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

iommu_translate_iova function may return the incorrect rsp_msg->trsp.is_msi when IOATC_HIT #357

Closed francis4096 closed 5 months ago

francis4096 commented 5 months ago

Hi,

https://github.com/riscv-non-isa/riscv-iommu/blob/dc44293bf52c6b6140c7253ffc8b87165fb13bc2/iommu_ref_model/libiommu/src/iommu_translate.c#L283C5-L283C51

When IOATC_HIT, the "is_msi" is not initialized. but line 365 return it to rsp_msg->trsp.is_msi.

ved-rivos commented 5 months ago

Thanks for reporting this. The ATC should cache is_msi unless is_mrif is also 1. Updated in #358