-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarification related to the reference model EXE/PRIV enforcements #302
Comments
Could you please explain more about the clarification sought? |
For example, adding words stating the following is an implication in the PCIe scenario:
And adds special condition in the reference model around the logic indicating it is only used for non-PCIe address translation.
Emm, I couldn't see such enforcement in other IOMMU implementations:
This looks a kind of DMA master side business rather than IOMMU internal. |
When
The quoted code indicates that the transaction is not a PCIe ATS translation request but that does not imply it is only used for non-PCIE address translation. There are 10 types of transactions in the architecture - see |
For non-PCIe ATS translation requests, for example, a generic DMA master with ARM SMMU TBU remapping configured should be able to control PID and PRIV when PV = 0. It can choose to wire PID/PRIV to 0 when PV is 0.
"For requests without a process_id the privilege mode must be User." by IOMMU (section 1.3).
Unlike PCIe which is constrained by the PASID TLP Prefix, I wonder if there is any usage model that such DMA master can choose to let PID/PRIV as is when PV is 0, or wire PID to a default value other than 0, and PRIV to 1 when PV is 0? |
Use of PID (process ID), PV (process ID valid) and PRIV (privileged request) does not necessarily need PCIe/PASID. If a DMA master wants to drive a process ID (PID) input then it must indicate that the PID is valid by setting PV (process ID valid) to 1. PRIV can be 1 or 0 only when PID is valid. When PID is not valid PRIV must be 0. Only when process based isolation is used i.e. process ID is valid - there is a concept of user vs. supervisor - through the use of U bit in the PTEs since such page tables are associated with processes identified by process ID (PID). |
IMO, PRIV should be driven by the DMA masters, given the reasons below:
Thus the above logic is implied in the DMA masters design, and might not be a part of IOMMU.
At least, this shouldn't be forced in IOMMU, but should be implementation dependent. |
This can be extract out into a function that the implementation can provide. Updated in PR #306 |
Thanks for the clarification. |
In the IOMMU specification,
3.2. Fault/Event-Queue (FQ)
If PV is 0, then PID and PRIV are 0.
This sentence can be interpreted as it implies the logic of PCIe PASID TLP prefix. When this TLP doesn't exist, fields inside of it, e.x., Privileged Mode Requested field shouldn't exist.
6.20 PASID TLP Prefix
However, the reference model enforces this implied PCIe logic inside of IOMMU implementation:
One uses the reference model verifying the hardware implementation may falsely enforces this logic inside of the RISC-V IOMMU implementation.
Should this be clarified?
The text was updated successfully, but these errors were encountered: