Skip to content

Commit 79e3781

Browse files
kimphillamdgregkh
authored andcommitted
x86/cpu/amd: Make erratum #1054 a legacy erratum
[ Upstream commit e2abfc0 ] Commit 21b5ee5 ("x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF") mistakenly added erratum #1054 as an OS Visible Workaround (OSVW) ID 0. Erratum #1054 is not OSVW ID 0 [1], so make it a legacy erratum. There would never have been a false positive on older hardware that has OSVW bit 0 set, since the IRPERF feature was not available. However, save a couple of RDMSR executions per thread, on modern system configurations that correctly set non-zero values in their OSVW_ID_Length MSRs. [1] Revision Guide for AMD Family 17h Models 00h-0Fh Processors. The revision guide is available from the bugzilla link below. Fixes: 21b5ee5 ("x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF") Reported-by: Andrew Cooper <[email protected]> Signed-off-by: Kim Phillips <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Signed-off-by: Sasha Levin <[email protected]>
1 parent 86c7d24 commit 79e3781

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/x86/kernel/cpu/amd.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,8 +1117,7 @@ static const int amd_erratum_383[] =
11171117

11181118
/* #1054: Instructions Retired Performance Counter May Be Inaccurate */
11191119
static const int amd_erratum_1054[] =
1120-
AMD_OSVW_ERRATUM(0, AMD_MODEL_RANGE(0x17, 0, 0, 0x2f, 0xf));
1121-
1120+
AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x17, 0, 0, 0x2f, 0xf));
11221121

11231122
static bool cpu_has_amd_erratum(struct cpuinfo_x86 *cpu, const int *erratum)
11241123
{

0 commit comments

Comments
 (0)