Closed 18772820305 closed 1 year ago
The process in section 2.3.3 is invoked by the step 18 of the process in section 2.3 and the GPA may be directly from the IOVA or could be the result of the translation using the first stage address translation process.
After querying the DC to get msi_addr_mask and msi_addr_pattern, can i directly judge whether the virtual interrupt file is accessed by IOVA through the formula provided in Section 2.1.3.6?
Section 2.3 outlines the process to translate an IOVA. In step 6, the device_id
is used to locate the DC
. At this step whether the IOVA is a GPA is not known. Subsequently the step 17 determines the GPA. Only after step 17 i.e. after a GPA has been determined, the step 18 - MSI address translation process - is invoked. In MSI address translation process, the msi_addr_mask
and msi_addr_pattern
from the DC
determined in step 6 is used - in step 3 - to determine if GPA is that of a virtual interrupt file using the algorithm specified in section 2.1.3.6.
Does the address sent by the device for writing to the virtual interrupt file must be a GPA? If it is GPA, can it directly recognize that IOVA is writing virtual interrupt files after obtaining DC.
The process is then the section 2.3 is the only defined process. A compliant implementation must adhere to this process.
The address provided by a device is an IOVA. The RISC-V IOMMU employs a two-stage address translation process to translate the IOVA to an SPA. Although there is no option to disable two-stage address translation, either stage may be effectively disabled by configuring the virtual memory scheme for that stage to be Bare i.e. perform no address translation or memory protection.
So the process following is always:
If your questions are about whether in your implementation you can take certain shortcuts or deviate from this process then I can help you if you would more clearly state what you are attempting to do and what your assumptions are.
Please re-open if there are further items to discuss.
Step 1 in the process to translate addresses of MSI in section 2.3.3 let A be the GPA, is the GPA mentioned in it directly from IOVA?