This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Virtualizing GICv2.

Hi all,

I'm currently virtualizing the GICv2 and some doubts came out during its design. Scenario encompasses the same instance of an hypervisor running in two different CPUs (CPU0 and CPU1). Also, There is one guest running on top of two vCPUs. Each vCPU is dedicated to each CPU. CPU0 runs vCPU0 and vCPU1 runs the CPU1.

Let's suppose that there is an interrupt, an SPI, which targets CPU0 and CPU1. For some reason and asynchronously, this SPI is asserted, and consequently its state gets pending in its GIC.  Since GIC uses the 1-N model only one CPU will acknowledge successfully the interrupt by transiting its state from pending to active and the other will get a spurious interrupt. Let's say that it was the CPU0 who performed it successfully and it realizes that this physical interrupt targets the vCPU1 which are running the CPU1.

- Is it possible for an implementation the following case: the CPU0 performs the ack of the hardware interrupt as well as its priority drop in the GIC interface0 and then it sends a message to CPU1 in order to inject a virtual interrupt related with the same hardware interrupt  in the virtual interface control 1 of the vCPU1 (an LR with hw bit set to 1). When the virtual interrupt got an EOI from the vCPU1 the physical interrupt will also get deactivated?

Thanks in advance,

Jorge