Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1200370imm; Tue, 3 Jul 2018 07:13:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfugbCsUV88abxS0mQrC53jTsJgFmnXCsDAq4MWjPxcoDUX4YImR2LnnYEs+0Bs4BxzMSnM X-Received: by 2002:a17:902:7790:: with SMTP id o16-v6mr25707839pll.130.1530627224843; Tue, 03 Jul 2018 07:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530627224; cv=none; d=google.com; s=arc-20160816; b=IUfKikLokzajv6+T4bXv2lFq7vCuB5qMLwuWXaLPhxnPxtteinan3L4F6YQziT6uIO TOTFtU8MG/j0GZGLex3hQZr2AKPACDARlA7EThbSJEbx7df0hANzawsLadFm+ozm1ZTo RLSP+ayygcxdWuwzhX4AHNn5y8Scp21V/PKfc8h0ramgWmZ01fGGMssGB5ELxKN4M1vo 8IPD03QRmwgFe+ech99dYH+ugofMfNAnGjkXa6dUC7VfpbTyA3hyJ4mHIqtcH+uD9hdo FNFAuLcafPkPeX6BwahNJN/FkGvQyh5x4Eu6Nm2SbZcCHGdnYoGXnrFLQ08i66xfOJJH EzLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=colEYvsEFiV5UDydMhWAGtXdBbv8yYG/WAHinSYiVso=; b=jAVBpdiCjEZ+qv1qX0EI/qIo+zTbcT+itAG/nlKYTFwB4TNiJxIlfHXbExgEfY9033 HA0PdbpUHoGoAgb+/rwdcBps+25t+uMk/hQ2JFOkAUZHhApl5tFpKXl/envp33R99Fcf hXvGqiJOUnqP3WXlfLSI8x7K0ZO8M0lttwiqTwyK6NVm+aKEgNoj+KwmwCgqD8aVIlno vfgvhF/GP8FEOz9+qP2UjWmfzQ3MhGkRjD6+hfbh/Y0OvZgddih4zHXXNU76f3SDNdux kHmEgMmosK5QMB2ChrGtaNj92gxRebk+h6YA/Y3W5tmxw1//2xorWMhMMSMDlnwRCRdu XtiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=fmsOC8DB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q13-v6si1190808plr.220.2018.07.03.07.13.30; Tue, 03 Jul 2018 07:13:44 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=fmsOC8DB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753558AbeGCOMg (ORCPT + 99 others); Tue, 3 Jul 2018 10:12:36 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:45256 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753036AbeGCOMf (ORCPT ); Tue, 3 Jul 2018 10:12:35 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w63E99xN058688; Tue, 3 Jul 2018 14:12:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=colEYvsEFiV5UDydMhWAGtXdBbv8yYG/WAHinSYiVso=; b=fmsOC8DBfbAu/KMkB6/jksgU0hydpukTFUUXbpDgI3Q+hjTe3ZV/lbOb7IIzRcxxAcLw gquuKAXRAslRDQjHnT8dFJggk3ekVydEn7EygMawNOl3hX75KzdnTjPOveu3n1lhyfhB Jh8ujddG60LwW8v35u6vUcVz4VJFtXEksref6smDB4soTeaxao6xEqZ45zcbl5k7jqZ+ OiGHsRrJ5sZaUn6/BJV8oq0chFHv93qzHM/Q02TO6RdIEfdtSW9WvpCtKv+dPczFJNR+ M1mcB3anRuqdx7AaW2uQlS8YtZZyvVvsd3o6d6JHHLvhxIqRFbvwB999byt88XApGICX aw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2jwyccrvjf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 03 Jul 2018 14:12:06 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w63EC50Z016377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 3 Jul 2018 14:12:06 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w63EC5oB023580; Tue, 3 Jul 2018 14:12:05 GMT Received: from char.us.oracle.com (/10.137.176.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 03 Jul 2018 07:12:05 -0700 Received: by char.us.oracle.com (Postfix, from userid 1000) id E6E5B6A00E3; Tue, 3 Jul 2018 10:12:03 -0400 (EDT) Date: Tue, 3 Jul 2018 10:12:03 -0400 From: Konrad Rzeszutek Wilk To: Tom Lendacky Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , "H. Peter Anvin" , Thomas Gleixner , Borislav Petkov , David Woodhouse Subject: Re: [PATCH 1/2] x86/bugs: Update when to check for the LS_CFG SSBD mitigation Message-ID: <20180703141203.GJ8404@char.us.oracle.com> References: <20180702213543.29202.79104.stgit@tlendack-t1.amdoffice.net> <20180702213553.29202.21089.stgit@tlendack-t1.amdoffice.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180702213553.29202.21089.stgit@tlendack-t1.amdoffice.net> User-Agent: Mutt/1.8.3 (2017-05-23) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8942 signatures=668704 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=950 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807030163 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 02, 2018 at 04:35:53PM -0500, Tom Lendacky wrote: > 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 Reviewed-by: Konrad Rzeszutek Wilk > --- > 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 082d787..38915fb 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) { >