Received: by 10.223.176.46 with SMTP id f43csp1226608wra; Fri, 26 Jan 2018 14:12:38 -0800 (PST) X-Google-Smtp-Source: AH8x224vYYdKuJ75Kf62bFU8xWKasLiYivfaDjGxTTuZpaKyNaA9V5j/qJ6WFUEqdLZzgP6UX/Lt X-Received: by 10.99.126.17 with SMTP id z17mr16270625pgc.338.1517004758034; Fri, 26 Jan 2018 14:12:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517004757; cv=none; d=google.com; s=arc-20160816; b=wbbC7bW/PEncQanRSoJSaXSuZ8eHCKQkLXBbXJHXEtl2Zu8UPHJo2pVeK+FSocsdaO DsVUtHm4LVx/ST1tig8YujKmx9iGUxVHYRahl6L+GFbuoMjGZF1NZul/sNoOC/SLd2ci SO4BBSQIYSrc6qX86l5UYTKqu+RK4EBZHhZSRMjEaGiv1wgS3kmuTJe9VqzCIEccIUwJ 0RDv6bTojuHRnT39RFDuiHOCEdnmYRFPLShplAoz/YD93h+kmgSM/9DVn3qVAoU7mDYB qv/v7uShD3OCd0+MCZ+oLKu/3xIXNnNyTnDL+JV2ljEG+W6nDAxTX0eorUOEw5fKDLdS OJWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=SWhf7LJqwF0bz5CQZkw8+yoYzVSu57uMiEgQO7nkX/s=; b=lI24i7x8elRQLSd9/wt+a9HlnnXxfUMFd+y5fWUQPkZs0bizF1B5D3bRh2kCyEaBpb +WIeNtUKMcA6J2ZPgzHDOQ/hsZ2YkRsuU5nWzbWhQtbikLYyoS1bMZ/qLos3Tp89bap3 VCvi7xHg7xxQhhIKd5mi5evljm/fKB5Vcl/5/1WKgrm4UOkTqqe+S7XiB16HfcV86zOJ Jy6Pm1SJbUp4NWEOo9ll5Dx3Er9LOm5ODnKn1jpOBGbNibOPAaa5o9L6xqUlfiHwdghq ti82AHNEqPF8H8ttZYRBhXvxJDmAgnfTPF8kyJNrY5ppRCJk4GAGCIPOHRi7zRNFPjVi bPyw== 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 s72si3523783pgc.149.2018.01.26.14.12.23; Fri, 26 Jan 2018 14:12:37 -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 S1752221AbeAZWKm (ORCPT + 99 others); Fri, 26 Jan 2018 17:10:42 -0500 Received: from mail.skyhub.de ([5.9.137.197]:51482 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752080AbeAZWKj (ORCPT ); Fri, 26 Jan 2018 17:10:39 -0500 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id T1KsTaYD1oGN; Fri, 26 Jan 2018 23:10:38 +0100 (CET) Received: from pd.tnic (p200300EC2BCF3A0024194793E6CFFC7A.dip0.t-ipconnect.de [IPv6:2003:ec:2bcf:3a00:2419:4793:e6cf:fc7a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 460161EC034B; Fri, 26 Jan 2018 23:10:38 +0100 (CET) Date: Fri, 26 Jan 2018 23:10:26 +0100 From: Borislav Petkov To: David Woodhouse Cc: Tom Lendacky , x86-ml , linux-tip-commits@vger.kernel.org, hpa@zytor.com, gregkh@linuxfoundation.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org Subject: Re: [PATCH] x86/cpufeatures: Cleanup AMD speculation feature bits Message-ID: <20180126221026.hc2hk23zsqbqhkif@pd.tnic> References: <1516896855-7642-4-git-send-email-dwmw@amazon.co.uk> <20180126184139.rcfbtk7dvj7kmyfn@pd.tnic> <1516992318.30244.271.camel@infradead.org> <20180126184915.ioqewp56orj2qhrt@pd.tnic> <7094ed9b-40f7-ba2b-55a6-cc5ab0b06bb9@amd.com> <20180126215209.vqdxh5p672tcdst6@pd.tnic> <1517003984.30244.299.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1517003984.30244.299.camel@infradead.org> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 26, 2018 at 09:59:44PM +0000, David Woodhouse wrote: > If we wanted to do this kind of thing, we'd do it the other way round. > Turn the *Intel* feature into both 'IBRS' and 'IBPB' CPU-visible > features, and have those defined in the AMD word. You lost me here: have those defined in the AMD word? > Then use virtual bits with "" for the software features, since we > don't want *those* to appear in /proc/cpuinfo. Whatever we do, I think it would be most consistent to have three strings, *both* on Intel and AMD visible in cpuinfo: "ibrs", "ibpb" and "stibp" so that there's no confusion what is enabled on each box. Now, those three can be the *virtual* features which get set by the actual CPUID features on init. And the latter, the *actual* CPUID features don't need to be visible in cpuinfo: people shouldn't care whether "spec_ctrl" on Intel and "pred_cmd" on AMD both mean "ibpb". It should be simply "ibpb" on both vendors in cpuinfo. Ditto for the others. This way you have one unified message of what is enabled on *any* box. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.