Received: by 10.223.176.46 with SMTP id f43csp1668603wra; Sun, 21 Jan 2018 01:50:46 -0800 (PST) X-Google-Smtp-Source: AH8x224rhvnXzGa5MGzbE3178afwt7LKF3tRKgepg9gIZIfmoF6CmqCeZsrsbmdIiUD23KgOuliO X-Received: by 10.101.76.130 with SMTP id m2mr4148102pgt.187.1516528246104; Sun, 21 Jan 2018 01:50:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516528246; cv=none; d=google.com; s=arc-20160816; b=DAjzKii7VihzPZxw/krbkia8Zvb3YW7BOE99wOQD/mDgDB7scrJXo/MjswSLT53uuD BfuTIl9K81huttVF2fLxdQZ1e9idLY9vDKzk0phgM//BGvUcee0qe/4ExLTvZGDT0GXb c16C3o1Ih0smkLsDnKAtTpC0WGT4gAZykwO2BjLtb7VkV0+u4Plpk/YY3OwHwHm+kzEF uEvNW+Ej0PUyF6JUArGs4qL1Dm/wci7QTU+2QlPz3cTYmcq3Kz+5QpdyY3oNOwroRArA 57W48QGRZKvWsYXpZ62bL0PN9rsaEI9Zp2jV+TcipBARWJbVo2Z9KeYAxwLB2DV7vq1V jNbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:arc-authentication-results; bh=s0jQ0Kk9JZdDOyaIpAtMFvWGN73e1qEw+eQRhhCqlKo=; b=RFmJ7X5NjkLTFGZx0yUK+GF5CC/4tyM1AYWCa6Keqszyh1d1ACJp0irD3ZYDdyoCyS d1YasoXlAdUqS+hPfhFqZqvuZ2OgxBb158e8VmBfshIk7HGxLjfcnUBc5ADktldEsFwT vmjzO8eo4Lle8D7eCySLNeTR2sE00C4YSHAhXP9E4AC4OCN5BDirL5aqw+nHWsKdlEvv oE/PWwvoAEgYXviImdqor7C5jw7coSalwjm65Z8ZHUqk5Hlm6Hs7gzSQOGEgOpi0NT82 a2Ww75aomtqIOUnbySPBL28sE7j49hxduhmJc/h+rF/kHMs69plFwHQIqJ/0RqsyRwqI /7kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.co.uk header.s=amazon201209 header.b=Z6nmcyVv; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h6si11628903pgc.820.2018.01.21.01.50.21; Sun, 21 Jan 2018 01:50:46 -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=pass header.i=@amazon.co.uk header.s=amazon201209 header.b=Z6nmcyVv; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751239AbeAUJtm (ORCPT + 99 others); Sun, 21 Jan 2018 04:49:42 -0500 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:37803 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751107AbeAUJtj (ORCPT ); Sun, 21 Jan 2018 04:49:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.co.uk; i=@amazon.co.uk; q=dns/txt; s=amazon201209; t=1516528179; x=1548064179; h=from:to:subject:date:message-id:in-reply-to:references; bh=s0jQ0Kk9JZdDOyaIpAtMFvWGN73e1qEw+eQRhhCqlKo=; b=Z6nmcyVvqbgETylTiiGULGo/CUMdwWFNf5nHHhTMfUtO1ZMcxBmc89uy 0D0tPb1jWkwcHE0x3+Hu51SaoEFo8xfq282aFLJSgpLq8kINsX2woCJj8 VfKnfATGlgPojkqZqYX23s3XS51qKsCQNICmQAp7hdFTCqycM8yW5MkAX c=; X-IronPort-AV: E=Sophos;i="5.46,390,1511827200"; d="scan'208";a="328376378" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1e-c7c08562.us-east-1.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 21 Jan 2018 09:49:31 +0000 Received: from uc8d3ff76b9bc5848a9cc.ant.amazon.com (iad1-ws-svc-lb91-vlan2.amazon.com [10.0.103.146]) by email-inbound-relay-1e-c7c08562.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id w0L9nN86007264 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 21 Jan 2018 09:49:26 GMT Received: from uc8d3ff76b9bc5848a9cc.ant.amazon.com (localhost [127.0.0.1]) by uc8d3ff76b9bc5848a9cc.ant.amazon.com (8.15.2/8.15.2/Debian-3) with ESMTP id w0L9nM6X010297; Sun, 21 Jan 2018 09:49:22 GMT Received: (from dwmw@localhost) by uc8d3ff76b9bc5848a9cc.ant.amazon.com (8.15.2/8.15.2/Submit) id w0L9nL0T010295; Sun, 21 Jan 2018 09:49:21 GMT From: David Woodhouse To: arjan@linux.intel.com, tglx@linutronix.de, karahmed@amazon.de, x86@kernel.org, linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com, bp@alien8.de, peterz@infradead.org, pbonzini@redhat.com, ak@linux.intel.com, torvalds@linux-foundation.org, gregkh@linux-foundation.org Subject: [PATCH v2 3/8] x86/msr: Add definitions for new speculation control MSRs Date: Sun, 21 Jan 2018 09:49:04 +0000 Message-Id: <1516528149-9370-4-git-send-email-dwmw@amazon.co.uk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516528149-9370-1-git-send-email-dwmw@amazon.co.uk> References: <1516528149-9370-1-git-send-email-dwmw@amazon.co.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/x86/include/asm/msr-index.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index fa11fb1..3e50463 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h @@ -42,6 +42,13 @@ #define MSR_PPIN_CTL 0x0000004e #define MSR_PPIN 0x0000004f +#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 @@ -60,6 +67,10 @@ #define MSR_IA32_BBL_CR_CTL 0x00000119 #define MSR_IA32_BBL_CR_CTL3 0x0000011e +#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_SYSENTER_CS 0x00000174 #define MSR_IA32_SYSENTER_ESP 0x00000175 #define MSR_IA32_SYSENTER_EIP 0x00000176 -- 2.7.4