Received: by 10.223.176.46 with SMTP id f43csp1780262wra; Sun, 21 Jan 2018 04:23:41 -0800 (PST) X-Google-Smtp-Source: AH8x226pD8aWFDeclt1tFDcEEF9CiRY3abl6swcfww96KpBjNy/Ya7v10VpDKBJH8U3xWO5zwEpN X-Received: by 10.98.246.8 with SMTP id x8mr5103571pfh.234.1516537421073; Sun, 21 Jan 2018 04:23:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516537421; cv=none; d=google.com; s=arc-20160816; b=WSyeeyfClO4KouNImfUm2565z6KhvNMiXmQ79ZRAigEhrdpvzH7G2AL+vgXDSUeTil jyY+8bbh9qwIhW+moyyqPxDjuC6lzKtJdAyaZjTXM86FLttgBvZwiERrfs2BGDEeeGoC luF7tASuMkfGgTWQjQOYwTX03IvYWLqs2nqS/7+gYLylDeym4j0C0e1MU2dJRJNTLqof fmPNI3SBnkB+VHt2KOfqEBt2yCusXrQKTQwPmVmJFxl0g1s402nAvofVBX5OLQeZZV7w IO7X0QVC+SWKWMyXdejr3J8FlCnHMxFsp5R8QZsn+TK2lGhSe+W8etn1xUwJZfq13KbA M/8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:importance:content-transfer-encoding :mime-version:user-agent:cc:to:from:subject:date:references :in-reply-to:message-id:dkim-signature:arc-authentication-results; bh=4gEp5nxYGwfuIQVoIDfLGE6L7NdtVFvQ3Hx217eBDeQ=; b=sOLqCEN5hDn+Mxrz/saKuANR1BT+wr+HPTl4yVomu6Jruk5cFy2xD8P3PO4Gujn4WC hx/GdgG76kPIc7Ml58bDf8e+z4ylrZlJAQ86PVq18SFQo0MJZvO2m+XnxWaXVu6WazuD jlYU0OI1yihzGBmv0KhBL8ocJzFgM60w+WJQA8Hl/hUQlvXOL4BxjFDbeIKNElHbB+kN V22ug2lMJYFfq3ocCUgKqjbf2Njzo1GMvkFT7B6f9QYqGVJWYxfq49LNTONuCnsNp8DR 0RVT+/Kc8OjqHrm0oXvZuyhL/2+V552dLaSNwSlBgsod+AeXJcHTR57Du7Ykco8aAHwq u+WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=twosheds.20170209 header.b=RLVUDQKW; 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 j21si8871212pfe.97.2018.01.21.04.23.26; Sun, 21 Jan 2018 04:23:41 -0800 (PST) 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=fail header.i=@infradead.org header.s=twosheds.20170209 header.b=RLVUDQKW; 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 S1751273AbeAUMXC (ORCPT + 99 others); Sun, 21 Jan 2018 07:23:02 -0500 Received: from twosheds.infradead.org ([90.155.92.209]:41584 "EHLO twosheds.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751142AbeAUMXB (ORCPT ); Sun, 21 Jan 2018 07:23:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=twosheds.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:To:From:Subject:Date:References:In-Reply-To: Message-ID:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4gEp5nxYGwfuIQVoIDfLGE6L7NdtVFvQ3Hx217eBDeQ=; b=RLVUDQKWL5RY5VXo14fzh0OIO U2oKJZ1k2sP6xcA/f31MeeWafXHpu9DHTueDa5DJjddzrY0wXSI9U79qvBZoBU39lkVIwC0Eyc0Yf 1YFXqiP2YLTDb6fFIGWMJztilDr485nj2qLk50Ps04WDg5i13+WcbuZDJ5KxeMyEarfgKkT0dJ/f6 A8ci2eC2BPw7lpnOsuqAB+oLF0xnEaPSvfnmdk+MxsP/wL2J3waj67IlCTfTj0axMDc+xrBlmN9YA RgutRj7yVDdCr5lesvoAvUj6D+ZYvqvv78h827L//5bXrOOpoUsQz7pOUYxdgoFbAXDYJxfL0QGDa je/2OhliA==; Received: from localhost ([127.0.0.1] helo=twosheds.infradead.org) by twosheds.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1edEe6-0000Nf-DK; Sun, 21 Jan 2018 12:22:47 +0000 Received: from 86.142.97.146 (SquirrelMail authenticated user dwmw2) by twosheds.infradead.org with HTTP; Sun, 21 Jan 2018 12:22:47 -0000 Message-ID: <4eb681c76b549ddad43544f2b487106c.squirrel@twosheds.infradead.org> In-Reply-To: <20180121121638.jpwyk4npxjcgqzar@pd.tnic> References: <1516449813-7654-1-git-send-email-dwmw@amazon.co.uk> <1516449813-7654-3-git-send-email-dwmw@amazon.co.uk> <20180121121638.jpwyk4npxjcgqzar@pd.tnic> Date: Sun, 21 Jan 2018 12:22:47 -0000 Subject: Re: [PATCH 2/4] x86/cpufeatures: Add AMD feature bits for Prediction Command From: "David Woodhouse" To: "Borislav Petkov" Cc: "David Woodhouse" , "Tom Lendacky" , arjan@linux.intel.com, tglx@linutronix.de, karahmed@amazon.de, x86@kernel.org, linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com, peterz@infradead.org, pbonzini@redhat.com, ak@linux.intel.com, torvalds@linux-foundation.org, gregkh@linux-foundation.org User-Agent: SquirrelMail/1.4.22-21.fc27 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-SRS-Rewrite: SMTP reverse-path rewritten from by twosheds.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Sat, Jan 20, 2018 at 12:03:31PM +0000, David Woodhouse wrote: >> AMD doesn't implement the Speculation Control MSR that Intel does, but >> the Prediction Control MSR does exist and is advertised by a separate >> CPUID bit. Add support for that. >> >> Signed-off-by: David Woodhouse >> --- >> arch/x86/include/asm/cpufeatures.h | 1 + >> arch/x86/kernel/cpu/scattered.c | 1 + >> 2 files changed, 2 insertions(+) >> >> diff --git a/arch/x86/include/asm/cpufeatures.h >> b/arch/x86/include/asm/cpufeatures.h >> index adebdaa..624d978 100644 >> --- a/arch/x86/include/asm/cpufeatures.h >> +++ b/arch/x86/include/asm/cpufeatures.h >> @@ -207,6 +207,7 @@ >> #define X86_FEATURE_RETPOLINE_AMD ( 7*32+13) /* AMD Retpoline >> mitigation for Spectre variant 2 */ >> #define X86_FEATURE_INTEL_PPIN ( 7*32+14) /* Intel Processor Inventory >> Number */ >> >> +#define X86_FEATURE_AMD_PRED_CMD ( 7*32+17) /* Prediction Command MSR >> (AMD) */ > > Right, so this bit I've seen being called differently. Tom, can you > clarify pls? Yeah, that's fat-fingered in a cut/paste in refactoring. Fixed in what I posted this morning. I would like to see public docs with it though... Tom? -- dwmw2