aboutsummaryrefslogtreecommitdiff
path: root/hw/intc/arm_gicv3_common.c
diff options
context:
space:
mode:
authorJinjie Ruan <ruanjinjie@huawei.com>2024-04-19 14:33:05 +0100
committerPeter Maydell <peter.maydell@linaro.org>2024-04-25 10:21:05 +0100
commitd89daa893f51280652032640d77a8bc1dea95bdd (patch)
treed3bac7181c238c7f9a7269a2deb118be0d70fca7 /hw/intc/arm_gicv3_common.c
parentd2c0c6aab6c6748726149c37159a75751ec6ac92 (diff)
downloadqemu-d89daa893f51280652032640d77a8bc1dea95bdd.zip
qemu-d89daa893f51280652032640d77a8bc1dea95bdd.tar.gz
qemu-d89daa893f51280652032640d77a8bc1dea95bdd.tar.bz2
hw/intc/arm_gicv3: Implement NMI interrupt priority
If GICD_CTLR_DS bit is zero and the NMI is non-secure, the NMI priority is higher than 0x80, otherwise it is higher than 0x0. And save the interrupt non-maskable property in hppi.nmi to deliver NMI exception. Since both GICR and GICD can deliver NMI, it is both necessary to check whether the pending irq is NMI in gicv3_redist_update_noirqset and gicv3_update_noirqset. Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20240407081733.3231820-21-ruanjinjie@huawei.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/intc/arm_gicv3_common.c')
-rw-r--r--hw/intc/arm_gicv3_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c
index 9810558..207f841 100644
--- a/hw/intc/arm_gicv3_common.c
+++ b/hw/intc/arm_gicv3_common.c
@@ -536,8 +536,11 @@ static void arm_gicv3_common_reset_hold(Object *obj)
memset(cs->gicr_ipriorityr, 0, sizeof(cs->gicr_ipriorityr));
cs->hppi.prio = 0xff;
+ cs->hppi.nmi = false;
cs->hpplpi.prio = 0xff;
+ cs->hpplpi.nmi = false;
cs->hppvlpi.prio = 0xff;
+ cs->hppvlpi.nmi = false;
/* State in the CPU interface must *not* be reset here, because it
* is part of the CPU's reset domain, not the GIC device's.