Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932602AbeAIXnX (ORCPT + 1 other); Tue, 9 Jan 2018 18:43:23 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:53749 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932186AbeAIXnW (ORCPT ); Tue, 9 Jan 2018 18:43:22 -0500 Date: Wed, 10 Jan 2018 00:43:11 +0100 (CET) From: Thomas Gleixner To: Tom Lendacky cc: x86@kernel.org, linux-kernel@vger.kernel.org, Rik van Riel , Andi Kleen , Peter Zijlstra , Linus Torvalds , Jiri Kosina , Dan Williams , Dave Hansen , Borislav Petkov , Andy Lutomirski , Kees Cook , Tim Chen , Greg Kroah-Hartman , David Woodhouse , Paul Turner Subject: Re: [PATCH v1 1/2] x86/retpoline: Add a function to clear the RETPOLINE_AMD feature In-Reply-To: Message-ID: References: <20180109223723.29322.59126.stgit@tlendack-t1.amdoffice.net> <20180109223736.29322.5436.stgit@tlendack-t1.amdoffice.net> <12147db9-e975-268f-55ee-247868e0e0d8@amd.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, 9 Jan 2018, Tom Lendacky wrote: > On 1/9/2018 5:09 PM, Thomas Gleixner wrote: > > On Tue, 9 Jan 2018, Tom Lendacky wrote: > >> On 1/9/2018 4:46 PM, Thomas Gleixner wrote: > >>> Urgh. That's an awful hack. why not do the obvious? > >> > >> My first attempt was very similar to your change below, but testing > >> showed that spectre_v2_check_boottime_disable() is called before the > >> X86_FEATURE_LFENCE_RDTSC can be set. I can look at moving where the > >> X86_FEATURE_LFENCE_RDTSC is set, maybe into early_init_amd() or such > >> if you think that would be best. > > > > Wait, we can move the selection _AFTER_ identify_boot_cpu(). > > Much cleaner. Since it's just a single patch now, do you want me to > re-submit this after I test it or will you just pick this up as is? > > I did notice that the patch does change the behavior associated with > the command line options, though. Not sure if that was intentional. Yes. I noticed while looking at your issue that when AMD is selected on the command line then we have no support at all on intel. So I prefer to err out and enable the generic version. If you can just polish it up with a changelog and resubmit after testing that would be appreciated as I'm steam blasting the IBRS stuff at the moment. Thanks, tglx