Received: by 10.223.176.46 with SMTP id f43csp126192wra; Tue, 23 Jan 2018 17:29:15 -0800 (PST) X-Google-Smtp-Source: AH8x226geaThh0EBOPqQHEYRqDchvKDktlzicLRPojr8fjbUOgHzjUTfTzyLt5GEr4RrIsHYvHvQ X-Received: by 10.99.182.12 with SMTP id j12mr10064367pgf.113.1516757354962; Tue, 23 Jan 2018 17:29:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516757354; cv=none; d=google.com; s=arc-20160816; b=wr9IyjdBNa79sA6v36gKSm7EJDXVPwNvvLAY9dmEH0z+xwnPHBNFb6obwOn1KApegq LGDd5r8WZ2RV9wsHu/+Ks9ntwdvS3V7uv+oSo0/Qc75wU2QxcqEaA6yOvi/TP0YvQwcm Iom6KuKtoB44xO1eaPEy6kEpmNrMysd8QKQvyyu/G0qaZCgM48aXeAoSNO0RY+j7E2Mo XTylWHZABvY2pRyuJ2HI2lqWeBvwaTH6dq6holXr/keWHKaFVe80EVQXqdUoA21BcdFY zbdBYL9bonLdUQgOmlNAuQAabPapfZR4S0komwLF1BPasXyYKQPe+C2H5NrtmKHNCocO tGow== 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=qXN78aK91T5XVROquIRPC2+w5KmPgs3xZ0q8IvOkYOU=; b=VOn7t+X1RHQINIySZxdhXG+lkPScyL2GuQVKwK/lDvpuyQQPynK8DgUGtImhvoti+U fV9LYYiKDemVW1VCnHZ/pyrbcx2jMZXmvGF0qlJL5OgAH8LZiPq8ha4G9jL/1ty7ogwx BYZh1TaptchdNe6oyB6S5j+8XdgYxnEw+R8VpIsMm6Z3ir+aGRm0HOpGuipb+H/KHmjM Ph0YmapowDJEX73MlwRNSDeSMkQpMay7ERiNV/fquIQ00ReYTgD9J610nYoL5yjfWbHc XjI/cqybmUgp0IrvibPxVMJ2zzA6l3bvQ0S7HwbRHSPZnPQl/e3GKANQK8dUfqEkMWJV 6P5A== 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 v21-v6si5557617plo.295.2018.01.23.17.29.01; Tue, 23 Jan 2018 17:29:14 -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 S1751969AbeAXB2h (ORCPT + 99 others); Tue, 23 Jan 2018 20:28:37 -0500 Received: from mga07.intel.com ([134.134.136.100]:36158 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751512AbeAXB2g (ORCPT ); Tue, 23 Jan 2018 20:28:36 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jan 2018 17:28:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,404,1511856000"; d="scan'208";a="12559325" Received: from iguajard-mobl.amr.corp.intel.com (HELO [10.254.106.195]) ([10.254.106.195]) by orsmga008.jf.intel.com with ESMTP; 23 Jan 2018 17:28:35 -0800 Subject: Re: [PATCH v2 2/5] x86/cpufeatures: Add Intel feature bits for Speculation Control To: "Woodhouse, David" , "linux-kernel@vger.kernel.org" , "tim.c.chen@linux.intel.com" , "arjan@linux.intel.com" , "Raslan, KarimAllah" , "peterz@infradead.org" , "torvalds@linux-foundation.org" , "tglx@linutronix.de" , "ak@linux.intel.com" , "x86@kernel.org" , "pbonzini@redhat.com" , "bp@alien8.de" , "thomas.lendacky@amd.com" , "gregkh@linux-foundation.org" References: <1516726375-25168-1-git-send-email-dwmw@amazon.co.uk> <1516726375-25168-3-git-send-email-dwmw@amazon.co.uk> <3ebee57a-b116-68f6-0421-0640f5e552f5@intel.com> <1516757037.13558.65.camel@amazon.co.uk> From: Dave Hansen Message-ID: Date: Tue, 23 Jan 2018 17:28:35 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1516757037.13558.65.camel@amazon.co.uk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/23/2018 05:23 PM, Woodhouse, David wrote: > On Tue, 2018-01-23 at 10:43 -0800, Dave Hansen wrote: ... >>>   /* Intel-defined CPU features, CPUID level 0x00000007:0 (EDX), word 18 */ >>>   #define X86_FEATURE_AVX512_4VNNIW    (18*32+ 2) /* AVX-512 Neural Network Instructions */ >>>   #define X86_FEATURE_AVX512_4FMAPS    (18*32+ 3) /* AVX-512 Multiply Accumulation Single precision */ >>> +#define X86_FEATURE_SPEC_CTRL                (18*32+26) /* Speculation Control (IBRS + IBPB) */ >>> +#define X86_FEATURE_STIBP            (18*32+27) /* Single Thread Indirect Branch Predictors */ >>> +#define X86_FEATURE_ARCH_CAPABILITIES        (18*32+29) /* IA32_ARCH_CAPABILITIES MSR (Intel) */ >> Should we be adding flags (STIBP) for which we currently have no user in >> the kernel? > They're in an existing word (now) so it costs us absolutely nothing to > do so. And they'll be exposed to KVM guests in imminent patches if > nothing else. Doesn't just defining it here generate something in the tables that then get exported in /proc/cpuinfo? That's far from our most strict ABI, but a single #define here can be seen by users IIRC.