From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x224nWErLlsAb/opwUcoETyPT1gP+s2jr8CQWA0VmPmuiNlfnhTOdV+8eroSOSkcSZSLomy9S ARC-Seal: i=1; a=rsa-sha256; t=1517004639; cv=none; d=google.com; s=arc-20160816; b=xYRP/2wzazUz83XjcMlgCJOG5XxsCyQ3qeAhhiHGlNiQ6VPtu8+TYKJ2UgEKYjatZx 3WivMoA74ctXhNCv4Lhfy49eLhR1qeYLrNNFLAtvZm+bWK61JGMjOyLHj8HymIc8y+nZ wOHYiUN/PMq+1MRjl7hY7NL8uizSWLvVDvermNjp0Xj0l2PFsi1NpCmMj0RnRNIMH9+c 1kjAw5JELoBmVqD9wq81RKPt5B3j5fYBJ4wSeBfK7Xj4HLVW5SVU9xlvVT19ZCN5lgT7 gs0Ep+ztCFf2le8SnI+ZZ2M3WAf+X4beLW5EaYv5kZeNfM1LbZfrXLGCR1f2sq3f6swu 2ywA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=pjp6XjkfwWnxVBXutZFXMnRVLvMDHwW/YzhYGdKtTFJnjXkcii2VSgZTAgLe6igMEl buXOC5h/lDWaaCtDHda0QfaK8boQtnXw+qEcpkN7HVQU7Lxu/ruSfz1Ap2Il77v6VnyT aJ3VBYKGDz0Ha79uHn6Bkk/wvOHhX/v8oJnnKmz7gkqe199Uv4YC5sLnoZXzoRCWtqTb p2ZvToRifN/OW5hwTMMhHp4+v7hG3XZvt4KMGXCK0dVLrVzHlL0oys6i0XVV/a9/t/MF wAAia1oajxTtdq6Efh4pfAbzaShuR6JrJVjwWqVagZrsgmFk1EWGi1Q+cro1j8IYJUpW yAOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of bp@alien8.de designates 2a01:4f8:190:11c2::b:1457 as permitted sender) smtp.mailfrom=bp@alien8.de Authentication-Results: mx.google.com; spf=pass (google.com: domain of bp@alien8.de designates 2a01:4f8:190:11c2::b:1457 as permitted sender) smtp.mailfrom=bp@alien8.de 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) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590681520403481900?= X-GMAIL-MSGID: =?utf-8?q?1590694656513391133?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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.