Open zhuotianshu opened 1 month ago
I assume you meant also to add the conditions that hvictl
has DPR = 0 and IPRIOM = 1. In that case, the answer to the title's question is, you can try to inject that interrupt, but it won't work.
With all fields of hvictl
being zeros except VTI = 1 and IPRIOM = 1, it is possible for the interrupt represented by hvictl
to be the highest-priority candidate for vstopi
, which will leave vstopi
with IID = 0 and IPRIO = 0. But then no interrupt will actually be taken, because vstopi
is all zeros.
If any other lower-priority interrupts are pending-and-enabled, this value of hvictl
will actually block them from being taken.
Note that if hvictl
.IPRIOM = 0, the value of vstopi
.IPRIO will be 1. And if hvictl
has IPRIOM = 1 and DPR = 1 (and if there is no pending-and-enabled external interrupt), then vstopi
.IPRIO will be 255. Those settings will allow an interrupt with IID = 0 to occur.
Spec explicitly states that such an interrupt cannot be generated in M mode:
And so does S mode. But there seems no similar statement around the description of
vstopi
. So what will happen ifhvictl
hasVTI
=1,IID
=0 andIPRIO
=0?