Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934105AbeAJGUT (ORCPT + 1 other); Wed, 10 Jan 2018 01:20:19 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:41782 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933663AbeAJGUR (ORCPT ); Wed, 10 Jan 2018 01:20:17 -0500 X-Google-Smtp-Source: ACJfBovUgdfjyPikK0NgtkMJX5H+TpIrTrytTVBIbU/v01+ovEZIB6aeH6chY+55lTe+upwM8oGrnA== Date: Wed, 10 Jan 2018 07:20:13 +0100 From: Ingo Molnar To: Dave Hansen Cc: Thomas Gleixner , LKML , Linus Torvalds , x86@kernel.org, Peter Zijlstra , Borislav Petkov , David Woodhouse , Tim Chen , Andrea Arcangeli , Andi Kleen , Greg KH , Andy Lutomirski , Arjan Van De Ven , Borislav Petkov , "Raj, Ashok" Subject: Re: [patch RFC 1/5] x86/CPU: Sync CPU feature flags late Message-ID: <20180110062013.47tbgtccf2wgp5td@gmail.com> References: <20180110010652.404145126@linutronix.de> <20180110011350.501418723@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: * Dave Hansen wrote: > On 01/09/2018 05:06 PM, Thomas Gleixner wrote: > > This is for the case where we need to set feature flags late, like, for > > example, after late microcode patch has been loaded which has enabled > > new CPUID bits. > > > > This has no effect on alternatives patching. > > In other words, if you use late microcode loading for getting IBRS, you > don't get ALTERNATIVE patching and its benefits? > > I'll also profess some microcode ignorance here. Is "late microcode > patching" *all* of the stuff we do from the OS, or do we have early and > late Linux loading in addition to what the BIOS can do? So would it be really unreasonable to say that if a microcode update changes CPU flags an initrd rebuild and a reboot is required? It's not like microcode updates are _that_ frequent - in fact they tend to be much _less_ frequent in a system's life time than kernel updates. So all of this 'late loading' and CPU flag splitting complexity seems unnecessary to me: we should be glad we do early microcode loading now, and should embrace it. Changing CPU features way after the CPU has booted up is possible, and we could in theory extend code patching to work 'late' as well, but given how infrequent all this is bound to be in practice I fear it's all going to be a big, seldom tested, often broken mess, with no real benefit to users. Thanks, Ingo