[PATCH 2/3] KVM: arm64: Add GIC idregs sanitisation to common framework

Fuad Tabba fuad.tabba at linux.dev
Tue Nov 24 01:05:00 PST 2026


Hi Marc,

On Mon, 23 Nov 2026 19:24:56 +0000, Marc Zyngier <maz at kernel.org> wrote:
> It takes no least than 3 ID registers to describe whether a GICv3 or
> GICv5 is supported. Define the sanitisation tables for the relevant
> fields and the set of relevant callbacks.

nit: s/no least than/no less than/

[...]
> diff --git a/arch/arm64/kvm/config.c b/arch/arm64/kvm/config.c
[...]
> +static bool feat_gicv3(struct kvm *kvm)
> +{
> +        return (irqchip_in_kernel(kvm) &&
> +                kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3);
> +}

nit: could this be irqchip_in_kernel(kvm) && vgic_is_v3(kvm), and
feat_gcie() use vgic_is_v5() the same way?

[...]
> +static const struct reg_bits_to_feat_map aa64pfr0_gicv3[] = {
> +        ENUM_FEAT(ID_AA64PFR0_EL1_GIC_IMP, feat_gicv3 ),
> +        ENUM_FEAT(ID_AA64PFR0_EL1_GIC_NI, NULL ),
> +};

nit: stray spaces before the closing parentheses.

Reviewed-by: Fuad Tabba <fuad.tabba at linux.dev>

Cheers,
/fuad



More information about the linux-arm-kernel mailing list