From patchwork Fri Apr 8 23:58:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 8787471 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3AA8C9F36E for ; Sat, 9 Apr 2016 00:00:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7218120148 for ; Sat, 9 Apr 2016 00:00:31 +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 8B3C5202E9 for ; Sat, 9 Apr 2016 00:00:30 +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 1aogIX-0002z9-D8; Fri, 08 Apr 2016 23:58:45 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aogIW-0002yj-EF for xen-devel@lists.xensource.com; Fri, 08 Apr 2016 23:58:44 +0000 Received: from [85.158.143.35] by server-2.bemta-6.messagelabs.com id 8A/42-09532-3B548075; Fri, 08 Apr 2016 23:58:43 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRWlGSWpSXmKPExsVybKJsh+5mV45 wg8/9fBb3prxnd2D02N63iz2AMYo1My8pvyKBNeNQxxH2gvccFY3zj7M2MO5l72Lk4hASmMoo 8fvATWYIZwaTxJRrD1i6GDk42AR0JW7eluhi5OQQEUiQuPv0G1gNs8A5FokNl+azgSSEBZIkt u7dwwhiswioSpxftoUVxOYVcJRYM3EjM4gtISAn0fJjN1icU8BJ4uC+P2BxIaCaq2fesEDUZE jM65nDCmF7SSy6cQnKVpO4em4T8wRGvgWMDKsY1YtTi8pSi3SN9JKKMtMzSnITM3N0DQ3M9HJ Ti4sT01NzEpOK9ZLzczcxAsOEAQh2MC7763SIUZKDSUmUd9tD9nAhvqT8lMqMxOKM+KLSnNTi Q4wyHBxKErwGLhzhQoJFqempFWmZOcCAhUlLcPAoifA6g6R5iwsSc4sz0yFSpxgVpcR5JUASA iCJjNI8uDZYlFxilJUS5mUEOkSIpyC1KDezBFX+FaM4B6OSMK8DyBSezLwSuOmvgBYzAS2+wM 8GsrgkESEl1cAYuSzi1vSdrg/u//njPfm3xnz/ayeDJ9pNfmMjuP/k20P+teKe02+YNmeJhpw K/24bM/0xw5MbLWV7RRJ+Rh1Xf18bP8+0U0js/GyN8Nodiy0EhOevfHn0b7FGSI4m17mZRh/W hfY+YC7299Dja13nYy9jvp6x9XBK888pU3wNd+3Q7eqdfe+mEktxRqKhFnNRcSIAvWdXXY0CA AA= X-Env-Sender: mcgrof@kernel.org X-Msg-Ref: server-8.tower-21.messagelabs.com!1460159922!8317912!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 58308 invoked from network); 8 Apr 2016 23:58:43 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-8.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 8 Apr 2016 23:58:43 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 147B920328; Fri, 8 Apr 2016 23:58:41 +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 7F34A202EB; Fri, 8 Apr 2016 23:58:39 +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:58:38 -0700 Message-Id: <1460159918-13428-1-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);