Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2364200rwb; Fri, 2 Dec 2022 08:49:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Grqg82BQjq+XbrK+ouEjPJT2SZFBobo6IQHuZyPGEBSQl/dquR9dAcP25mLKCr2ZxfDDl X-Received: by 2002:a17:906:80c2:b0:7c0:7db7:e1af with SMTP id a2-20020a17090680c200b007c07db7e1afmr18579970ejx.596.1669999740281; Fri, 02 Dec 2022 08:49:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669999740; cv=none; d=google.com; s=arc-20160816; b=K5zEcGRcgTWUNGuHQkar7JCDjwnIyBalklY7zvA3yEvg7Fefi9xUg30pQFJ77O8k/7 68GXXbjDQkcb0tQ0VtFOqbhNFIUlmVllhMnWmyNiJ+44KPjcAp1NgiJN3pBqbo8/c+LO gBUncjjdooHF2A8yInSSXK/qGJRbnFcQ/NkUzLLhDHv5ObIpA71/ta38zXCwumvVaoGC 0PEUgHvDifyYbXDkqWCkbgHrPsK9SdeaBVLaAvLAxmIF7up8/j/94lwDMK5f6FvfPbZB 4BqkUpr0DXLmRDZNhqiGwMInQAeNB/Xm2KSILR5Lhy2APkkePYW/bV/crH5jOA/qmTyF SXtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iYtB1JS3KMeeRRospXa/oXDdulwz8pyHSA2YHj2CkSE=; b=GsrUi3+ExWxThzD5oS+Ob6PXQWlNX4rG56d0A/lRttx3LEL2R0tSEEz4V9aBOp6Jw4 LqkMO1lqhO0cyVrJTsyCjE0jC3NB8ihHez3RMt740mT+FcCXvHuflTIF1Lf2lKTOHhwT J0o4/OKSexWuhEfKZAwng/iANwsdJvCXn39HNxNESxas2M88yAmUVaCdCOZR4gRMAzpo PjnzHdEW0hN8XUwbY/BTBM7E3LLdXRsen7z4MfZSxCnwdBey8tCcA4t90sYlLFvrzoeg 70hNE9eTENQ5GlnIOXUnpSysRGCrN8DqeNaz4aG1gbP7DrtZJWgGeafxUoHYu5vhSDg/ YSvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HPXrbcv0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b17-20020a056402351100b0046400f454a3si6917585edd.125.2022.12.02.08.48.39; Fri, 02 Dec 2022 08:49:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HPXrbcv0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234045AbiLBQcU (ORCPT + 82 others); Fri, 2 Dec 2022 11:32:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234227AbiLBQcD (ORCPT ); Fri, 2 Dec 2022 11:32:03 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FF44EE00; Fri, 2 Dec 2022 08:32:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669998722; x=1701534722; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=wSnpR7zDYAssFAg6Gf+Dcdqfe3muYD3GKdvIsPR3ziw=; b=HPXrbcv0/YCdlXFzS54MouKSP9GvmUbc0U6O/ldxKD3E777TeU4UoJxv v57C4l6799+wQ7jTi+Ss1L3EELU0YLwky/kSY3MEq0/2nUCAmCnNX317y d0PylQqPr65Osq/R1Y8m8eG/xRfxcTHELPQMhHCaHYLiAE/kFY0bARiFe xdwzSQopRqLV+iOoO3LVA9yIB/1dLRbSP/qhtc9bS41XcVy8HsF8Q3ihQ ztRcyb6nNdgxaPVIIE4yde/GYlV9LvGWoJs23suMBGFwfiq5kyQn3XV5Y M8O3k7R5cdNOoEChS57sZvOb78XQaCsvvp9aenqh1Jz+EcVzOFofXaYF6 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10548"; a="402268617" X-IronPort-AV: E=Sophos;i="5.96,212,1665471600"; d="scan'208";a="402268617" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2022 08:32:00 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10548"; a="890201379" X-IronPort-AV: E=Sophos;i="5.96,212,1665471600"; d="scan'208";a="890201379" Received: from nschade-mobl.amr.corp.intel.com (HELO desk) ([10.209.69.47]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2022 08:31:59 -0800 Date: Fri, 2 Dec 2022 08:31:58 -0800 From: Pawan Gupta To: Kim Phillips Cc: x86@kernel.org, Babu Moger , Borislav Petkov , Borislav Petkov , Boris Ostrovsky , Dave Hansen , "H. Peter Anvin" , Ingo Molnar , Joao Martins , Jonathan Corbet , Konrad Rzeszutek Wilk , Paolo Bonzini , Sean Christopherson , Thomas Gleixner , David Woodhouse , Greg Kroah-Hartman , Juergen Gross , Peter Zijlstra , Tony Luck , Tom Lendacky , Alexey Kardashevskiy , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 6/7] x86/cpu: Support AMD Automatic IBRS Message-ID: <20221202163158.p7yuqimmnjbmlzvq@desk> References: <20221201015003.295769-1-kim.phillips@amd.com> <20221201015003.295769-7-kim.phillips@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20221201015003.295769-7-kim.phillips@amd.com> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 30, 2022 at 07:50:02PM -0600, Kim Phillips wrote: >--- a/Documentation/admin-guide/kernel-parameters.txt >+++ b/Documentation/admin-guide/kernel-parameters.txt >@@ -5698,9 +5698,12 @@ > retpoline,generic - Retpolines > retpoline,lfence - LFENCE; indirect branch > retpoline,amd - alias for retpoline,lfence >- eibrs - enhanced IBRS >- eibrs,retpoline - enhanced IBRS + Retpolines >- eibrs,lfence - enhanced IBRS + LFENCE >+ eibrs - Enhanced/Auto IBRS >+ autoibrs - Enhanced/Auto IBRS >+ eibrs,retpoline - Enhanced/Auto IBRS + Retpolines >+ autoibrs,retpoline- Enhanced/Auto IBRS + Retpolines >+ eibrs,lfence - Enhanced/Auto IBRS + LFENCE >+ autoibrs,lfence - Enhanced/Auto IBRS + LFENCE > ibrs - use IBRS to protect kernel Documentation/admin-guide/hw-vuln/spectre.rst also needs an update. >--- a/arch/x86/kernel/cpu/common.c >+++ b/arch/x86/kernel/cpu/common.c >@@ -1226,7 +1226,7 @@ static const __initconst struct x86_cpu_id cpu_vuln_whitelist[] = { > VULNWL_AMD(0x12, NO_MELTDOWN | NO_SSB | NO_L1TF | NO_MDS | NO_SWAPGS | NO_ITLB_MULTIHIT | NO_MMIO), > > /* FAMILY_ANY must be last, otherwise 0x0f - 0x12 matches won't work */ >- VULNWL_AMD(X86_FAMILY_ANY, NO_MELTDOWN | NO_L1TF | NO_MDS | NO_SWAPGS | NO_ITLB_MULTIHIT | NO_MMIO), >+ VULNWL_AMD(X86_FAMILY_ANY, NO_MELTDOWN | NO_L1TF | NO_MDS | NO_SWAPGS | NO_ITLB_MULTIHIT | NO_MMIO | NO_EIBRS_PBRSB), > VULNWL_HYGON(X86_FAMILY_ANY, NO_MELTDOWN | NO_L1TF | NO_MDS | NO_SWAPGS | NO_ITLB_MULTIHIT | NO_MMIO), I don't know if Hygon is ever going to get Automatic IBRS, but it doesn't hurt to add NO_EIBRS_PBRSB to Hygon as well.