Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] arm64: errata: pass REVIDR when matching target implementation CPUs
@ 2026-08-31 10:54 Khushit Shah
  2026-09-01 11:27 ` Shameer Kolothum Thodi
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Khushit Shah @ 2026-08-31 10:54 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon
  Cc: Mark Rutland, Marc Zyngier, Shameer Kolothum, Oliver Upton,
	linux-arm-kernel, linux-kernel, stable, Khushit Shah

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@vger.kernel.org
Signed-off-by: Khushit Shah <khushit.shah@nutanix.com>
---
 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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [PATCH v1] arm64: errata: pass REVIDR when matching target implementation CPUs
  2026-08-31 10:54 [PATCH v1] arm64: errata: pass REVIDR when matching target implementation CPUs Khushit Shah
@ 2026-09-01 11:27 ` Shameer Kolothum Thodi
  2026-09-02  7:50 ` Marc Zyngier
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Shameer Kolothum Thodi @ 2026-09-01 11:27 UTC (permalink / raw)
  To: Khushit Shah, Catalin Marinas, Will Deacon
  Cc: Mark Rutland, Marc Zyngier, Oliver Upton,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org



> -----Original Message-----
> From: Khushit Shah <khushit.shah@nutanix.com>
> Sent: 31 August 2026 11:55
> To: Catalin Marinas <catalin.marinas@arm.com>; Will Deacon
> <will@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>; Marc Zyngier <maz@kernel.org>;
> Shameer Kolothum Thodi <skolothumtho@nvidia.com>; Oliver Upton
> <oupton@kernel.org>; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; stable@vger.kernel.org; Khushit Shah
> <khushit.shah@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@vger.kernel.org
> Signed-off-by: Khushit Shah <khushit.shah@nutanix.com>

Reviewed-by: Shameer Kolothum <skolothumtho@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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] arm64: errata: pass REVIDR when matching target implementation CPUs
  2026-08-31 10:54 [PATCH v1] arm64: errata: pass REVIDR when matching target implementation CPUs Khushit Shah
  2026-09-01 11:27 ` Shameer Kolothum Thodi
@ 2026-09-02  7:50 ` Marc Zyngier
  2026-09-02 11:46 ` Zenghui Yu
  2026-09-03 13:59 ` Will Deacon
  3 siblings, 0 replies; 5+ messages in thread
From: Marc Zyngier @ 2026-09-02  7:50 UTC (permalink / raw)
  To: Khushit Shah
  Cc: Catalin Marinas, Will Deacon, Mark Rutland, Shameer Kolothum,
	Oliver Upton, linux-arm-kernel, linux-kernel, stable

On Mon, 31 Aug 2026 11:54:44 +0100,
Khushit Shah <khushit.shah@nutanix.com> wrote:
> 
> 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@vger.kernel.org
> Signed-off-by: Khushit Shah <khushit.shah@nutanix.com>

Acked-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Jazz isn't dead. It just smells funny.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] arm64: errata: pass REVIDR when matching target implementation CPUs
  2026-08-31 10:54 [PATCH v1] arm64: errata: pass REVIDR when matching target implementation CPUs Khushit Shah
  2026-09-01 11:27 ` Shameer Kolothum Thodi
  2026-09-02  7:50 ` Marc Zyngier
@ 2026-09-02 11:46 ` Zenghui Yu
  2026-09-03 13:59 ` Will Deacon
  3 siblings, 0 replies; 5+ messages in thread
From: Zenghui Yu @ 2026-09-02 11:46 UTC (permalink / raw)
  To: Khushit Shah
  Cc: Catalin Marinas, Will Deacon, Mark Rutland, Marc Zyngier,
	Shameer Kolothum, Oliver Upton, linux-arm-kernel, linux-kernel,
	stable

On 8/31/26 6:54 PM, Khushit Shah wrote:
> 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@vger.kernel.org
> Signed-off-by: Khushit Shah <khushit.shah@nutanix.com>
> ---
>  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;

Reviewed-by: Zenghui Yu (Huawei) <zenghui.yu@linux.dev>

Thanks,
Zenghui


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] arm64: errata: pass REVIDR when matching target implementation CPUs
  2026-08-31 10:54 [PATCH v1] arm64: errata: pass REVIDR when matching target implementation CPUs Khushit Shah
                   ` (2 preceding siblings ...)
  2026-09-02 11:46 ` Zenghui Yu
@ 2026-09-03 13:59 ` Will Deacon
  3 siblings, 0 replies; 5+ messages in thread
From: Will Deacon @ 2026-09-03 13:59 UTC (permalink / raw)
  To: Catalin Marinas, Khushit Shah
  Cc: kernel-team, Will Deacon, Mark Rutland, Marc Zyngier,
	Shameer Kolothum, Oliver Upton, linux-arm-kernel, linux-kernel,
	stable

On Mon, 31 Aug 2026 10:54:44 +0000, Khushit Shah wrote:
> 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.
> 
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: errata: pass REVIDR when matching target implementation CPUs
      https://git.kernel.org/arm64/c/5541432e09dc

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-03 13:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31 10:54 [PATCH v1] arm64: errata: pass REVIDR when matching target implementation CPUs Khushit Shah
2026-09-01 11:27 ` Shameer Kolothum Thodi
2026-09-02  7:50 ` Marc Zyngier
2026-09-02 11:46 ` Zenghui Yu
2026-09-03 13:59 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox