Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp889282imm; Tue, 3 Jul 2018 01:37:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKWoLSRkU5lR+eM3HAeop0AeVZhJh1SKwh7f4TChXOo9Kidu156rr04L9magPAqwiR7vb7Q X-Received: by 2002:a17:902:981:: with SMTP id 1-v6mr29373451pln.11.1530607034593; Tue, 03 Jul 2018 01:37:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530607034; cv=none; d=google.com; s=arc-20160816; b=ElZkt1LEm0O4hK980jFOEn8r7AVEWKNt9KSvYRYAuM8ymYc/VytBGo8igZhCZXB88V NOQwOTTqwiKFdySC+0hOCeLpfqcusNXUB+EL9IIzgGPilnnzjl8nic1ztq05k/4uUwy8 POGcgnidaso0SYWCSWTVjj1azXdpMGDL942xNBMaBH+rabI3tD8kcwpWAACPJEVG87j4 yA0ydnzuph7BBlwrabpHVwE4V1o7cLIpqWwaaemoJkRnNMu8oPaAufZg7KIgZrHwa5r1 KZ/7acj/GkmiDY9I7jnLnOZr0c3i9lNhRhC01f3+wb3uDavSOvxhJcXuUm04K4t/xsgj vX3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=1alytkfNbim1ueLL/1B0r+nBE3CfZT+i0gpDzHfi1tU=; b=m/7Km+I/l0K9FOJVFXS7UgVmUO/wf1/GiUEn4zP0i/+ctTCfAEY70UrgqlSsw/ZIix e4DENfxvaV269t/0494OP0ThZJEISN3MnT4LFUoLD5bEI3eNqjPmiSSObCG+eEvkZWRA OWAxtdE5U0ntL/qo0LC2o13S9CtMnyCA5OHk8vXI/Vr7ghYuZr0M4y6AdpyHd0ViRqE7 v4RJwqorL1XmCGlRISycxiK67RmOngcra/lcgrZucwMROjvGMUs2R6RJ/HyFbpVzKGK4 QO0YMbSG5R5ibkUMy09I4Nw9qEnUOVoOTxnSkbTwDpfCsVh7sEZa2Pskg1oq4luC7lwH lEUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z20-v6si697358pfj.337.2018.07.03.01.36.59; Tue, 03 Jul 2018 01:37:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933791AbeGCIfa (ORCPT + 99 others); Tue, 3 Jul 2018 04:35:30 -0400 Received: from terminus.zytor.com ([198.137.202.136]:37815 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932683AbeGCIef (ORCPT ); Tue, 3 Jul 2018 04:34:35 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w638XuWI214025 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 3 Jul 2018 01:33:56 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w638Xrfg214021; Tue, 3 Jul 2018 01:33:53 -0700 Date: Tue, 3 Jul 2018 01:33:53 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Tom Lendacky Message-ID: Cc: peterz@infradead.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, thomas.lendacky@amd.com, dwmw@amazon.co.uk, konrad.wilk@oracle.com, hpa@zytor.com, torvalds@linux-foundation.org, bpetkov@suse.de, mingo@kernel.org Reply-To: bpetkov@suse.de, mingo@kernel.org, torvalds@linux-foundation.org, konrad.wilk@oracle.com, dwmw@amazon.co.uk, hpa@zytor.com, linux-kernel@vger.kernel.org, thomas.lendacky@amd.com, tglx@linutronix.de, peterz@infradead.org In-Reply-To: <20180702213553.29202.21089.stgit@tlendack-t1.amdoffice.net> References: <20180702213553.29202.21089.stgit@tlendack-t1.amdoffice.net> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/pti] x86/bugs: Update when to check for the LS_CFG SSBD mitigation Git-Commit-ID: 845d382bb15c6e7dc5026c0ff919c5b13fc7e11b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 845d382bb15c6e7dc5026c0ff919c5b13fc7e11b Gitweb: https://git.kernel.org/tip/845d382bb15c6e7dc5026c0ff919c5b13fc7e11b Author: Tom Lendacky AuthorDate: Mon, 2 Jul 2018 16:35:53 -0500 Committer: Ingo Molnar CommitDate: Tue, 3 Jul 2018 09:45:48 +0200 x86/bugs: Update when to check for the LS_CFG SSBD mitigation If either the X86_FEATURE_AMD_SSBD or X86_FEATURE_VIRT_SSBD features are present, then there is no need to perform the check for the LS_CFG SSBD mitigation support. Signed-off-by: Tom Lendacky Cc: Borislav Petkov Cc: David Woodhouse Cc: Konrad Rzeszutek Wilk Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180702213553.29202.21089.stgit@tlendack-t1.amdoffice.net Signed-off-by: Ingo Molnar --- arch/x86/kernel/cpu/amd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 082d7875cef8..38915fbfae73 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -543,7 +543,9 @@ static void bsp_init_amd(struct cpuinfo_x86 *c) nodes_per_socket = ((value >> 3) & 7) + 1; } - if (c->x86 >= 0x15 && c->x86 <= 0x17) { + if (!boot_cpu_has(X86_FEATURE_AMD_SSBD) && + !boot_cpu_has(X86_FEATURE_VIRT_SSBD) && + c->x86 >= 0x15 && c->x86 <= 0x17) { unsigned int bit; switch (c->x86) {