Closed vernonpang closed 1 year ago
This should now be addressed with commits 5247b40 and 050473c. The full document has been updated to 1.0-RC5.
Appreciate the update!
Reopened issue to clarify a scenario involving vstopei
.
VU
/VS
-modevstopei
CSR directly by its own separate CSR addresshstatus.vgein=0
Said access is not HS-qualified since the same access in HS
-mode will result in an illegal instruction access being raised. Should an illegal instruction exception or a virtual instruction exception be raised?
Believed to be fixed by #48.
@vernonpang, if you're willing, I'd be grateful if you could review Chapter 2 once more. The window for fixing problems before ratification is closing fast.
Chapter 2 looks good to me!
I might have spotted something, but I want to check in with you first
It was mentioned in Chapter 2.1:
CSR
mtopei
also exists only when an IMSIC is implemented.
I don't see the same specified for stopei
and vstopei
, but I assume it is implied.
If so, in Chapter 2.5:
when the hart does not have an IMSIC ... despite that bit 58 of
mstateen0
is zero ... attempts from VS-mode to accessstopei
raise a virtual instruction exception
Should an illegal instruction exception be raised instead if stopei
doesn't exist?
@vernonpang, I do appreciate you giving this chapter so much careful review. Thank you!
However, in this case, the behavior you describe:
when the hart does not have an IMSIC ... despite that bit 58 of
mstateen0
is zero ... attempts from VS-mode to accessstopei
raise a virtual instruction exception
is very much intentional.
Although our collection of RISC-V standards admittedly don't do a good job of explaining the multiple factors that go into such choices, the latest and greatest thinking on this subject says that what matters most here is not whether stopei
"exists" but rather that extension Ssaia is "implemented". That last fact gives us justification for assuming a hypervisor may want to emulate an IMSIC for a virtual machine.
Hopefully, my attempt at a brief explanation has been more illuminating than befuddling.
Yes, that does make sense! I reckon I don't have any further updates for this. Thank you so much for taking the time to attend to my questions.
AIA spec:
Privileged spec:
Consider the following scenario
vsiselect=0x0
siselect=0x0
sireg
Since said access is not HS-qualified (since
siselect=0x0
), should an illegal instruction exception instead of a virtual instruction exception be raised?