Received: by 10.223.176.5 with SMTP id f5csp4133479wra; Tue, 30 Jan 2018 02:38:45 -0800 (PST) X-Google-Smtp-Source: AH8x227eZk/8DNcVabyf6SkC4ikrs7AVt/G5Hz6eY0NOSJ8r+FK/PuR6QDd6UeD+hIHuAFaM0ToD X-Received: by 10.98.246.8 with SMTP id x8mr29567101pfh.234.1517308725825; Tue, 30 Jan 2018 02:38:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517308725; cv=none; d=google.com; s=arc-20160816; b=Zp6h11pXyqdD8F/WkLm25h9XN6Zc2ScYmuKMrckCF441Owu+rFUy4vbnNR97u/xW4u 0+vbkPjP6hj53u4RHMlWTrByLsKh4Ay3Y2q0NwrYO2aX5HhLOnnJOgRJ9Ge/eGaXPF0j /D9zkpRl+WVDdleYyHC+c7NyzC6ap3iV1QLYVlpMtRWs7WAY4Owf4m+t9qcURuMS9+G3 sVD04QT9P6HbGWv9o0OAAUvg6ndaXpxOiwkt0X1pejeV4cYfY0Egw30BSnWCJ5Cdlc+K W58FxwWxwmCzO/+7oiWhB9J9vFscSj8NEVIHmiEWSvMEg1zxfkhKLi7H3vIXTqtMdqtS VpWA== 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 :arc-authentication-results; bh=0HKw/oNtDKpcrD8m9bHJSZw1/r9UNZ3u4v0vECDzCA4=; b=OUKjhCJlr8BJaJx3xDqFMVYmRD0C6dhfniDXo8ccipqsMI2CJlkliiUli8Yzjd09QM Sr3N8pwvnxrcEfTLuej0r6FbOl0n6Pkw1HnJpM9M6O6yQ1xYSdnKV1auwPzT+sfMKOJ6 MwiCUr4sRStYF7iQYlgK1IR1474jBWt6anR24VU3mcPzEAXA0q9sHxfvjuEZXjZ+WR5g ZPe7FeQkZ9EYPLMx0P/qgn5XYhMlU2yl493byDqcaCxEtkot22q1KwS3cB8VOkqBgJEq xmHURHQc0kVNaKDB0BUn6Gwqg6AN7jXhrY65MZB0OIo4PvOW2hKjzidp+lxxT6T4TH2L wBkw== 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 p2si1186578pgn.325.2018.01.30.02.38.31; Tue, 30 Jan 2018 02:38:45 -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 S1751511AbeA3Kh5 (ORCPT + 99 others); Tue, 30 Jan 2018 05:37:57 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:44144 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751257AbeA3Kh4 (ORCPT ); Tue, 30 Jan 2018 05:37:56 -0500 Received: from hsi-kbw-5-158-153-52.hsi19.kabel-badenwuerttemberg.de ([5.158.153.52] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1egTFm-00041n-K1; Tue, 30 Jan 2018 11:35:02 +0100 Date: Tue, 30 Jan 2018 11:37:49 +0100 (CET) From: Thomas Gleixner To: David Woodhouse cc: arjan@linux.intel.com, karahmed@amazon.de, x86@kernel.org, linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com, bp@alien8.de, peterz@infradead.org, pbonzini@redhat.com, ak@linux.intel.com, torvalds@linux-foundation.org, gregkh@linux-foundation.org Subject: Re: [PATCH] x86/cpuid: Fix up "virtual" IBRS/IBPB/STIBP feature bits on Intel In-Reply-To: <1517269773-16750-1-git-send-email-dwmw@amazon.co.uk> Message-ID: References: <1517269773-16750-1-git-send-email-dwmw@amazon.co.uk> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 29 Jan 2018, David Woodhouse wrote: > Despite the fact that all the other code there seems to be doing it, > just using set_cpu_cap() in early_intel_init() doesn't actually work. > > When the CPU is queried again in identify_boot_cpu(), it all gets > overwritten again. Do it in init_scattered_cpuid_features() instead. > > Turning the bits off for bad microcode can use setup_clear_cpu_cap() > to force them off for all CPUs; I was less keen on forcing the feature > bits *on* that way. > > Signed-off-by: David Woodhouse > Fixes: 2961298e ("x86/cpufeatures: Clean up Spectre v2 related CPUID flags") > --- > I feel I must be missing something. Is the rest of early_init_intel() broken too? A lot of that stuff is duct taped and works more by chance than by design. Borislav is looking into cleaning that up already. Thanks, tglx