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

Is shared memoy exclusive for the setting hart? #138

Open
inochisa opened this issue Jan 4, 2024 · 1 comment
Open

Is shared memoy exclusive for the setting hart? #138

inochisa opened this issue Jan 4, 2024 · 1 comment

Comments

@inochisa
Copy link

inochisa commented Jan 4, 2024

The doc defines shared memory between SBI and S-mode software at here. It says that SBI implementation needs to check S-mode software access type. I wonder whether SBI implementation needs to check the access type for all harts? or only the setting hart?

And one step further, can SBI implementation assume the share memory is exclusively owned by the setting hart and other harts have no access to it before stopping sharing?

@atishp04
Copy link
Collaborator

The doc defines shared memory between SBI and S-mode software at here. It says that SBI implementation needs to check S-mode software access type. I wonder whether SBI implementation needs to check the access type for all harts? or only the setting hart?

Only the setting hart. If S-mode cares about enabling on every hart, it should be invoked from every hart.

And one step further, can SBI implementation assume the share memory is exclusively owned by the setting hart and other harts have no access to it before stopping sharing?

Nope. SBI implementation can not make that assumption. Ideally, S-mode software would allocate memory and store it in a per cpu data structure. But SBI implementation can not trust S/VS mode software to do the correct thing always.

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