]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: arm64: gic-v5: Hide FEAT_GCIE from NV GICv5 guests
authorSascha Bischoff <Sascha.Bischoff@arm.com>
Thu, 19 Mar 2026 15:58:33 +0000 (15:58 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 19 Mar 2026 18:21:29 +0000 (18:21 +0000)
Currently, NV guests are not supported with GICv5. Therefore, make
sure that FEAT_GCIE is always hidden from such guests.

Signed-off-by: Sascha Bischoff <sascha.bischoff@arm.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Link: https://patch.msgid.link/20260319154937.3619520-35-sascha.bischoff@arm.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/nested.c

index 2c43097248b21453360aab8357563be09792ab85..efd5d21c7ac7574def9f3c2ee990a5d1b07c84fa 100644 (file)
@@ -1558,6 +1558,11 @@ u64 limit_nv_id_reg(struct kvm *kvm, u32 reg, u64 val)
                         ID_AA64PFR1_EL1_MTE);
                break;
 
+       case SYS_ID_AA64PFR2_EL1:
+               /* GICv5 is not yet supported for NV */
+               val &= ~ID_AA64PFR2_EL1_GCIE;
+               break;
+
        case SYS_ID_AA64MMFR0_EL1:
                /* Hide ExS, Secure Memory */
                val &= ~(ID_AA64MMFR0_EL1_EXS           |