Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1188058imm; Fri, 15 Jun 2018 12:40:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLUrUp9QTRukFFZirTCQvkVyCFFUMQDeyZpcIvrsQadxcalBcbW24H9eSoIcdgalUTwQfd5 X-Received: by 2002:a62:a0c:: with SMTP id s12-v6mr3390950pfi.33.1529091652075; Fri, 15 Jun 2018 12:40:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529091652; cv=none; d=google.com; s=arc-20160816; b=vUdclZiDIWS9dowauTqAr2x1jeZTo+WQr/RsT+g+vqsf4uv+13dGYkRS6x7BhQ1HMn uuWKGvNOesE6lBJyHlZPhvauZvvl5YLycwhnEwBfbeihcda6c7/eDUyimE3cF8+aFBzI M8R3xxaK3xCn9WsPYzBnlAfv9mXkj17WUKdFd65nQTtvzm7kpCfRlwH3nJs6k/vgGpjv 5AQhrsfYqMPELyUtbD5xPzXXMrBhxf5c4ebF2s364+Z9sVqvUQlzMXl3cGTctyZa61E2 s65f8kVhEFLLju9mWtyFGqV9BnuOiY2Td75Q2rKWac6uFRclC+cFCIKFVLR13mtm82ol Ppfg== 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=1OxXpDGRUBzcrQo7KVwMv+tOO70hK8yKExRkpXN7lYI=; b=YnqeXBoHNOVt+WNpawZ8U/05Hf5scwhCQxA51mAeP/2WSQqADsXylAzMuud+PQsJt2 bLN1smD9T+l10P2m4usEYOJ4zb2eUWFyuBY6c75SfjzpqxurSr7IaKYj5EYGrqOyMXbz eihf7tWF4nzjZ6x8XLfXrwubE+oehOPoUKmzLyIHkVtrWMmBweVxXsWk1Pcb3zzSmJM3 2kXpwZ1NI7SnIPvYBU/1DW3O25bti94e/PL++LB/OGE6zt5GpioxpAaOOy/AECIUr39K brdkX+zFFw2RKQckq63jerUXC+bENMDx8IDDn8mi1M+4F5VdqqR/Q/6bM7QQP0RSCn+d CUMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=LMhJw+76; 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 y83-v6si8487149pfb.284.2018.06.15.12.40.37; Fri, 15 Jun 2018 12:40:52 -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=LMhJw+76; 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 S966169AbeFOTjU (ORCPT + 99 others); Fri, 15 Jun 2018 15:39:20 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:50346 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964930AbeFOTjT (ORCPT ); Fri, 15 Jun 2018 15:39:19 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5FJYUnW083711; Fri, 15 Jun 2018 19:38:42 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=1OxXpDGRUBzcrQo7KVwMv+tOO70hK8yKExRkpXN7lYI=; b=LMhJw+76XL3JRQnmFCMOEQEg3qfvfLPsFNtfu5Ee1C00j9Dd64NAEYABMbXTObzREbs4 eA9fUwWJyCQ77u9n1Y2FtyZYzqWwO3ZWy8lC5//aXhKwJlENpjjblYnYDgk+k6UPvfrh 6y7t3kYH61rz4l/H93lT/mjPaAkF/aIgdzy2yiKYiHJOItKfptMA+t5OzPDjcpn04S0r G0wWtwXRfz1SdYT9v+0PvRkJbQZ/ThptcuDlrGZ/wO2xHNunPjZLgJOl59KJDY8gHydn 6pqGyog95oXajvZ12y/7SsBIIMF38VjZaXCR2yPccBo76ytUl+/bt9iyOGGyTvMNnwOP rA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2jk0xrj74e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Jun 2018 19:38:42 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w5FJceT2030679 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Jun 2018 19:38:40 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w5FJcdsq016820; Fri, 15 Jun 2018 19:38:39 GMT Received: from char.us.oracle.com (/10.137.176.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 15 Jun 2018 12:38:39 -0700 Received: by char.us.oracle.com (Postfix, from userid 1000) id 8F4F16A00DD; Fri, 15 Jun 2018 15:38:37 -0400 (EDT) Date: Fri, 15 Jun 2018 15:38:37 -0400 From: Konrad Rzeszutek Wilk To: Thomas Gleixner , alexandre.chartre@oracle.com Cc: Tom Lendacky , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, x86@kernel.org, andrew.cooper3@citrix.com, Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , David Woodhouse , Kees Cook , KarimAllah Ahmed Subject: Re: [PATCH v1 3/3] x86/bugs: Switch the selection of mitigation from CPU vendor to CPU features Message-ID: <20180615193837.GA20921@char.us.oracle.com> References: <20180601145921.9500-1-konrad.wilk@oracle.com> <20180601145921.9500-4-konrad.wilk@oracle.com> <2a3e0323-7086-f764-1a3b-7ce4891e8784@amd.com> <20180611140116.GA26199@char.us.oracle.com> <5090fe69-61fd-99cb-f9d0-908cd6250d25@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8925 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=688 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806150209 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 15, 2018 at 08:57:40PM +0200, Thomas Gleixner wrote: > On Tue, 12 Jun 2018, Tom Lendacky wrote: > > On 6/11/2018 9:01 AM, Konrad Rzeszutek Wilk wrote: > > >> I think you will have to keep the case statements and explicitly check for > > >> X86_FEATURE_AMD_SSBD before using SPEC_CTRL. > > > > > > .. we could or alternatively add an extra check for X86_FEATURE_AMD_SSBD ? > > > > Whichever you feel is best, so long as we only use SPEC_CTRL for SSBD on > > AMD when X86_FEATURE_AMD_SSBD is present. > > Is there anyone working on a fix or has this been forgotten? I have it on my TODO. But a bit busy with the fpu lazy so will get to it done next week. Maybe along with the X86_FEATURE_IA32_ARCH_CAPS Bit(1): IBRS_ALL to disable retpoline on those machines. CCing Alex > > Thanks, > > tglx