ARM: VGIC: change to level-IRQ compatible IRQ injection interface
authorAndre Przywara <andre.przywara@linaro.org>
Fri, 9 Mar 2018 15:11:25 +0000 (15:11 +0000)
committerJulien Grall <julien.grall@arm.com>
Mon, 12 Mar 2018 11:45:01 +0000 (11:45 +0000)
commitfd2df4340a488df8d370ee087b42444a51dfcd38
treefdad8167e3fc5f0779230a71a49350e2ee90580e
parent3bb81108e920625af38d5e31caa985654dca2ba8
ARM: VGIC: change to level-IRQ compatible IRQ injection interface

At the moment vgic_vcpu_inject_irq() is the interface for Xen internal
code and virtual devices to inject IRQs into a guest. This interface has
two shortcomings:
1) It requires a VCPU pointer, which we may not know (and don't need!)
for shared interrupts. A second function (vgic_vcpu_inject_spi()), was
there to work around this issue.
2) This interface only really supports edge triggered IRQs, which is
what the Xen VGIC emulates only anyway. However this needs to and will
change, so we need to add the desired level (high or low) to the
interface.
This replaces the existing injection call (taking a VCPU and an IRQ
parameter) with a new one, taking domain, VCPU, IRQ and level parameters.
The VCPU can be NULL in case we don't know and don't care.
We change all call sites to use this new interface. This still doesn't
give us the missing level IRQ handling, but at least prepares the callers
to do the right thing later automatically.

Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/domain.c
xen/arch/arm/gic-v3-lpi.c
xen/arch/arm/irq.c
xen/arch/arm/time.c
xen/arch/arm/vgic.c
xen/arch/arm/vpl011.c
xen/arch/arm/vtimer.c
xen/include/asm-arm/vgic.h