Closed baimengwei closed 1 month ago
The ability to support wire-signaled-interrupts is determined by the WARL field - fctl.WSI
. If the IOMMU does not support wire-signaled-interrupts then this bit is hardwired to 0.
The DID field of the IODIR command must not be wider than that supported by the IOMMU. It is not about the current mode. When the IOMMU mode is changed, the IOMMU does not invalidate the DDT or PDT cache. However, invalidating the DDT or PDT cache can be performed using IODIR as long as the device ID width is a supported device ID width.
A command is unsupported if it is defined but not implemented as determined by the IOMMU capabilities register.
This statement is about the command itself. The first statement of that paragraph applies to commands that are implemented: "A command is determined to be illegal if it uses a reserved encoding or if a reserved bit is set to 1."
Get it. Thanks a lot.
https://github.com/riscv-non-isa/riscv-iommu/blob/main/src/iommu_in_memory_queues.adoc#command-queue-cq
In the c model, if a iofence.c command is send, but the
g_reg_file.fctl.wsi == 0 && command.iofence.wsi == 1
is meet the condition, the command will be illegal. However, it is not involved in a judgement aboutIOMMU capabilities register
.https://github.com/riscv-non-isa/riscv-iommu/blob/main/iommu_ref_model/libiommu/src/iommu_command_queue.c#L160
If a iodir command is send, but command illegal judgement is not involved in ddtp.iommu_mode, which might cause a unexpect condition. This is also not involved in a judgement about
IOMMU capabilities register
. And c model use a g_max_devid_mask to instead.https://github.com/riscv-non-isa/riscv-iommu/blob/main/iommu_ref_model/libiommu/src/iommu_command_queue.c#L114
So. Is the ftcl should not involved in judgement? Or is the ddtp.iommu_mode should involved in judgement?
Thanks.