hw/intc/arm_gicv3_redist: Factor out "update hpplpi for one LPI" logic
commite97be73c97b246e5e4c2582fafcaea0384e14964
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 8 Apr 2022 14:15:36 +0000 (8 15:15 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 22 Apr 2022 13:44:53 +0000 (22 14:44 +0100)
treec99830f8f67620b5271067e1858d1ebde92d1a10
parent189d1d9d5704dfb4fca4d2ccad087bf0e4615898
hw/intc/arm_gicv3_redist: Factor out "update hpplpi for one LPI" logic

Currently the functions which update the highest priority pending LPI
information by looking at the LPI Pending and Configuration tables
are hard-coded to use the physical LPI tables addressed by
GICR_PENDBASER and GICR_PROPBASER.  To support virtual LPIs we will
need to do essentially the same job, but looking at the current
virtual LPI Pending and Configuration tables and updating cs->hppvlpi
instead of cs->hpplpi.

Factor out the common part of the gicv3_redist_check_lpi_priority()
function into a new update_for_one_lpi() function, which updates
a PendingIrq struct if the specified LPI is higher priority than
what is currently recorded there.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220408141550.1271295-28-peter.maydell@linaro.org
hw/intc/arm_gicv3_redist.c