Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965139AbeALSCe (ORCPT + 1 other); Fri, 12 Jan 2018 13:02:34 -0500 Received: from mga01.intel.com ([192.55.52.88]:21580 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964992AbeALSCd (ORCPT ); Fri, 12 Jan 2018 13:02:33 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,350,1511856000"; d="scan'208";a="194508156" Date: Fri, 12 Jan 2018 10:02:24 -0800 From: Andi Kleen To: David Woodhouse Cc: Paul Turner , LKML , Linus Torvalds , Greg Kroah-Hartman , Tim Chen , Dave Hansen , tglx@linutronix.de, Kees Cook , Rik van Riel , Peter Zijlstra , Andy Lutomirski , Jiri Kosina , gnomes@lxorguk.ukuu.org.uk, x86@kernel.org, thomas.lendacky@amd.com, Josh Poimboeuf Subject: Re: [PATCH] x86/retpoline: Fill RSB on context switch for affected CPUs Message-ID: <20180112180224.GP6718@tassilo.jf.intel.com> References: <1515779365-9032-1-git-send-email-dwmw@amazon.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1515779365-9032-1-git-send-email-dwmw@amazon.co.uk> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: > + if ((!boot_cpu_has(X86_FEATURE_PTI) && > + !boot_cpu_has(X86_FEATURE_SMEP)) || is_skylake_era()) { > + setup_force_cpu_cap(X86_FEATURE_RSB_CTXSW); > + pr_info("Filling RSB on context switch\n"); We need to do more things for Skylake (like idle and interrupt fill and possibly deep call cahin), so I don't think it makes sense to - have an individual flag for each of these. It can be just a single flag that enables all of this for Skylake - print something for each of them. that will just be very noisy without any useful benefit to the user. -Andi