[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/23] intc/arm_gic: Fix gic_irq_signaling_enabled() for vCPUs
From: |
Peter Maydell |
Subject: |
[PULL 01/23] intc/arm_gic: Fix gic_irq_signaling_enabled() for vCPUs |
Date: |
Fri, 8 Jan 2021 15:35:59 +0000 |
From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
Correct the indexing into s->cpu_ctlr for vCPUs.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Luc Michel <luc.michel@greensocs.com>
Message-id: 20201214222154.3480243-2-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/intc/arm_gic.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
index c60dc6b5e6e..af41e2fb448 100644
--- a/hw/intc/arm_gic.c
+++ b/hw/intc/arm_gic.c
@@ -141,6 +141,8 @@ static inline void gic_get_best_virq(GICState *s, int cpu,
static inline bool gic_irq_signaling_enabled(GICState *s, int cpu, bool virt,
int group_mask)
{
+ int cpu_iface = virt ? (cpu + GIC_NCPU) : cpu;
+
if (!virt && !(s->ctlr & group_mask)) {
return false;
}
@@ -149,7 +151,7 @@ static inline bool gic_irq_signaling_enabled(GICState *s,
int cpu, bool virt,
return false;
}
- if (!(s->cpu_ctlr[cpu] & group_mask)) {
+ if (!(s->cpu_ctlr[cpu_iface] & group_mask)) {
return false;
}
--
2.20.1
- [PULL 00/23] target-arm queue, Peter Maydell, 2021/01/08
- [PULL 01/23] intc/arm_gic: Fix gic_irq_signaling_enabled() for vCPUs,
Peter Maydell <=
- [PULL 02/23] hw/arm/virt: Remove virt machine state 'smp_cpus', Peter Maydell, 2021/01/08
- [PULL 03/23] target/arm: Fix MTE0_ACTIVE, Peter Maydell, 2021/01/08
- [PULL 04/23] hw/intc/armv7m_nvic: Correct handling of CCR.BFHFNMIGN, Peter Maydell, 2021/01/08
- [PULL 05/23] target/arm: Correct store of FPSCR value via FPCXT_S, Peter Maydell, 2021/01/08
- [PULL 06/23] target/arm: Implement FPCXT_NS fp system register, Peter Maydell, 2021/01/08
- [PULL 07/23] target/arm: Implement Cortex-M55 model, Peter Maydell, 2021/01/08
- [PULL 08/23] hw/arm/highbank: Drop dead KVM support code, Peter Maydell, 2021/01/08
- [PULL 10/23] scripts/coccinelle: New script to remove unnecessary timer_del() calls, Peter Maydell, 2021/01/08
- [PULL 09/23] util/qemu-timer: Make timer_free() imply timer_del(), Peter Maydell, 2021/01/08
- [PULL 12/23] target/arm: Remove timer_del()/timer_deinit() before timer_free(), Peter Maydell, 2021/01/08