From patchwork Thu Apr 7 00:06:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 8767651 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 5F149C0553 for ; Thu, 7 Apr 2016 00:09:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 98896201CD for ; Thu, 7 Apr 2016 00:09:23 +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 BE581201EC for ; Thu, 7 Apr 2016 00:09:22 +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 1anxTc-0002oH-6U; Thu, 07 Apr 2016 00:07:12 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anxTa-0002mH-LH for xen-devel@lists.xensource.com; Thu, 07 Apr 2016 00:07:10 +0000 Received: from [85.158.139.211] by server-16.bemta-5.messagelabs.com id 5C/A5-27399-DA4A5075; Thu, 07 Apr 2016 00:07:09 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNLMWRWlGSWpSXmKPExsVybKJsh+7aJaz hBudn8Vrcm/Ke3YHRY3vfLvYAxijWzLyk/IoE1oxDHUfYC95zVDTOP87awLiXvYuRi0NIYCqj RNPvXihnBpPEvUnLWLoYOTjYBHQlbt6W6GLk5BARSJC4+/QbM0gNs8A3Jondp58xgySEBZIkr n84ywJiswioSrz9do4RxOYVcJRoX/2WCcSWEJCTaPmxmxXE5gSKLz81FcwWEnCQaFy6hBGiJk NiXs8cVgjbS2LRjUtQtprE1XObmCcw8i1gZFjFqFGcWlSWWqRraK6XVJSZnlGSm5iZo2toYKq Xm1pcnJiempOYVKyXnJ+7iREYKAxAsIPx4mnPQ4ySHExKoryulazhQnxJ+SmVGYnFGfFFpTmp xYcYZTg4lCR4+xYD5QSLUtNTK9Iyc4AhC5OW4OBREuFdAZLmLS5IzC3OTIdInWJUlBLnnQiSE ABJZJTmwbXB4uQSo6yUMC8j0CFCPAWpRbmZJajyrxjFORiVhHnzQKbwZOaVwE1/BbSYCWhxvT ATyOKSRISUVANjtZjMg2Q9c4HaBUzOXlkrL1xl+/JDoUDkexl7SN6Rh3tfvbu649+PY7rf9us mGe6UvJzGEJOaXrWN7fHy0J9Hdt09Uaar63Q1P0JuxZutE+rOMd3IW+Zer2p+f+eMN8XXWJ9P 3NrqFZbheDBP/5qcpteFfUa8Rxok/yuxhG6Lufbgh8zva8YPlFiKMxINtZiLihMBAl7k+Y4CA AA= X-Env-Sender: mcgrof@kernel.org X-Msg-Ref: server-2.tower-206.messagelabs.com!1459987627!17305849!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 2246 invoked from network); 7 Apr 2016 00:07:09 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-2.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 7 Apr 2016 00:07:09 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 043DE20274; Thu, 7 Apr 2016 00:07:07 +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 9505D2028D; Thu, 7 Apr 2016 00:07:05 +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, 6 Apr 2016 17:06:30 -0700 Message-Id: <1459987594-5434-11-git-send-email-mcgrof@kernel.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1459987594-5434-1-git-send-email-mcgrof@kernel.org> References: <1459987594-5434-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: xen-devel@lists.xensource.com, matt@codeblueprint.co.uk, andrew.cooper3@citrix.com, x86@kernel.org, linux-kernel@vger.kernel.org, luto@amacapital.net, jlee@suse.com, "Luis R. Rodriguez" , lguest@lists.ozlabs.org, glin@suse.com, david.vrabel@citrix.com, boris.ostrovsky@oracle.com, andriy.shevchenko@linux.intel.com Subject: [Xen-devel] [PATCH v4 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);