-
Notifications
You must be signed in to change notification settings - Fork 32
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
pointer masking support #368
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this going to work efficiently in hybrid code? i.e. Code that is partially purecap but has some parts still running in Integer Pointer Mode. My understanding is that pointer masking is enabled or disabled in a privilege level using CSRs that can only be read/written from higher privileges.
For example, senvcfg.PMM
controls pointer masking for U/VU-mode. Therefore, if a program wants to jump from a piece of code in Capability Pointer Mode to a piece of code in Integer Pointer mode, would it have to also do some sort of supervisor call to enable pointer masking on the way in and disable pointer masking on return back to Capability Pointer Mode?
the proposal should be updated to
and then do something better later for capability mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: it's not really the decoding mode that is impacted by pointer masking but rather how the instruction interprets the operands. I've made few suggestions to make it clear that we are referring to the type of operand not the mode we are executing in.
Signed-off-by: Tariq Kurd <tariqandlaura@gmail.com>
Signed-off-by: Tariq Kurd <tariqandlaura@gmail.com>
Signed-off-by: Tariq Kurd <tariqandlaura@gmail.com>
2bb972a
to
856efae
Compare
Made a few minor suggestions. Also rebased to resolve conflicts in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think we should not conflate the CHERI mode with the behaviour of the pointer extension - it only really depends on the type of the operand. Otherwise LGTM.
Agreed. This matters in particular for a Zcherihybrid. |
Co-authored-by: Alexander Richardson <mail@alexrichardson.me> Signed-off-by: Tariq Kurd <tariqandlaura@gmail.com>
Co-authored-by: Alexander Richardson <mail@alexrichardson.me> Signed-off-by: Tariq Kurd <tariqandlaura@gmail.com>
Co-authored-by: Andres Amaya Garcia <andres.amaya@codasip.com> Signed-off-by: Tariq Kurd <tariqandlaura@gmail.com>
Co-authored-by: Andres Amaya Garcia <andres.amaya@codasip.com> Signed-off-by: Tariq Kurd <tariqandlaura@gmail.com>
Co-authored-by: Alexander Richardson <mail@alexrichardson.me> Signed-off-by: Tariq Kurd <tariqandlaura@gmail.com>
Fixes: riscv#360 Co-authored-by: Alexander Richardson <alexrichardson@google.com> Co-authored-by: Andres Amaya Garcia <andres.amaya@codasip.com>
Add statement on pointer masking