Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5763983imm; Mon, 23 Jul 2018 05:47:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcErDOV4rTCxOOh7J8WTjQa8n0VZRDUJqvdhFGMClGcwV63SlcI3F2r2hgEtxIo0S703KYJ X-Received: by 2002:a63:1403:: with SMTP id u3-v6mr12161721pgl.13.1532350066693; Mon, 23 Jul 2018 05:47:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532350066; cv=none; d=google.com; s=arc-20160816; b=sJE8K7ycXBqXayGmu4ipYXP9aPIpA0C2LDORriObOPWTuYHpwaCw8W7rSOqYA7I3bg xE5yHtwzOSSbvzczAc0l/YJcgJQmDFADcZ6SjkRPmLD2C7/Ly79iQXwE8QVQXaoBdS/E wJYm0tcke5Dlkv7DV2RHYA+w5UnUMVQZyiHtCRKLV7l2dFnbeJU2alEJ4n5WAS8aj1pO ZcbY/QkJpi9fe3IZqkcxttLflrhlfRXu3/5hPdE/HVIFMgqi+7pld6XKGcc7hSlNuZRY 8sq5i+c6u8tOtpTkoZwIcOl2dVPKLkSEMvgV2VHwqIYU1AVtOr7Sk55Qe5hdMNLBdVwf WBvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=O7VsR1DD5Y7auYCiE5LxGDWPg6Lf4W1c8x5fB3WV1lc=; b=bE5fbt+mxMRF+kb2LydEFQtFuLXS+yldIWjgehz29eY2izL4OO8E7k2FUzDIceUsN2 7LSOz1V7bXhX18J1MufVM+61QtxWLjNICLdZJGZcHNxmqTdeYu9fbg/ucCVE45ZgCJRY PEez5wVRbSQzJ8Ai5dQ1/L3O6hvhlY2me5YBp3JUoThPgER1fCSLjZ8EXEfGvv1x+vJH jySfxbA3bu/ILR6a2EPx5LgUAfJKsklhovgFY4ZCHM6wyhUq9ocKCUkSQv4k3NwP6cig pGmkOmTPj39kjlIm538co6WRY1MjAvnjJwS0cfa7+pJ6i4Biqo7eUz39CBVf5ApD4K8b qdlg== 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 s13-v6si7510916pgo.505.2018.07.23.05.47.31; Mon, 23 Jul 2018 05:47:46 -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 S2388918AbeGWNrX (ORCPT + 99 others); Mon, 23 Jul 2018 09:47:23 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:50852 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388211AbeGWNrX (ORCPT ); Mon, 23 Jul 2018 09:47:23 -0400 Received: from localhost (LFbn-1-12238-233.w90-92.abo.wanadoo.fr [90.92.53.233]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 92C7440B; Mon, 23 Jul 2018 12:44:14 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Woodhouse , Thomas Gleixner , gnomes@lxorguk.ukuu.org.uk, ak@linux.intel.com, ashok.raj@intel.com, dave.hansen@intel.com, karahmed@amazon.de, arjan@linux.intel.com, torvalds@linux-foundation.org, peterz@infradead.org, bp@alien8.de, pbonzini@redhat.com, tim.c.chen@linux.intel.com, "Srivatsa S. Bhat" , "Matt Helsley (VMware)" , Alexey Makhalov , Bo Gan , gregkh@linux-foundation.org Subject: [PATCH 4.4 022/107] x86/msr: Add definitions for new speculation control MSRs Date: Mon, 23 Jul 2018 14:41:16 +0200 Message-Id: <20180723122413.977946703@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180723122413.003644357@linuxfoundation.org> References: <20180723122413.003644357@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Woodhouse (cherry picked from commit 1e340c60d0dd3ae07b5bedc16a0469c14b9f3410) Add MSR and bit definitions for SPEC_CTRL, PRED_CMD and ARCH_CAPABILITIES. See Intel's 336996-Speculative-Execution-Side-Channel-Mitigations.pdf Signed-off-by: David Woodhouse Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Cc: gnomes@lxorguk.ukuu.org.uk Cc: ak@linux.intel.com Cc: ashok.raj@intel.com Cc: dave.hansen@intel.com Cc: karahmed@amazon.de Cc: arjan@linux.intel.com Cc: torvalds@linux-foundation.org Cc: peterz@infradead.org Cc: bp@alien8.de Cc: pbonzini@redhat.com Cc: tim.c.chen@linux.intel.com Cc: gregkh@linux-foundation.org Link: https://lkml.kernel.org/r/1516896855-7642-5-git-send-email-dwmw@amazon.co.uk Signed-off-by: David Woodhouse Signed-off-by: Greg Kroah-Hartman Signed-off-by: Srivatsa S. Bhat Reviewed-by: Matt Helsley (VMware) Reviewed-by: Alexey Makhalov Reviewed-by: Bo Gan Signed-off-by: Greg Kroah-Hartman --- arch/x86/include/asm/msr-index.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h @@ -32,6 +32,13 @@ #define EFER_FFXSR (1<<_EFER_FFXSR) /* Intel MSRs. Some also available on other CPUs */ +#define MSR_IA32_SPEC_CTRL 0x00000048 /* Speculation Control */ +#define SPEC_CTRL_IBRS (1 << 0) /* Indirect Branch Restricted Speculation */ +#define SPEC_CTRL_STIBP (1 << 1) /* Single Thread Indirect Branch Predictors */ + +#define MSR_IA32_PRED_CMD 0x00000049 /* Prediction Command */ +#define PRED_CMD_IBPB (1 << 0) /* Indirect Branch Prediction Barrier */ + #define MSR_IA32_PERFCTR0 0x000000c1 #define MSR_IA32_PERFCTR1 0x000000c2 #define MSR_FSB_FREQ 0x000000cd @@ -45,6 +52,11 @@ #define SNB_C3_AUTO_UNDEMOTE (1UL << 28) #define MSR_MTRRcap 0x000000fe + +#define MSR_IA32_ARCH_CAPABILITIES 0x0000010a +#define ARCH_CAP_RDCL_NO (1 << 0) /* Not susceptible to Meltdown */ +#define ARCH_CAP_IBRS_ALL (1 << 1) /* Enhanced IBRS support */ + #define MSR_IA32_BBL_CR_CTL 0x00000119 #define MSR_IA32_BBL_CR_CTL3 0x0000011e