ARM: new VGIC: Implement virtual IRQ injection
authorAndre Przywara <andre.przywara@linaro.org>
Wed, 7 Feb 2018 12:09:07 +0000 (12:09 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 27 Mar 2018 19:45:45 +0000 (12:45 -0700)
commitbcfae679596879d4be91eb603d4e1874ff71472c
treefaf8a39af32c65f62b9a3b5ad45ad0bdc8ab1b94
parentc9c4841374d5eeaf0b36974184e73fa79f0183e0
ARM: new VGIC: Implement virtual IRQ injection

Provide a vgic_queue_irq_unlock() function which decides whether a
given IRQ needs to be queued to a VCPU's ap_list.
This should be called whenever an IRQ becomes pending or enabled,
either as a result of a hardware IRQ injection, from devices emulated by
Xen (like the architected timer) or from MMIO accesses to the distributor
emulation.
Also provides the necessary functions to allow to inject an IRQ to a guest.
Since this is the first code that starts using our locking mechanism,
we add some (hopefully) clear documentation of our locking strategy and
requirements along with this patch.

This is based on Linux commit 81eeb95ddbab, written by Christoffer Dall.

Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/vgic/vgic.c
xen/arch/arm/vgic/vgic.h