arm_gic: Keep track of SGI sources
commit40d225009efe17cad647b4b7424b77a3ace232f1
authorChristoffer Dall <christoffer.dall@linaro.org>
Tue, 19 Nov 2013 04:32:00 +0000 (18 20:32 -0800)
committerPeter Maydell <peter.maydell@linaro.org>
Sat, 8 Feb 2014 14:47:28 +0000 (8 14:47 +0000)
tree2d5c2c9a3047af2c9dddde4e8977246c15ba5e56
parent8d999995e45c1002aa11f269c98f2e93e6f8c42a
arm_gic: Keep track of SGI sources

Right now the arm gic emulation doesn't keep track of the source of an
SGI (which apparently Linux guests don't use, or they're fine with
assuming CPU 0 always).

Add the necessary matrix on the GICState structure and maintain the data
when setting and clearing the pending state of an IRQ and make the state
visible to the guest.

Note that we always choose to present the source as the lowest-numbered
CPU in case multiple cores have signalled the same SGI number to a core
on the system.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/intc/arm_gic.c
hw/intc/arm_gic_common.c
include/hw/intc/arm_gic_common.h