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

Review comments/questions on Smmtt v0.1 #74

Open
SiFiveHolland opened this issue Sep 17, 2024 · 2 comments
Open

Review comments/questions on Smmtt v0.1 #74

SiFiveHolland opened this issue Sep 17, 2024 · 2 comments

Comments

@SiFiveHolland
Copy link
Collaborator

  • Why are two separate encodings used for 4M_PAGES and 2M_PAGES? These can never be used at the same time.
  • It's not possible to atomically update 32 consecutive MTTL2 entries representing a 1 GiB range. Given the possibility of speculative lookups or lookups from another hart or I/O MTT, the walk behavior and fence behavior should be well-defined even when the consecutive MTTL2 entries do not match.
  • The text claims that Figure 8 is applicable to Smmtt46, but this is false, due to pn[0] being 3 bits for Smmtt32, but 4 bits for Smmtt46.
  • The "ZERO" fields in the MTTL3 and MTTL2 entries should be renamed "Reserved", so they can be used for a future specification.
  • Why is a different encoding used for MTTL1 and 4M_PAGES/2M_PAGES? Why not use the low bits (without gaps) in both cases? Any future change that uses the other two bits in MTTL1 is likely to apply to MTTL2 as well.
  • In section 4.3, the exception "but excluding MTT structure accesses" should be clarified to only exclude implicit MTT structure accesses (i.e. MTT walks), not just any memory access to the MTT. (Granted, S-mode shouldn't be able to explicitly access the MTT, because the MTT should be protected by itself or PMP.)
@ram2532
Copy link

ram2532 commented Sep 17, 2024

I'd like to expand on the last bullet item - regarding section 4.3's MTT structure access. This section also includes this line:

MTT structure accesses are to be treated as implicit M-mode accesses and are subject to PMP/Smepmp and IOPMP checks.

Should the phrase "MTT structure accesses" say "implicit MTT structure accesses"? To be explicit that these accesses are part of a MTT walk?

@rsahita
Copy link
Collaborator

rsahita commented Sep 21, 2024

Why are two separate encodings used for 4M_PAGES and 2M_PAGES? These can never be used at the same time.

yeah can use the same.

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

3 participants