From patchwork Thu Apr 14 00:04:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 8829971 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 280DDC0553 for ; Thu, 14 Apr 2016 00:07:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 668A720173 for ; Thu, 14 Apr 2016 00:07:20 +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 7CC4D20274 for ; Thu, 14 Apr 2016 00:07:19 +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 1aqUmb-0007XX-7V; Thu, 14 Apr 2016 00:05:17 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqUma-0007W5-3y for xen-devel@lists.xensource.com; Thu, 14 Apr 2016 00:05:16 +0000 Received: from [85.158.143.35] by server-1.bemta-6.messagelabs.com id DF/A5-18833-BBEDE075; Thu, 14 Apr 2016 00:05:15 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRWlGSWpSXmKPExsVybKJsh+6ue3z hBr8umVncm/Ke3YHRY3vfLvYAxijWzLyk/IoE1oxDHUfYC95zVDTOP87awLiXvYuRi0NIYCqj xMODp6GcGUwSt6buBnI4ONgEdCVu3pboYuTkEBFIkLj79BszSA2zwDFWiXmr5rKCJIQFkiSWL bvJBlLPIqAqcXcfI0iYV8BBYv/tLWwgtoSAnETLj91g5ZxA8QU7V4DZQgL2Ev23DzBC1GRIzO uZwwphe0ksunEJylaTuHpuE/MERr4FjAyrGNWLU4vKUot0DfWSijLTM0pyEzNzdA0NzPRyU4u LE9NTcxKTivWS83M3MQKDhAEIdjDufO50iFGSg0lJlNdkFV+4EF9SfkplRmJxRnxRaU5q8SFG GQ4OJQnew3eBcoJFqempFWmZOcBwhUlLcPAoifBuB0nzFhck5hZnpkOkTjEqSonzzgBJCIAkM krz4NpgMXKJUVZKmJcR6BAhnoLUotzMElT5V4ziHIxKwrxTQKbwZOaVwE1/BbSYCWhx2TtekM UliQgpqQbGHrusR/9ERc802Od1fuERe5WwkOlmrmTkLA5NVfmuN/OZ1KcvS7K5IqZ/6HrJ/w6 lN1Mfba0+3Kb2f/3zAM69FZ8ffPtYoPpxvnPvvDXer030zf52mc1cWpuqFjDrYbfS8o/fPn3M qnv3ar/2C6f+V7a/OnPq777VfhJ6POpweE3i8rMv/2W0KbEUZyQaajEXFScCAPQBYjSMAgAA X-Env-Sender: mcgrof@kernel.org X-Msg-Ref: server-5.tower-21.messagelabs.com!1460592313!9216883!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 9302 invoked from network); 14 Apr 2016 00:05:14 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-5.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 14 Apr 2016 00:05:14 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 95DFB20381; Thu, 14 Apr 2016 00:05:12 +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 A0E0720382; Thu, 14 Apr 2016 00:05:10 +0000 (UTC) From: "Luis R. Rodriguez" To: bp@alien8.de, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, rusty@rustcorp.com.au Date: Wed, 13 Apr 2016 17:04:40 -0700 Message-Id: <1460592286-300-11-git-send-email-mcgrof@kernel.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1460592286-300-1-git-send-email-mcgrof@kernel.org> References: <1460592286-300-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, bigeasy@linutronix.de, lv.zheng@intel.com, ffainelli@freebox.fr, mbizon@freebox.fr, xen-devel@lists.xensource.com, x86@kernel.org, robert.moore@intel.com, linux-acpi@vger.kernel.org, glin@suse.com, lenb@kernel.org, julien.grall@linaro.org, josh@joshtriplett.org, george.dunlap@citrix.com, jlee@suse.com, lguest@lists.ozlabs.org, boris.ostrovsky@oracle.com, andriy.shevchenko@linux.intel.com, jgross@suse.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 v6 10/16] 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);