Received: by 10.223.176.46 with SMTP id f43csp1813897wra; Sun, 21 Jan 2018 05:07:22 -0800 (PST) X-Google-Smtp-Source: AH8x224NQjaTfvuO9qVslNDK3dc3MU26BRT5IZwXhM57A7n4kGHTVC6N8Ay75qOmuz5uTLnDfIDO X-Received: by 10.99.4.216 with SMTP id 207mr4453361pge.45.1516540042462; Sun, 21 Jan 2018 05:07:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516540042; cv=none; d=google.com; s=arc-20160816; b=B7VHsuciljHw2T30N35gss1tF8QElWLc9pPENTPJ+T5Dq+XQ7CvIAYx1XaI30G1PQG gTIKVNiwS0vxcvqBIjKZwqnWKSqmrPpNhEzx1gjOwUeyaHRBA9VpbL6/c/h/DyjouMCW +KOSRpkyxo5iU6mJh1kzksnVEflka0BJxhwth0kplYUfrfLOA5ss6BKT9dOR+4CLlBKc Hc6zm3KgdtXtPgQ1vPdPL/LcSQzw4w/v8CN/Jl2gKh/byHR3V+6UftDBND4koeUm5z/F uqXGuXdl0AyxP0mhxSkpK3flxZlnSyw7Aq0c15NdU0FS0FFrGYTiFrsxnccAyfH3a0KT kWrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:arc-authentication-results; bh=Ud5hz6rFmqx8IdwfsNqUVo7ABE1+8WFZoprY/lL9cwg=; b=rzRL0r/ITtYQVuXBv3ubSf266O8IHWWywouq1ytHqSZiLtZjMW074q8L84T11C3SIj SIu4AGwJYmCvrhxfz+97ZePWzxjiAOrx9CwPluU832nY1nMLbEkhoHd9h9W7ez6cXqcn BPyflPKeovyQPLj6pZM8zx1upTQ05Max+kRJ6BjOuqOXEcPiEG1bF4yiz70HEPYWwi2O DYQ7tWFyZ/nKLAu4QszAE2XF50DSgwiykLzjj4Et7K+tGUNUdPvbEpD2EgDT2iMyHCBI EpyCW6tO5c87EoT20Dp+Em+0HRKjfp5wB2L61VsGGN9X8vfWSNW3NYl/HEB5rb6+9p7U L6yw== 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 33-v6si429993plk.207.2018.01.21.05.07.06; Sun, 21 Jan 2018 05:07:22 -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; 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 S1751038AbeAUNGo (ORCPT + 99 others); Sun, 21 Jan 2018 08:06:44 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:42977 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbeAUNGm (ORCPT ); Sun, 21 Jan 2018 08:06:42 -0500 Received: by mail-wm0-f66.google.com with SMTP id b141so11481267wme.1 for ; Sun, 21 Jan 2018 05:06:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Ud5hz6rFmqx8IdwfsNqUVo7ABE1+8WFZoprY/lL9cwg=; b=DXjwDuyi2ci0EyxEweja/Blg4S7G3xosFu6yvHXeMyN9IEGey3q56HnKwlINmkejyr 4c7Vfh37e1Wrc5iyCqVH61RQzHVFsP3cM9v6iD6iMSmYPgFEaJMISFAIn8JP9CplJ0cg 7mNJEcaRZOG3CyA6i57Ja1bcP9FcOSM2f/+EGX9GwTVnQ1ZNrSRHQ29KK/UpxK1XMedj jK/CbMQ0ULQaVwysIFrYKHwJbfXRi5J/j5zZ8ZCZyJh6FdWeYrQSnM1Z/d7bn9VPInSg 7fYxptWyPPVoU8kMoAsEb/oCrAmHgG711i0Y23i2n0oEWd2WR9NWqCCkKagV9yuBQ6sH mEnA== X-Gm-Message-State: AKwxytcTx9JCuMcmlBOpCR9xwRG04wQ02pLxVXXEv52f0oe4k29BtGE5 +dZZHu6OBZO6FM94ZzdNjq8= X-Received: by 10.28.191.148 with SMTP id o20mr2982487wmi.63.1516540001736; Sun, 21 Jan 2018 05:06:41 -0800 (PST) Received: from ?IPv6:2a01:4240:2e27:ad85:aaaa::19f? (f.9.1.0.0.0.0.0.0.0.0.0.a.a.a.a.5.8.d.a.7.2.e.2.0.4.2.4.1.0.a.2.v6.cust.nbox.cz. [2a01:4240:2e27:ad85:aaaa::19f]) by smtp.gmail.com with ESMTPSA id l142sm4348586wmb.43.2018.01.21.05.06.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Jan 2018 05:06:40 -0800 (PST) Subject: Re: [PATCH v2 3/8] x86/msr: Add definitions for new speculation control MSRs To: David Woodhouse , 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 References: <1516528149-9370-1-git-send-email-dwmw@amazon.co.uk> <1516528149-9370-4-git-send-email-dwmw@amazon.co.uk> From: Jiri Slaby Message-ID: Date: Sun, 21 Jan 2018 14:06:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1516528149-9370-4-git-send-email-dwmw@amazon.co.uk> Content-Type: text/plain; charset=iso-8859-2 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/21/2018, 10:49 AM, David Woodhouse wrote: > 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 */ Is there any reason why all 3 are not properly sorted? 0x04e > 0x048 0x119 > 0x10a > #define MSR_IA32_SYSENTER_CS 0x00000174 > #define MSR_IA32_SYSENTER_ESP 0x00000175 > #define MSR_IA32_SYSENTER_EIP 0x00000176 > thanks, -- js suse labs