Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp4840397pxb; Sun, 6 Feb 2022 05:15:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxK6caexcajiPq4suIhraJCTWII49rZn/zTzDtHs78EKGEOTUtLzRPFrMlj3qfadAa96YtF X-Received: by 2002:a63:6b41:: with SMTP id g62mr5912939pgc.538.1644153320434; Sun, 06 Feb 2022 05:15:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644153320; cv=none; d=google.com; s=arc-20160816; b=eoXwzSBucZouNLJ92fdKj+AY8/maihOdAXZ2qqyxuGYMN4xbRlwY19928smZT6TXZ+ EbUWBGBXcw5thavQmVm1r62/UJWCeyHKYzcb409b3w4/jq2MNa9oJoNJ976y3aVZ9tkr St7lRK6pQUHs1KC3Z2nk2TeemgLdEF9MG/U1yxWR8Yhyj9SauidiMODdy9lNCl5SDeLm pXkL+4I/qxi+8qjUWNotzxv7CY/WTKouiW1LCLBrFpNcSSccwmLAVlLHKapj4C9m49y4 QYalkKRoHMq8fZEv9VdEmyl27rtHU25DmBZ8ldlXdX8Y0r8AuCbmujGC1zotMGc7SuCV W8PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=46aTMocMoAPOjkzOyW549Rg/pu0OxKnDcuckgk6b6E0=; b=GRGYvUmlYJiqKbOFQrBhRuex8V/yQu5fd7kIQqnU/PW+GBub15bUqm3+SgMQ1+n5V/ zRnD/P7QdhYtKmp/AnBrpSNY2phyJSwVUUq4Hqx+5yyAN2x23PBL9EllcfHaNwZPZwlU RIzz5foeohIKOo2nGJvOE+ClVLeaycdYZloaK6jceGtvDIpG8j4tmG3GxH3bvkEOSJ7p yEgJJiQ9NeNHjHKBeXD+0vamLKUYqHH+YfO2sBUrKkmK68pXb4HIhj7slKt6pc2h8hCN umUADfIn2vggJ/wh4XEX6bCxVFLzuUNONrK9WTl2XLOHxcWxEXLGZDDUbZRiuDKKAjzV ih5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="KX/7ShJt"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r200si7252098pgr.813.2022.02.06.05.15.09; Sun, 06 Feb 2022 05:15:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="KX/7ShJt"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237030AbiBAK4W (ORCPT + 99 others); Tue, 1 Feb 2022 05:56:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237019AbiBAK4R (ORCPT ); Tue, 1 Feb 2022 05:56:17 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0AEDC061714; Tue, 1 Feb 2022 02:56:17 -0800 (PST) Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id EB4FE1EC04AD; Tue, 1 Feb 2022 11:56:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1643712972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=46aTMocMoAPOjkzOyW549Rg/pu0OxKnDcuckgk6b6E0=; b=KX/7ShJt2YcMVtPaBZxAu52wRHUwNWk17MoeOKO7euO4o8CkggePNJzOO556ySLF708u6Q ek2Kk9Kla3IO2X/9qJMSEn8YNcOw9E3qBggMCKUULGsqesAxEslwNFmLExPajRAnYksDsr wW31SFVfgnyYqCxCpopoHnWWK+gaHfU= Date: Tue, 1 Feb 2022 11:56:08 +0100 From: Borislav Petkov To: David Woodhouse Cc: Tom Lendacky , Thomas Gleixner , Sean Christopherson , Ingo Molnar , Dave Hansen , "x86@kernel.org" , "H . Peter Anvin" , Paolo Bonzini , "Paul E . McKenney" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "rcu@vger.kernel.org" , "mimoja@mimoja.de" , "hewenliang4@huawei.com" , "hushiyuan@huawei.com" , "luolongjun@huawei.com" , "hejingxian@huawei.com" , Joerg Roedel , Andrew Cooper Subject: Re: [PATCH v3 6/9] x86/smpboot: Support parallel startup of secondary CPUs Message-ID: References: <20211215145633.5238-1-dwmw2@infradead.org> <20211215145633.5238-7-dwmw2@infradead.org> <3d8e2d0d-1830-48fb-bc2d-995099f39ef0@amd.com> <330bedfee12022c1180d8752fb4abe908dac08d1.camel@infradead.org> <3bc401a9f110a24a429316371c767507b493025a.camel@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3bc401a9f110a24a429316371c767507b493025a.camel@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 01, 2022 at 10:25:01AM +0000, David Woodhouse wrote: > Thanks. It looks like that is only invoked after boot, with a write to > /sys/devices/system/cpu/microcode/reload. > > My series is only parallelising the initial bringup at boot time, so it > shouldn't make any difference. No, I don't mean __reload_late() - I pointed you at that function to show the dance we must do when updating microcode late. The load_ucode_{ap,bsp}() routines are what is called when loading ucode early. So the question is, does the parallelizing change the order in which APs are brought up and can it happen that a SMT sibling of a two-SMT core executes *something* while the other SMT sibling is updating microcode. If so, that would be bad. > However... it does look like there's nothing preventing a sibling being > brought online *while* the dance you mention above is occurring. Bottom line is: of the two SMT siblings, one needs to be updating microcode while the other is idle. I.e., what __reload_late() does. > Shouldn't __reload_late() take the device_hotplug_lock to prevent that? See reload_store(). -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette