Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1909243imu; Wed, 12 Dec 2018 06:27:21 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xl0D2GnVdCKb58MfUA5kCeWQNBDHOby/vkx7YsZ5q4xPSTfTRyunlckoe3qCQg+GUG3Ync X-Received: by 2002:a63:2c0e:: with SMTP id s14mr18778582pgs.132.1544624825270; Wed, 12 Dec 2018 06:27:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544624825; cv=none; d=google.com; s=arc-20160816; b=A/HF9DmQER2Enx2ffrWIemFg9BdqwhfNnnlhvrcNX0SLxWdPR9Jjs7JQJVdmk2v4P4 9N2aQREgMwQzVUHUskZmI0yi3M6e3xSnbk9zC7z8un7WpVHY71fo7qWCXCdsT1msMlzv CWgsfeoC+GHaI1h+XWuGYBaIO6//o07wCbwkjNcCp75xpqgWElz+50y15QW9YeiUVT7D ka7XA3TLlwh1dsSUqPkgA3RAl8uHPcwf7YxBE/gt/NpvFNu8D5pF8w8AAvIMganlzlJH 7DOCcMEqWP74SMnUdaDJkDn5V0Ba+q+5EHIxCRKZ1YbzaRlGgQzglyeR68idVBwZem6J GpCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=uQ2fDXnawquRBvzWwJIWqGKMBk0GXWiBCKddhH5ILeM=; b=xnreNKhv38dTIjUFfWE8zl77HubN5B6uQw8xRdZQBFMc4ntxqYVr9uuHSjm1K4ySUJ 3xuGq3eRhhQEQZrvwaGag1U/gtPla7yabril9rCFsbSKNJOwWWAyGwdmqa3/veIwRq1e zjSGaRHYjOvMk6ZQwtYnnJ9jCAK+e2nsupzcLaVzMC7wS4Ayek5Yy+uknru8XNFxhRSx ZUSEnN5giInsl/TuvHyxMmoAiIaOrCCvodduJeFJJna3jFYhZbUeELtTUIUqgr5YBZSn Jv8Qoi3AupFjJu+KJwCaCtbWOwND1lUiTVtKp4MNysAtshSD88VCaHjJnFjqgsiPp77t mlSw== 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 4si16027648pfg.280.2018.12.12.06.26.34; Wed, 12 Dec 2018 06:27:05 -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 S1727657AbeLLOXq (ORCPT + 99 others); Wed, 12 Dec 2018 09:23:46 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:42678 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727624AbeLLOXq (ORCPT ); Wed, 12 Dec 2018 09:23:46 -0500 Received: from [67.139.178.66] (helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gX5QJ-0004DS-R9; Wed, 12 Dec 2018 15:23:40 +0100 Date: Wed, 12 Dec 2018 06:23:25 -0800 (PST) From: Thomas Gleixner To: "Lendacky, Thomas" cc: Borislav Petkov , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , Andrea Arcangeli , Konrad Rzeszutek Wilk , Jiri Kosina , Ingo Molnar , Tim Chen , David Woodhouse Subject: Re: [PATCH v2] x86/speculation: Add support for STIBP always-on preferred mode In-Reply-To: <38aca18b-4312-5e03-fdd9-86e47c332e44@amd.com> Message-ID: References: <20181211224615.5373.65736.stgit@tlendack-t1.amdoffice.net> <20181212000518.GX27375@zn.tnic> <38aca18b-4312-5e03-fdd9-86e47c332e44@amd.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 12 Dec 2018, Lendacky, Thomas wrote: > On 12/11/2018 09:37 PM, Thomas Gleixner wrote: > > On Wed, 12 Dec 2018, Borislav Petkov wrote: > >> I still don't like that separate stibp_always_on variable when we can do > >> all the querying just by using mode and X86_FEATURE_AMD_STIBP_ALWAYS_ON. > > > > Hmmm. I've not seen the V1 of this (it's not in my inbox) but the v1->v2 > > changes contain: > > That's strange, you were on the cc: list. Anyway, here's a link to the > first version: https://lkml.org/lkml/2018/12/11/1248 Must have been my sleep deprived brain. Found it now :) Sorry for not paying attention back then. > >>> - Removed explicit SPECTRE_V2_USER_STRICT_PREFERRED mode > > > > Now I really have to ask why? > > > > Neither the extra variable nor the cpu feature check are pretty. An > > explicit mode is way better in terms of code clarity and you get the proper > > printout via spectre_v2_user_strings. > > > > Hmm? > > That is what the first version did. See if that's in-line with what > you're thinking. Yes, though I'm not too fond about the preferred wording, but can't come up with anything better. Thanks, tglx