Skip to content
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

Questions about SRCMD table format 2 #13

Open
leBsky opened this issue Oct 16, 2024 · 5 comments
Open

Questions about SRCMD table format 2 #13

leBsky opened this issue Oct 16, 2024 · 5 comments

Comments

@leBsky
Copy link

leBsky commented Oct 16, 2024

The SRCMD table format 2 is added in the lastest IOPMP spec, which adds register SRCMD_PERM(m) and SRCMD_PERMH(m) to give extra check for transactions. I met two questions when tried to understand the format 2.

  1. The SRCMD table format 2 is indexed by MD, but how to determine if the RRID is associated with each MD is not clear. For example, assume SRCMD_PERM(0) and SRCMD_PERMH(0) are both all 0, then for MD0, the r/w/x permission for RRID 0~31 are all 0, but it cannot be found that which RRID is related with MD0. Therefore, we cannot find the related IOPMP entries for RRIDs. However, we still need IOPMP entries to check the transaction.

  2. Since the SRCMD_PERM and SRCMD_PERMH are both 32 bits, and one RRID needs 2 bits in SRCMD_PREM and SRCMD_PERMH to represent the r/w/x permissions, as a result, only (32+32)/2 = 32 RRIDs can be supported for SRCMD table format 2. Is it an expected behavior?

@tyshyu
Copy link
Contributor

tyshyu commented Oct 18, 2024

  1. It seems like there is a need for further clarification. Another discussion here:
    https://lists.riscv.org/g/tech-iopmp/message/321
    https://lists.riscv.org/g/tech-iopmp/message/322

  2. Yes, 32 RRIDs is an expected behavior. AFAIK, another purpose of SRCMD format 2 is for WorldGuard Checker compatibility. WorldGuard Checker is non-ISA part of WorldGuard. The max number of WID (World Identifier) is 32 in WorldGuard Checker. Tagging RRIDs is implementation-dependent so the WID can be RRID of IOPMP. ISA part of WorldGuard will be a fast track extension of RISC-V.

@leBsky
Copy link
Author

leBsky commented Oct 23, 2024

  1. It seems like there is a need for further clarification. Another discussion here:
    https://lists.riscv.org/g/tech-iopmp/message/321
    https://lists.riscv.org/g/tech-iopmp/message/322
    Thank you sir. I looked into the messages but still cannot get the relationship between input RRID and MDs. It seems that Paul would share some slides which may be helpful for this question but I cannot get access to these slides. Could you please help clarify the question if you have access to the slides.
  1. Yes, 32 RRIDs is an expected behavior. AFAIK, another purpose of SRCMD format 2 is for WorldGuard Checker compatibility. WorldGuard Checker is non-ISA part of WorldGuard. The max number of WID (World Identifier) is 32 in WorldGuard Checker. Tagging RRIDs is implementation-dependent so the WID can be RRID of IOPMP. ISA part of WorldGuard will be a fast track extension of RISC-V.
    Get it

@tyshyu
Copy link
Contributor

tyshyu commented Nov 13, 2024

Thank you sir. I looked into the messages but still cannot get the relationship between input RRID and MDs. It seems that Paul would share some slides which may be helpful for this question but I cannot get access to these slides. Could you please help clarify the question if you have access to the slides.

This is meeting minutes of the last IOPMP TG meeting: https://github.com/riscv-admin/iopmp/blob/main/meeting-minutes/2024-1107-IOPMP-meeting-minutes.pdf

The slides on page 5~7 shows the relationship between input RRID and MDs.

@leBsky
Copy link
Author

leBsky commented Nov 14, 2024

Thank you sir. I looked into the messages but still cannot get the relationship between input RRID and MDs. It seems that Paul would share some slides which may be helpful for this question but I cannot get access to these slides. Could you please help clarify the question if you have access to the slides.

This is meeting minutes of the last IOPMP TG meeting: https://github.com/riscv-admin/iopmp/blob/main/meeting-minutes/2024-1107-IOPMP-meeting-minutes.pdf

The slides on page 5~7 shows the relationship between input RRID and MDs.

Page 7 of the slide shows that an RRID selects all the MDs and all entries. I want to confirm the meaning of “all entries” here. I have 2 understandings.

  1. all entries means all IOPMP entries so that it is not required to implement MDCFG table because we don't need to choose IOPMP entry for each MD according to MDCFG table.

  2. all entries means all MD's associated IOPMP entries. For those IOPMP entries that are not associated with any MD, we don't count them. In this case, we still need to implement a MDCFG table.

Please help clarify which understanding is the intent of the Spec. Thank you very much.

@tyshyu
Copy link
Contributor

tyshyu commented Nov 20, 2024

Both are not accurate.
Your understanding 2 is close to the intent of the Spec but not only counts the IOPMP entries that are not associated with any MD. We still need the MDCFG table to know an IOPMP entry associates which memory domain and corresponding permissions of the memory domain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants