For wired IRQs (PPIs/SPIs), passing through a physical IRQ to a guest is done by:
From my limited understanding the above will not work for passthrough LPIs (without GICv4), since:
Someone could argue that you can inject it purely as a virtual IRQ and use a maintenance interrupt to finalize it manually from the hypervisor, but how do you ensure that the LPI won't fire again while the guest is servicing it? From the GICv3 software overview it sounds that just by ACKing the LPI it will go from pending to inactive, but it won't be masked. Does EOI have any effect on LPIs and should you use deactivation (DIR) at all?
The only other choice I can imagine is to ACK the LPI and then disable it, set the maintenance IRQ for the specific LR and when the maintenance IRQ is received, enabled the LPI again. However, this sounds way too expensive since it requires costly INV commands to do so. Am I missing something?
Any help would be welcome, thanks in advance.