lkml.org 
[lkml]   [2021]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] perf/x86/kvm: Fix inverted pebs_no_isolation check
Date
The pebs_no_isolation optimization check is inverted. We want to disable
PEBS isolation when the microcode is at least the revision in the table,
not for older microcode. So remove the extra !.

It meant that the new microcodes did unnecessary work, and the old
microcodes could crash the PEBS. Presumably most people already
running with newer microcodes, so that functional impact is small.
But it should speed up the newer systems by the 2-4% claimed in
the original patch.

Cc: jmattson@google.com
Fixes: 9b545c04abd4 ("perf/x86/kvm: Avoid unnecessary work ...")
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
arch/x86/events/intel/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index 5bac48d5c18e..d74deadd3a6d 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -4532,7 +4532,7 @@ static const struct x86_cpu_desc isolation_ucodes[] = {

static void intel_check_pebs_isolation(void)
{
- x86_pmu.pebs_no_isolation = !x86_cpu_has_min_microcode_rev(isolation_ucodes);
+ x86_pmu.pebs_no_isolation = x86_cpu_has_min_microcode_rev(isolation_ucodes);
}

static __init void intel_pebs_isolation_quirk(void)
--
2.25.4
\
 
 \ /
  Last update: 2022-09-17 16:10    [W:0.034 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site