Re: Question about guest external interrupt


Oscar Jupp
 

Dear Scott Johnson,
Thank you very much!
You said: “If the hardware has GEILEN=0 then the external interrupt will first go to the hypervisor software, which can pass through the interrupt to the guest by setting `hvip.VSEIP`.”
Do you mean that the hypervisor can distinguish between the external interrupt to the physical machine and external interrupt to the guest?
How does the hypervisor know which interrupt is a external interrupt to the physical machine? Or is it a external interrupt to the guest?

Regards,
Oscar Jupp


---- Replied Message ----
From Scott Johnson<scott.johnson@...>
Date 11/17/2022 22:56
To <tech-privileged@...>
Subject Re: [RISC-V] [tech-privileged] Question about guest external interrupt
External interrupts are passed through to the guest by setting `hip.VSEIP`, which the guest OS sees as `sip.SEIP`.

The hypervisor software decides which interrupts should be passed through to which guest OS.

If the hardware has GEILEN>0 then the hypervisor software can configure `hstatus.VGEIN` and `hgeie` such that `hip.VSEIP` can be set by the external interrupt directly.

If the hardware has GEILEN=0 then the external interrupt will first go to the hypervisor software, which can pass through the interrupt to the guest by setting `hvip.VSEIP`.

Either way, the guest OS sees the same thing.

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