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

CHERI Specification for RISC-V Vector Extension #103

Open
andresag01 opened this issue Aug 14, 2023 · 1 comment
Open

CHERI Specification for RISC-V Vector Extension #103

andresag01 opened this issue Aug 14, 2023 · 1 comment

Comments

@andresag01
Copy link

Is there a specification describing how CHERI integrates with the RISC-V vector extension?

@andresag01
Copy link
Author

andresag01 commented Sep 15, 2023

The vector extension is mostly orthogonal to CHERI, but software may use vector to perform memcpy-like operations; these must work when CHERI is used. As discussed, the proposal is as follows:

  • Extend vector register file with tags that are cleared at reset
  • It is required that VLEN >= CLEN
    • There will be VLEN / CLEN tag bits associated with each vector register
  • There are two new memory access (load and store) vector instructions that copy the tags from/to memory. The new load and store vector instructions:
    • Behave as unit-stride memory accesses
    • Respect the CHERI mode in PCC
    • Must atomically copy the tag and data in CLEN chunks
    • Perform sealing, tag, bounds, etc as usual on the authorising capability
    • Clear the tag of all capabilities if the load/store is not aligned to CLEN
    • Clear the tag of capabilities partially loaded/stored due to vstart and vector length
    • Do not support masking and fault-only-first
    • New instruction encodings are mnemonics are to be decided.
  • Whole vector-vector move instructions (vmv<nr>r.v) copy the tags
  • All other vector instructions clear the tag bits in all cases

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

1 participant