Re: Proposal: Supervisor Timer CSR and Virtual Supervisor Timer CSR


John Hauser
 

zhaosiqi (Siqi) wrote:
So VGTI is purely for the prompt handling of the vstimecmp interrupt
when the vCPU is still bound to a hart but not executing.
I believe a hypervisor can get the same effect by saving and clearing
bit 6 of hideleg on entry to a trap handler in HS mode. On trap exit,
restore the saved value of bit 6 of hideleg. (Usually, it should be
possible just to save and restore all of hideleg.) While bit 6 of
hideleg is zero, a VS-level timer interrupt will trap to HS mode,
assuming bit 6 (VSTIE) of hie is also set to enable the trap.

- John Hauser

Join {tech-privileged@lists.riscv.org to automatically receive all group messages.