From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFCBBC7618D for ; Tue, 21 Mar 2023 11:41:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230267AbjCULl1 (ORCPT ); Tue, 21 Mar 2023 07:41:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229872AbjCULlZ (ORCPT ); Tue, 21 Mar 2023 07:41:25 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25FD51CBC5; Tue, 21 Mar 2023 04:41:22 -0700 (PDT) Received: from zn.tnic (p5de8e687.dip0.t-ipconnect.de [93.232.230.135]) (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 6F8B11EC0541; Tue, 21 Mar 2023 12:41:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1679398880; 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=8KLj55BPQ3FZitIoW8lX/Qp9hlW111dUvVmDITZUavc=; b=Y7eebmCqh9rHwcCl1t0xVo1mnhE201G62vR7nEaGV+SsLSJvowWTJN87i/qctcyAWtXXq9 qMPHJEBmUtUCiptoW58jCZo/mteIMAZh8qhwlS+ZYAtUH5rel3JK38kqPYGautcFdLAVfB C6spRZl57sRX4WUHZPOdXesuz6Qk21I= Date: Tue, 21 Mar 2023 12:41:15 +0100 From: Borislav Petkov To: Usama Arif Cc: dwmw2@infradead.org, tglx@linutronix.de, kim.phillips@amd.com, brgerst@gmail.com, piotrgorski@cachyos.org, oleksandr@natalenko.name, arjan@linux.intel.com, mingo@redhat.com, dave.hansen@linux.intel.com, hpa@zytor.com, x86@kernel.org, pbonzini@redhat.com, paulmck@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, rcu@vger.kernel.org, mimoja@mimoja.de, hewenliang4@huawei.com, thomas.lendacky@amd.com, seanjc@google.com, pmenzel@molgen.mpg.de, fam.zheng@bytedance.com, punit.agrawal@bytedance.com, simon.evans@bytedance.com, liangma@liangbit.com, gpiccoli@igalia.com, David Woodhouse Subject: Re: [PATCH v15 04/12] x86/smpboot: Reference count on smpboot_setup_warm_reset_vector() Message-ID: <20230321114115.GGZBmX270DI11eXvM+@fat_crate.local> References: <20230316222109.1940300-1-usama.arif@bytedance.com> <20230316222109.1940300-5-usama.arif@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230316222109.1940300-5-usama.arif@bytedance.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 16, 2023 at 10:21:01PM +0000, Usama Arif wrote: > From: David Woodhouse > > When bringing up a secondary CPU from do_boot_cpu(), the warm reset flag > is set in CMOS and the starting IP for the trampoline written inside the > BDA at 0x467. Once the CPU is running, the CMOS flag is unset and the > value in the BDA cleared. > > To allow for parallel bringup of CPUs, add a reference count to track the > number of CPUs currently bring brought up, and clear the state only when s/bring // > the count reaches zero. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette