]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/arm/virt: Enable NMI support in the GIC if the CPU has FEAT_NMI
authorJinjie Ruan <ruanjinjie@huawei.com>
Fri, 19 Apr 2024 13:33:06 +0000 (14:33 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 25 Apr 2024 09:21:06 +0000 (10:21 +0100)
commit5ae47f7aece19c5a6efbf99d000f389278e93c1d
tree7f5a023be0e8fb56198dde722982a68b45b9b135
parent14a164030ada5c5d6f346e152521cb878b142b2a
hw/arm/virt: Enable NMI support in the GIC if the CPU has FEAT_NMI

If the CPU implements FEAT_NMI, then turn on the NMI support in the
GICv3 too.  It's permitted to have a configuration with FEAT_NMI in
the CPU (and thus NMI support in the CPU interfaces too) but no NMI
support in the distributor and redistributor, but this isn't a very
useful setup as it's close to having no NMI support at all.

We don't need to gate the enabling of NMI in the GIC behind a
machine version property, because none of our current CPUs
implement FEAT_NMI, and '-cpu max' is not something we maintain
migration compatibility across versions for. So we can always
enable the GIC NMI support when the CPU has it.

Neither hvf nor KVM support NMI in the GIC yet, so we don't enable
it unless we're using TCG.

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20240407081733.3231820-25-ruanjinjie@huawei.com
[PMM: Update comment and commit message]
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/virt.c