]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf/x86/amd: Warn only on new bits set
authorBreno Leitao <leitao@debian.org>
Tue, 1 Oct 2024 14:10:19 +0000 (07:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:37 +0000 (20:03 +0100)
commit1e5b551f8198ffe90714c3b018bf1db217b7c238
treeb7f8d3dbb626ef0590765da80609f303dac47d9b
parent94c6fd020081d481a663d805028b8c07df1c9cf7
perf/x86/amd: Warn only on new bits set

[ Upstream commit de20037e1b3c2f2ca97b8c12b8c7bca8abd509a7 ]

Warning at every leaking bits can cause a flood of message, triggering
various stall-warning mechanisms to fire, including CSD locks, which
makes the machine to be unusable.

Track the bits that are being leaked, and only warn when a new bit is
set.

That said, this patch will help with the following issues:

1) It will tell us which bits are being set, so, it is easy to
   communicate it back to vendor, and to do a root-cause analyzes.

2) It avoid the machine to be unusable, because, worst case
   scenario, the user gets less than 60 WARNs (one per unhandled bit).

Suggested-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Sandipan Das <sandipan.das@amd.com>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Link: https://lkml.kernel.org/r/20241001141020.2620361-1-leitao@debian.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/events/amd/core.c