Received: by 10.223.176.46 with SMTP id f43csp749323wra; Sat, 20 Jan 2018 04:08:21 -0800 (PST) X-Google-Smtp-Source: AH8x225EnnTsUreZX/rJmqzlCtm3ZjJVQkpXN1Qm49RD9zjLX8tLJ9lm9eMzXIpJgMyXIXjMKToI X-Received: by 10.99.165.87 with SMTP id r23mr1783000pgu.93.1516450101139; Sat, 20 Jan 2018 04:08:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516450101; cv=none; d=google.com; s=arc-20160816; b=CksQHTNcQVGljOxEQ/POozBAortBhwSwY4mX/d6g5/7Z6uAHoLqLpioVGpXbA+tGev GxudRGGEShHG8j0gMcfUcFLI/gshWYH0Ix3YXuXVakH9jiwBPug/+JbSx9ggLYs11cfQ KCsrHmP0f5VpPcSAxz0XkVoPh8pMWztgqu/v6oTA52Cy3TX0u4fjl+gP4SUxMPFHGY8h dKGtBOSuNrvr7OgQtai3KKIPlyE/Wvfu/B4XnxDP/VQWs9NwTjcCjIPEBAQ0gIovhvTR HaNF7E8SURpNKCdWlYlAeJqwSxBtWscO16duJwbZW0OCZqlu5cRbepTj8IhcEJriHimz v7gQ== 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=dbbv01J6xXxsDJfWqdDlVzSm4ezB0L1/oPxaBGvI8us=; b=BBtwIJW82rLQxxWgljxbYAuAZqtQTAIS/rZRNqWQ0qDRYYSA0hUvv0p4RSnOYvKY8E 0FVJyDgbTbihnm46EO40ei29cTf0WgFgTdCbKVK3g08RvflO9VCAS/0L4Em7XbubDKUa NRBFQwJdFh4pDTHSgjjQJM02fv7wEUKBtghN8zzBUk6XtBZeQMyLj8tcmq3i7dA00/BU w7qWKZDuvUPBct870qNZ2XBChlEIUrA5cd1g4IZMw1xxdHZusjSfYSnhQu5hmDXBN7dt 52/8/UDf9q+OMlbZdympKy67OvvH3QLt9bFzjFFjB2RRhlHb2zgSsZfhLSE1eK1druhH AZmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.co.uk header.s=amazon201209 header.b=Hd++heBd; 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 k91-v6si1667216pld.115.2018.01.20.04.08.07; Sat, 20 Jan 2018 04:08:21 -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=Hd++heBd; 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 S1755692AbeATMGM (ORCPT + 99 others); Sat, 20 Jan 2018 07:06:12 -0500 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]:14146 "EHLO smtp-fw-9101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751095AbeATMGG (ORCPT ); Sat, 20 Jan 2018 07:06:06 -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=1516449966; x=1547985966; h=from:to:subject:date:message-id:in-reply-to:references; bh=dbbv01J6xXxsDJfWqdDlVzSm4ezB0L1/oPxaBGvI8us=; b=Hd++heBdeQJkjrxOqNa3QZLzQnbowV8IYnmEAtxjkoXA9Om6ms7Rq8RG meJ1BldxOvakgRLuNFK+qN9hfqc4N8mKierR8nxHGeLquDdDSxQ0ttLPZ K8wSC5McKeBfqMO1lYzN01MaekjBKq1pBGBpheUlSRygnEKx373M+KIVQ 8=; X-IronPort-AV: E=Sophos;i="5.46,386,1511827200"; d="scan'208";a="720475845" Received: from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO email-inbound-relay-2c-fd2e194e.us-west-2.amazon.com) ([10.47.22.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Jan 2018 12:04:03 +0000 Received: from uc8d3ff76b9bc5848a9cc.ant.amazon.com (pdx2-ws-svc-lb17-vlan3.amazon.com [10.247.140.70]) by email-inbound-relay-2c-fd2e194e.us-west-2.amazon.com (8.14.7/8.14.7) with ESMTP id w0KC3kEW079572 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 20 Jan 2018 12:03:48 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 w0KC3jNh007840; Sat, 20 Jan 2018 12:03:45 GMT Received: (from dwmw@localhost) by uc8d3ff76b9bc5848a9cc.ant.amazon.com (8.15.2/8.15.2/Submit) id w0KC3i3W007839; Sat, 20 Jan 2018 12:03:44 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 3/4] x86/msr: Add definitions for new speculation control MSRs Date: Sat, 20 Jan 2018 12:03:32 +0000 Message-Id: <1516449813-7654-4-git-send-email-dwmw@amazon.co.uk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516449813-7654-1-git-send-email-dwmw@amazon.co.uk> References: <1516449813-7654-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..c37fafa 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_STIPB (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