From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x224I2LKQqtt+GUX1FTnTB9dTIB3yPMK3fEP3LF3ekPV+6wZoALlEiwUxz1CEIYgpLlGZK8MM ARC-Seal: i=1; a=rsa-sha256; t=1517308689; cv=none; d=google.com; s=arc-20160816; b=pU3uk39d8ogYCYUqLd2Iv+g/G3UpXAOyQWH3dvwDMuS4DKJ3ztQlLdonRdjjI3epo+ wpn0rmqun499Cfmkp2lA4PbfZMEkCfIE/D9U9v4pT0Yo7rU4BLixG8sOK1UiXMABACiP QbJ+lq/RLDHSq1nPhCe5VeBAGaIHEq3JVAFJg5lhKhMdJYVcFjVj2qSk66ZNqCZioCCH R5cuBXEeslm3o0DzLJ/NcU47qmcEYhWLs1tmOwvxs/CQJVo4gaetSS8Np7XKLVbaCSuS YtGZ5lxeH3ayOA3cZnMJDNQ1y0+RkQwINGyMhJtfBqnMk+bNtLmd6nmbL/q1mSs54kjq MMZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:message-id:in-reply-to:subject :cc:to:from:date:arc-authentication-results; bh=0HKw/oNtDKpcrD8m9bHJSZw1/r9UNZ3u4v0vECDzCA4=; b=CUI6lz0Dr05hvSMGF1sleqc+lYEUfZh2v+8rvbhWOfJovQpnf/ZTPruWu84UhgIy3d kxOnSZ+xoRgZsCQ25IqD4SN/LRqt6LsE2/iCCGaAcLVQDKE+bdLmu+wWqnwETD0pKFRJ PeWCX8tUNkXfmOzKYjPm8jXD660QlsY9fX+kNn3MXsDMcDKgY1LoBlAALOnNVdM34k9x Q1wpSR949TFQU/eChqzG3iIl37JwJIVKJiGw9YCgxxCeCvrVEX2cSe9ThifhJxA3QoMt zVYrWWMxnQl/Jn4HkG4C7V8DCM78a4I5fR9fVakwRCPGWFByLjcGvHtBYB1RWygRzWAD cIhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of tglx@linutronix.de designates 2a01:7a0:2:106d:700::1 as permitted sender) smtp.mailfrom=tglx@linutronix.de Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of tglx@linutronix.de designates 2a01:7a0:2:106d:700::1 as permitted sender) smtp.mailfrom=tglx@linutronix.de 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590972687399963990?= X-GMAIL-MSGID: =?utf-8?q?1591013476506416473?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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