riscv-isa-manual
riscv-isa-manual copied to clipboard
Unclear dependency relationship between H, S, and U
From a cursory glance through the privileged spec, I gathered that M is required while H, S, and U are optional. What's not clear to me is whether any of the latter 3 modes depend on one another. Intuitively, I would imagine that H depends on S which depends on U, but it isn't explicitly spelled out, so then again, maybe not?
Whatever the case may be, it seems like it might be worth spelling this out explicitly somewhere.
The legal combinations (which I thought we spelled out are: M MU MUS MUSH
No other combinations are legal as far as I know.
On Sun, Oct 2, 2022 at 9:41 AM Alex Rønne Petersen @.***> wrote:
From a cursory glance through the privileged spec, I gathered that M is required while H, S, and U are optional. What's not clear to me is whether any of the latter 3 modes depend on one another. Intuitively, I would imagine that H depends on S which depends on U, but it isn't explicitly spelled out, so then again, maybe not?
Whatever the case may be, it seems like it might be worth spelling this out explicitly somewhere.
— Reply to this email directly, view it on GitHub https://github.com/riscv/riscv-isa-manual/issues/899, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPXVJW3562G52V5C6GX4K3WBG3KNANCNFSM6AAAAAAQ27CVWE . You are receiving this because you are subscribed to this thread.Message ID: @.***>
There is indeed a table in §1.2 "Privilege Levels" looking similar to that, but there is no mention of how H fits in there. That plus the overall wording in that section led me to believe that the table was only meant as a guideline.
FWIW, I think adding H into the table and renaming the "Supported Modes" column to "Required Modes" (or something to that effect) would make things clearer.
There is no H mode. There was an old (obsolete) hypervisor spec that had it, but I don't believe anyone ever implemented that.
The current hypervisor spec adds VS and VU modes, and modifies S mode to be HS. This is all explained in the first pages of the hypervisor chapter. Any implementation that supports hypervisor will support all 5 privilege modes. I don't see anything unclear about that.
From a cursory glance through the privileged spec
You might want to look at table 1.2 and the text immediately below it, plus the beginning of the hypervisor extension as Scott mentioned.
Closing since the information seems to be there and I just missed it.