From patchwork Fri Apr 8 23:40:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 8786991 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B0BFBC0553 for ; Fri, 8 Apr 2016 23:42:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E720E2027D for ; Fri, 8 Apr 2016 23:42:55 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 184DC2024D for ; Fri, 8 Apr 2016 23:42:55 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aog1S-0000B7-6I; Fri, 08 Apr 2016 23:41:06 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aog1Q-00008d-Rn for xen-devel@lists.xensource.com; Fri, 08 Apr 2016 23:41:04 +0000 Received: from [85.158.137.68] by server-5.bemta-3.messagelabs.com id 80/28-03651-09148075; Fri, 08 Apr 2016 23:41:04 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRWlGSWpSXmKPExsVybKJsh26/I0e 4wd6J8hb3prxnd2D02N63iz2AMYo1My8pvyKBNeNQxxH2gvccFY3zj7M2MO5l72Lk5BASmMoo sb1bE8KewSTx6V5gFyMHB5uArsTN2xIgYRGBBIm7T78xdzFycTALnGOR2HBpPhtIQlggSWLr3 j2MIDaLgKrEgS+LWEFsXgEniY1v5jGB2BICchItP3aDxTmB4gf3/WGG2OUocfXMGxaImgyJeT 1zWCFsL4lFNy5B2WoSV89tYp7AyLeAkWEVo0ZxalFZapGuoZleUlFmekZJbmJmjq6hgbFebmp xcWJ6ak5iUrFecn7uJkZgkDAAwQ7GVds9DzFKcjApifJue8geLsSXlJ9SmZFYnBFfVJqTWnyI UYaDQ0mCt9CBI1xIsCg1PbUiLTMHGK4waQkOHiUR3rP2QGne4oLE3OLMdIjUKUZFKXFeN5A+A ZBERmkeXBssRi4xykoJ8zICHSLEU5BalJtZgir/ilGcg1FJmLceZApPZl4J3PRXQIuZgBZf4G cDWVySiJCSamCcoNzeMM8q3+ySacvDWTK6NcUvrzBMsPMr9ORxc+RR3uB3x3ZVvmaI8fr1F7r /iV3beq5bkHGNTdNC2bMJ22O7Norq7r171vZg3poTIa9mBghsSNj3oVS+JkL2u3DYhYR38nf+ mN1d/nqtxgSh3zOrLOc9deD4nO279+2jH/dyVwabnPl1fZmUEktxRqKhFnNRcSIAbNI3Z4wCA AA= X-Env-Sender: mcgrof@kernel.org X-Msg-Ref: server-9.tower-31.messagelabs.com!1460158862!5254846!1 X-Originating-IP: [198.145.29.136] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.28; banners=-,-,- X-VirusChecked: Checked Received: (qmail 13876 invoked from network); 8 Apr 2016 23:41:03 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-9.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 8 Apr 2016 23:41:03 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 28E6A20364; Fri, 8 Apr 2016 23:41:01 +0000 (UTC) Received: from garbanzo.do-not-panic.com (c-73-15-241-2.hsd1.ca.comcast.net [73.15.241.2]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E5B1C20375; Fri, 8 Apr 2016 23:40:58 +0000 (UTC) From: "Luis R. Rodriguez" To: bp@alien8.de, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, rusty@rustcorp.com.au Date: Fri, 8 Apr 2016 16:40:21 -0700 Message-Id: <1460158825-13117-11-git-send-email-mcgrof@kernel.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1460158825-13117-1-git-send-email-mcgrof@kernel.org> References: <1460158825-13117-1-git-send-email-mcgrof@kernel.org> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cc: kozerkov@parallels.com, matt@codeblueprint.co.uk, lv.zheng@intel.com, xen-devel@lists.xensource.com, joro@8bytes.org, x86@kernel.org, robert.moore@intel.com, linux-acpi@vger.kernel.org, glin@suse.com, lenb@kernel.org, josh@joshtriplett.org, jlee@suse.com, lguest@lists.ozlabs.org, boris.ostrovsky@oracle.com, andriy.shevchenko@linux.intel.com, toshi.kani@hp.com, andrew.cooper3@citrix.com, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, luto@amacapital.net, "Luis R. Rodriguez" , david.vrabel@citrix.com, tiwai@suse.de Subject: [Xen-devel] [PATCH v5 10/14] x86/cpu/intel: remove not needed paravirt_enabled() for f00f work around X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Luis R. Rodriguez --- 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 f71a34944b56..66509285ffdd 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);