Replies: 5 comments 8 replies
-
Direct injection is a feature that indeed " skips the virtual CPU interface and injects physical interrupts directly into the Guest OS". The real GIC CPU interface is assigned to the guest and IRQs are routed to EL1 (as opposed to EL2), but accesses to the virtual distributor/redistributor are still trapped and emulated. In this way, interrupts are delivered directly to guests with actual native latencies. Then for the hypervisor still be able to receive interrupts (mainly IPIs) we either redirect FIQs to EL2 and add a TF-A service to configure GIC group 0 interrupts via SMC calls, or make use of the Arm SDEI infrastructure. That is the difference between the two branches. PS: I moved this do the discussions. Next time, please open this kind of thread there. |
Beta Was this translation helpful? Give feedback.
-
I see that direct irq injection in the code is only implemented in GICv2. I don't know if it can be implemented in GICv3? |
Beta Was this translation helpful? Give feedback.
-
Interesting discussion.
What about the GICR should be also given to the guest or it is too powerfull and has to be part of the Hypervisor? |
Beta Was this translation helpful? Give feedback.
-
I don't think we lose the true purpose (i.e. direct injection and handling without hypervisor intervention). The other affected registers, (ICC_CTLR_EL1, ICC_DIR_EL1, ICC_PMR_EL1, ICC_RPR_EL1) are not likely to be accessed during interrupt handling for most OSes. They could be just passed-through when an access to them generates a trap. |
Beta Was this translation helpful? Give feedback.
-
I've implemented this for cortex-R (which does not have EL3 mode) and it seems to work fine. We do have to emulate ICC_CTLR_EL1, ICC_DIR_EL1, ICC_PMR_EL1, ICC_RPR_EL1. I've implemented this by dividing the priority space in two and allowing the guest only to set interrupt priorities and PMR in the lower half and translating RPR to the correct value. Also not supporting decoupled prior drop and deactivation, since the hypervisor does not need it if not injecting interrupts. |
Beta Was this translation helpful? Give feedback.
-
Hello author, I would like to know the relevant features of the two branches of direct_irq_injection and the wip/direct-irq-injection. Can they skip the virtual cpu interface and inject physical interrupts directly into the Guest OS?
Beta Was this translation helpful? Give feedback.
All reactions