[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200417143356.26054-1-kim.phillips@amd.com>
Date: Fri, 17 Apr 2020 09:33:56 -0500
From: Kim Phillips <kim.phillips@....com>
To: Borislav Petkov <bp@...en8.de>, Borislav Petkov <bp@...e.de>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>, kim.phillips@....com
Cc: Andrew Cooper <andrew.cooper3@...rix.com>,
"H. Peter Anvin" <hpa@...or.com>, Andi Kleen <ak@...ux.intel.com>,
Tom Lendacky <thomas.lendacky@....com>,
Matt Fleming <matt@...eblueprint.co.uk>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Frank van der Linden <fllinden@...zon.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] x86/cpu/amd: Make erratum #1054 a legacy erratum
Commit
21b5ee59ef18 ("x86/cpu/amd: Enable the fixed Instructions Retired
counter IRPERF")
mistakenly added erratum #1054 as OS Visible Work-around (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.
We do however save a couple of rdmsrs 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: 21b5ee59ef18 ("x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF")
Reported-by: Andrew Cooper <andrew.cooper3@...rix.com>
Signed-off-by: Kim Phillips <kim.phillips@....com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537
Cc: Borislav Petkov <bp@...e.de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: Tom Lendacky <thomas.lendacky@....com>
Cc: Matt Fleming <matt@...eblueprint.co.uk>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Frank van der Linden <fllinden@...zon.com>
Cc: x86@...nel.org
Cc: linux-kernel@...r.kernel.org
---
arch/x86/kernel/cpu/amd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 1f875fbe1384..8caf29706eac 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -1111,7 +1111,7 @@ static const int amd_erratum_383[] =
/* #1054: Instructions Retired Performance Counter May Be Inaccurate */
static const int amd_erratum_1054[] =
- AMD_OSVW_ERRATUM(0, AMD_MODEL_RANGE(0x17, 0, 0, 0x2f, 0xf));
+ AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x17, 0, 0, 0x2f, 0xf));
static bool cpu_has_amd_erratum(struct cpuinfo_x86 *cpu, const int *erratum)
--
2.20.1
Powered by blists - more mailing lists