Skip to content

Commit

Permalink
hw/intc/arm_gicv3: ICC_HPPIR* return SPURIOUS if int group is disabled
Browse files Browse the repository at this point in the history
If the group of the highest priority pending interrupt is disabled
via ICC_IGRPEN*, the ICC_HPPIR* registers should return
INTID_SPURIOUS, not the interrupt ID.  (See the GIC architecture
specification pseudocode functions ICC_HPPIR1_EL1[] and
HighestPriorityPendingInterrupt().)

Make HPPIR reads honour the group disable, the way we already do
when determining whether to preempt in icc_hppi_can_preempt().

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20240328153333.2522667-1-peter.maydell@linaro.org
(cherry picked from commit 44e25fb)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
pm215 authored and Michael Tokarev committed Apr 5, 2024
1 parent 0523aa8 commit 283bfcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hw/intc/arm_gicv3_cpuif.c
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ static uint64_t icc_hppir0_value(GICv3CPUState *cs, CPUARMState *env)
*/
bool irq_is_secure;

if (cs->hppi.prio == 0xff) {
if (icc_no_enabled_hppi(cs)) {
return INTID_SPURIOUS;
}

Expand Down Expand Up @@ -1102,7 +1102,7 @@ static uint64_t icc_hppir1_value(GICv3CPUState *cs, CPUARMState *env)
*/
bool irq_is_secure;

if (cs->hppi.prio == 0xff) {
if (icc_no_enabled_hppi(cs)) {
return INTID_SPURIOUS;
}

Expand Down

0 comments on commit 283bfcd

Please sign in to comment.