Received: by 10.223.176.46 with SMTP id f43csp4400773wra; Tue, 23 Jan 2018 08:55:52 -0800 (PST) X-Google-Smtp-Source: AH8x224fMZkXa/suH5kuDt9lB1jqmlBEWE76YxQRJVvNDW8VmQDA2pluSQ+p0AXvchW7hy4lWZtK X-Received: by 10.107.160.196 with SMTP id j187mr4613284ioe.186.1516726552177; Tue, 23 Jan 2018 08:55:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516726552; cv=none; d=google.com; s=arc-20160816; b=0xE1FEdqMaGAv0//JSSuHPpN/sQunbgxN/rHs3U04zpmWHmmnqHFNxPn/sSMg09vgn JQSlH/NN4SVOWZsyQgjwpEvrBUDUYDJ9BeND/C6zLUDEEY3yukCLFIJSwZpBktqDLe+v kAA8ngpzlIGp+nnHcXDoq7gCP/VtJP9hMwx2m8cCWZG+5u16wP377/mVUcJbkZOHwi0b V+nk2+OOv/USx4EuG+CajoMRY6MB4PRNLGyWSdaF6jbfsDT2LSHhbdddQMtR3Yj7S330 cTTNvzgHLbAxPEDR4e7YvKDw+05SLKFUcc2FXN8Q+Yi+Tt3NQ6jJ/tyGiWdBuF+IDwxZ ZrCg== 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=bR5cmDM3OzZMnYIXUaIlnOlCDaMq0BD3Dm8YAlu/J1g=; b=QuufKxA4GG0hY9y3I8dqeIyQ5kZGZJTYNlSwwdp/s2DW2z4D/cBP+0BiIsjlMtnKWF kW3rtF/8/wtswyfu0JiBBRCUzslhnObK5f6Wf7TVhFOCig4eRLVv8jXGC8JsMgIx3Dhd bjFHCZ+qjaEh7k3AQkTNtiLScOlfiYs/uj4GkHnLQ/AkarqEx/FX+6Bp1yMsZI8SvkF4 HtCoGKtvMVyVA7uGiC7huN8btBviNU+25/Dfs3Kw7V+6zDA+9L2Z/I230buWZe1/heH3 E5S/YPKI/rkEKaGBK4ngOBL3os+aSVXq63zKvoR+IQwmPFJaAXDVHN1OcVZPOeD9fcpQ 9A7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.co.uk header.s=amazon201209 header.b=juNi9OX1; 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 n93si15673479ioe.108.2018.01.23.08.55.39; Tue, 23 Jan 2018 08:55:52 -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=juNi9OX1; 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 S1751551AbeAWQx2 (ORCPT + 99 others); Tue, 23 Jan 2018 11:53:28 -0500 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:7714 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751477AbeAWQxZ (ORCPT ); Tue, 23 Jan 2018 11:53:25 -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=1516726405; x=1548262405; h=from:to:subject:date:message-id:in-reply-to:references; bh=bR5cmDM3OzZMnYIXUaIlnOlCDaMq0BD3Dm8YAlu/J1g=; b=juNi9OX14EE4hEwtXpuK5QirDsOK3wBRXscE/6lu6Oq1iU3v6HnEBkwL Ih4wd2/4/tAl5y8v1B+OnKPUAI61aLub89mArT8KPKYsEoWDPB+SlmIUp zGufW8ZHla8PBTXaRK4roopPg2Q5Jw9L2CqK9tsAVlm932/xIIduvnoqY A=; X-IronPort-AV: E=Sophos;i="5.46,402,1511827200"; d="scan'208";a="328764934" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1d-f273de60.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; 23 Jan 2018 16:53:19 +0000 Received: from uc8d3ff76b9bc5848a9cc.ant.amazon.com (iad1-ws-svc-lb91-vlan2.amazon.com [10.0.103.146]) by email-inbound-relay-1d-f273de60.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id w0NGrFrh046289 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Jan 2018 16:53:17 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 w0NGrD0W025586; Tue, 23 Jan 2018 16:53:13 GMT Received: (from dwmw@localhost) by uc8d3ff76b9bc5848a9cc.ant.amazon.com (8.15.2/8.15.2/Submit) id w0NGrCXK025585; Tue, 23 Jan 2018 16:53:12 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, thomas.lendacky@amd.com Subject: [PATCH v2 4/5] x86/msr: Add definitions for new speculation control MSRs Date: Tue, 23 Jan 2018 16:52:54 +0000 Message-Id: <1516726375-25168-5-git-send-email-dwmw@amazon.co.uk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516726375-25168-1-git-send-email-dwmw@amazon.co.uk> References: <1516726375-25168-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 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index fa11fb1..eb83ff1 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h @@ -39,6 +39,13 @@ /* 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_PPIN_CTL 0x0000004e #define MSR_PPIN 0x0000004f @@ -57,6 +64,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 -- 2.7.4