Re: Question about mip and vsip

John Hauser

Greg Favor wrote:
The vsip CSR - as with all vs* CSRs - is only accessible by HS-mode (and
M-mode). As the vsip definition says, "When V=1, vsip and vsie substitute
for the usual sip and sie, so instructions that normally read or modify
sip/sie actually access vsip/vsie instead."
To emphasize Greg's point, the next sentence says, "When V=1, an
attempt to read or write a VS CSR directly by its own separate CSR
address causes a virtual instruction exception."

Oscar Jupp asked:
2.  Are the fields SEIP,SSIP,STIP in vsip real-only ? Can VS-mode
software modify these bit fields?
By the text quoted above, attempting to access vsip directly from VS
mode raises a virtual instruction exception. (V = 1 in VS mode.)

What about accessing sip from VS mode, which is really vsip? Because
the whole purpose of VS mode is to be a virtual S mode, the general
default assumption should be that VS mode provides an equivalent
execution environment as S mode. Therefore, what VS mode sees of
sip is what the Privileged Architecture says is true of sip in the
Supervisor-Level chapter (Section 4.1.3, "Supervisor Interrupt
Registers (sip and sie)"): "If implemented, SEIP is read-only
in sip...." "If implemented, STIP is read-only in sip...." "If
implemented, SSIP is writable in sip...."

- John Hauser

Join { to automatically receive all group messages.