[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-0bf17c102177d5da9363bf8b1e4704b9996d5079@git.kernel.org>
Date: Sat, 6 Jan 2018 13:06:00 -0800
From: tip-bot for Tom Lendacky <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: hpa@...or.com, tim.c.chen@...ux.intel.com, peterz@...radead.org,
dave.hansen@...el.com, torvalds@...ux-foundation.org, bp@...en8.de,
dwmw@...zon.co.uk, tglx@...utronix.de, mingo@...nel.org,
pjt@...gle.com, thomas.lendacky@....com,
gregkh@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: [tip:x86/pti] x86/cpu/AMD: Use LFENCE_RDTSC instead of MFENCE_RDTSC
Commit-ID: 0bf17c102177d5da9363bf8b1e4704b9996d5079
Gitweb: https://git.kernel.org/tip/0bf17c102177d5da9363bf8b1e4704b9996d5079
Author: Tom Lendacky <thomas.lendacky@....com>
AuthorDate: Fri, 5 Jan 2018 10:07:56 -0600
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Sat, 6 Jan 2018 21:57:40 +0100
x86/cpu/AMD: Use LFENCE_RDTSC instead of MFENCE_RDTSC
With LFENCE now a serializing instruction, set the LFENCE_RDTSC
feature since the LFENCE instruction has less overhead than the
MFENCE instruction.
Signed-off-by: Tom Lendacky <thomas.lendacky@....com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Borislav Petkov <bp@...en8.de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Dave Hansen <dave.hansen@...el.com>
Cc: Tim Chen <tim.c.chen@...ux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@...ux-foundation.org>
Cc: David Woodhouse <dwmw@...zon.co.uk>
Cc: Paul Turner <pjt@...gle.com>
Cc: stable@...r.kernel.org
Link: https://lkml.kernel.org/r/20180105160756.23786.4220.stgit@tlendack-t1.amdoffice.net
---
arch/x86/kernel/cpu/amd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index fbd439e..b221fe5 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -838,8 +838,8 @@ static void init_amd(struct cpuinfo_x86 *c)
msr_set_bit(MSR_F10H_DECFG,
MSR_F10H_DECFG_LFENCE_SERIALIZE_BIT);
- /* MFENCE stops RDTSC speculation */
- set_cpu_cap(c, X86_FEATURE_MFENCE_RDTSC);
+ /* A serializing LFENCE stops RDTSC speculation */
+ set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
}
/*
Powered by blists - more mailing lists