[PATCH v1] arm64: errata: pass REVIDR when matching target implementation CPUs

Shameer Kolothum Thodi skolothumtho at nvidia.com
Tue Sep 1 04:27:17 PDT 2026



> -----Original Message-----
> From: Khushit Shah <khushit.shah at nutanix.com>
> Sent: 31 August 2026 11:55
> To: Catalin Marinas <catalin.marinas at arm.com>; Will Deacon
> <will at kernel.org>
> Cc: Mark Rutland <mark.rutland at arm.com>; Marc Zyngier <maz at kernel.org>;
> Shameer Kolothum Thodi <skolothumtho at nvidia.com>; Oliver Upton
> <oupton at kernel.org>; linux-arm-kernel at lists.infradead.org; linux-
> kernel at vger.kernel.org; stable at vger.kernel.org; Khushit Shah
> <khushit.shah at nutanix.com>
> Subject: [PATCH v1] arm64: errata: pass REVIDR when matching target
> implementation CPUs
> 
> External email: Use caution opening links or attachments
> 
> 
> When target implementation CPUs are provided, is_affected_midr_range()
> accidentally passed the MIDR as both arguments to
> __is_affected_midr_range(),
> so the REVIDR mask check operated on the wrong register.
> 
> Pass REVIDR as intended.
> 
> Fixes: 86edf6bdcf05 ("smccc/kvm_guest: Enable errata based on
> implementation CPUs")
> Cc: stable at vger.kernel.org
> Signed-off-by: Khushit Shah <khushit.shah at nutanix.com>

Reviewed-by: Shameer Kolothum <skolothumtho at nvidia.com>

Thanks,
Shameer

> ---
>  arch/arm64/kernel/cpu_errata.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kernel/cpu_errata.c
> b/arch/arm64/kernel/cpu_errata.c
> index 5db8f0619e4b..b33dccfafaf8 100644
> --- a/arch/arm64/kernel/cpu_errata.c
> +++ b/arch/arm64/kernel/cpu_errata.c
> @@ -82,7 +82,7 @@ is_affected_midr_range(const struct
> arm64_cpu_capabilities *entry, int scope)
> 
>         for (i = 0; i < target_impl_cpu_num; i++) {
>                 if (__is_affected_midr_range(entry, target_impl_cpus[i].midr,
> -                                            target_impl_cpus[i].midr))
> +                                            target_impl_cpus[i].revidr))
>                         return true;
>         }
>         return false;
> --
> 2.39.3




More information about the linux-arm-kernel mailing list