[tip:x86/boot] x86/cpu/intel: Remove not needed paravirt_enabled() use for F00F work around

From: tip-bot for Luis R. Rodriguez
Date: Fri Apr 22 2016 - 05:54:06 EST


Commit-ID: fa392794ed8329379f3f637da7c3c2f078309a77
Gitweb: http://git.kernel.org/tip/fa392794ed8329379f3f637da7c3c2f078309a77
Author: Luis R. Rodriguez <mcgrof@xxxxxxxxxx>
AuthorDate: Wed, 13 Apr 2016 17:04:40 -0700
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Fri, 22 Apr 2016 10:29:05 +0200

x86/cpu/intel: Remove not needed paravirt_enabled() use for F00F work around

The X86_BUG_F00F work around is responsible for fixing up the error
generated on attempted F00F exploitation from an OOPS to a SIGILL.

There is no reason why this code should not be allowed to run on
PV guest on a F00F-affected CPU -- it would simply never trigger.
The pv_enabled() check was there only to avoid printing the f00f
workaround, so removing the check is purely a cosmetic change.

Suggested-by: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Cc: Brian Gerst <brgerst@xxxxxxxxx>
Cc: Denys Vlasenko <dvlasenk@xxxxxxxxxx>
Cc: H. Peter Anvin <hpa@xxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: andrew.cooper3@xxxxxxxxxx
Cc: andriy.shevchenko@xxxxxxxxxxxxxxx
Cc: bigeasy@xxxxxxxxxxxxx
Cc: boris.ostrovsky@xxxxxxxxxx
Cc: david.vrabel@xxxxxxxxxx
Cc: ffainelli@xxxxxxxxxx
Cc: george.dunlap@xxxxxxxxxx
Cc: glin@xxxxxxxx
Cc: jgross@xxxxxxxx
Cc: jlee@xxxxxxxx
Cc: josh@xxxxxxxxxxxxxxxx
Cc: julien.grall@xxxxxxxxxx
Cc: konrad.wilk@xxxxxxxxxx
Cc: kozerkov@xxxxxxxxxxxxx
Cc: lenb@xxxxxxxxxx
Cc: lguest@xxxxxxxxxxxxxxxx
Cc: linux-acpi@xxxxxxxxxxxxxxx
Cc: lv.zheng@xxxxxxxxx
Cc: matt@xxxxxxxxxxxxxxxxxxx
Cc: mbizon@xxxxxxxxxx
Cc: rjw@xxxxxxxxxxxxx
Cc: robert.moore@xxxxxxxxx
Cc: rusty@xxxxxxxxxxxxxxx
Cc: tiwai@xxxxxxx
Cc: toshi.kani@xxxxxx
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Link: http://lkml.kernel.org/r/1460592286-300-11-git-send-email-mcgrof@xxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
arch/x86/kernel/cpu/intel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index 1f7fdb9..016b3d9 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -233,7 +233,7 @@ static void intel_workarounds(struct cpuinfo_x86 *c)
* The Quark is also family 5, but does not have the same bug.
*/
clear_cpu_bug(c, X86_BUG_F00F);
- if (!paravirt_enabled() && c->x86 == 5 && c->x86_model < 9) {
+ if (c->x86 == 5 && c->x86_model < 9) {
static int f00f_workaround_enabled;

set_cpu_bug(c, X86_BUG_F00F);