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

[RFC] SBI Implementation IDs experimental space #142

Open
cmaiolino opened this issue Feb 29, 2024 · 1 comment
Open

[RFC] SBI Implementation IDs experimental space #142

cmaiolino opened this issue Feb 29, 2024 · 1 comment

Comments

@cmaiolino
Copy link

Hello,
while writing a test for KVM unit tests, to test sbi_get_impl_id() function, I realized there is no way to check if the returned value is within an acceptable range.
Discussing it with @jones-drew, he suggested to split the space in the listed implementation IDs and experimental IDs, analogous to Experimental SBI Extension IDs.
Does anybody has any objection on updating the specification to split implementation IDs to include an experimental space? If no, I'd suggest reserving the upper 8 bits for experimental ids, but I'm new to riscv so I'm not sure if this is reasonable.

@cmaiolino cmaiolino changed the title SBI Implementation IDs experimental space [RFC] SBI Implementation IDs experimental space Feb 29, 2024
@jones-drew
Copy link
Contributor

To elaborate on the suggestion, there's currently no guidance for how to choose an ID for an experimental or custom SBI implementation, which means it's possible to get conflicts with future ID definitions. Reserving space for the future defined IDs, by creating an experimental ID space, helps ensure only experimental implementations are at risk of conflict.

I suggest we reserve 0 to 0x7fffffff for defined IDs and write guidance in the spec that SBI implementers use IDs from outside that space until they are ready to request a defined ID.

Regarding the testing, whether or not we check for a range of defined IDs or for an expected value is a bit independent. We can already always require an expected value to be input, so it doesn't matter if it's a defined ID or an experimental ID, but if we wanted to allow any defined ID to pass, then we need the range.

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