intc/arm_gic: Implement gic_update_virt() function
commitcbe1282b56808200c62b08b0094188afb5eff542
authorLuc Michel <luc.michel@greensocs.com>
Tue, 14 Aug 2018 16:17:20 +0000 (14 17:17 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 14 Aug 2018 16:17:20 +0000 (14 17:17 +0100)
tree6225a390d8422c3adc760cc12d6ebeb154e76983
parent527d296f5d236cd68de496d0cf1260fe3fe98ab5
intc/arm_gic: Implement gic_update_virt() function

Add the gic_update_virt() function to update the vCPU interface states
and raise vIRQ and vFIQ as needed. This commit renames gic_update() to
gic_update_internal() and generalizes it to handle both cases, with a
`virt' parameter to track whether we are updating the CPU or vCPU
interfaces.

The main difference between CPU and vCPU is the way we select the best
IRQ. This part has been split into the gic_get_best_(v)irq functions.
For the virt case, the LRs are iterated to find the best candidate.

Signed-off-by: Luc Michel <luc.michel@greensocs.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20180727095421.386-17-luc.michel@greensocs.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/intc/arm_gic.c