[PATCH v7 12/41] KVM: arm64: gic-v5: Sanitize ID_AA64PFR2_EL1.GCIE
Marc Zyngier
maz at kernel.org
Tue Mar 24 08:25:14 PDT 2026
On Tue, 24 Mar 2026 14:53:58 +0000,
Mark Brown <broonie at kernel.org> wrote:
>
> [1 <text/plain; us-ascii (7bit)>]
> On Tue, Mar 24, 2026 at 02:48:04PM +0000, Marc Zyngier wrote:
> > Mark Brown <broonie at kernel.org> wrote:
>
> > > We're also seeing an issue with this in the aarch32_id_regs test:
>
> ...
>
> > > which for some reason only manifests on TX2 of the platforms I've
> > > seen.
>
> > Is your TX2 the only machine you have that is AArch64 only at all ELs?
>
> Yes, that should be the case.
The hack below fixes it on my favourite Qualcomm box.
M.
diff --git a/arch/arm64/kvm/vgic/vgic-init.c b/arch/arm64/kvm/vgic/vgic-init.c
index fd872079f2a24..7212cb3766d3d 100644
--- a/arch/arm64/kvm/vgic/vgic-init.c
+++ b/arch/arm64/kvm/vgic/vgic-init.c
@@ -696,7 +696,8 @@ void kvm_vgic_finalize_idregs(struct kvm *kvm)
break;
case KVM_DEV_TYPE_ARM_VGIC_V3:
aa64pfr0 |= SYS_FIELD_PREP_ENUM(ID_AA64PFR0_EL1, GIC, IMP);
- pfr1 |= SYS_FIELD_PREP_ENUM(ID_PFR1_EL1, GIC, GICv3);
+ if (kvm_supports_32bit_el0())
+ pfr1 |= SYS_FIELD_PREP_ENUM(ID_PFR1_EL1, GIC, GICv3);
break;
case KVM_DEV_TYPE_ARM_VGIC_V5:
aa64pfr2 |= SYS_FIELD_PREP_ENUM(ID_AA64PFR2_EL1, GCIE, IMP);
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list