riscv / riscv-smmtt

This specification will define the RISC-V privilege ISA extensions required to support Supervisor Domain isolation for multi-tenant security use cases e.g. confidential-computing, trusted platform services, fault isolation and so on.
https://jira.riscv.org/browse/RVG-65
Creative Commons Attribution 4.0 International
43 stars 17 forks source link

There is a contradiction between the functionality and examples of MSDCFG.SSM #98

Closed DuYongChao123 closed 1 month ago

DuYongChao123 commented 1 month ago

The function of MSDCFG.SSM is described as follows in section8.3: When SSM is 0, the SRL configuration enables the RDSM to configure a RCID prefix value in the srmcfg.RCID field while allowing the supervisor domain to program the low order SRL bits of the field. When SSM is 1, the supervisor domain may only program a RCID value in the range 0 through 2^RCIDLEN - 2^SRL - 1 where RCIDLEN is the number of implemented bits of the RCID field. The example of how to use MSDCFG.SSM is described as follows in section8.3: Consider a QRI that supports 32 RCIDs and is mediated by RDSM between two SDs.The RDSM may allocate 24 RCIDs to the first SD and 8 RCIDs to the second SD. The SRL and SSM configurations used by the RDSM to support this use case are as follows: The RDSM configures SRL to 3 and SSM to 0 for first SD. This allows the first SD to select RCID values 0 through 23 in srmcfg.The value of SSM need be 1 for first SD? The RDSM configures SRL to 3 and SSM to 1 for the second SD and programs the srmcfg with a value of 24.The value of SSM need be 0 for second SD?

ved-rivos commented 1 month ago

You are right that the examples have the SSM value specified incorrectly. Fixed in #101