Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0935E606A322 for ; Thu, 3 Dec 2026 08:36:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=xenproject.org header.i=@xenproject.org header.a=rsa-sha256 header.s=20200302mail header.b=fTzNN+MI Received: from list by lists.xenproject.org with outflank-mailman.1511838.1704209 (Exim 4.92) (envelope-from ) id 1xZ2It-0003hG-EW; Thu, 03 Dec 2026 08:36:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1511838.1704209; Thu, 03 Dec 2026 08:36:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xZ2It-0003h9-BR; Thu, 03 Dec 2026 08:36:35 +0000 Received: by outflank-mailman (input) for mailman id 1511838; Thu, 03 Dec 2026 08:36:34 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1xZ2Is-0003h3-2g for xen-devel@lists.xenproject.org; Thu, 03 Dec 2026 08:36:34 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xZ2Iq-00000008noM-1jQz; Thu, 03 Dec 2026 08:36:32 +0000 Received: from 224.pool85-54-217.dynamic.orange.es ([85.54.217.224] helo=localhost) by xenbits.xenproject.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xZ2Ip-00000006xS6-3cZW; Thu, 03 Dec 2026 08:36:32 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Post: List-Help: List-Subscribe: , Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date; bh=G34Wv1NyjAKLYWWry2hr2yxwfZrI74nVyCgyXdBvLqI=; b=fTzNN+MI01Ci1xtUHbX8kjvB9Y GbEjSyfL45ZEFPnTLeHJ3X8F20TBZX8MkQg+cZqeWgH4tqUAyCf55JtCFmy8WhjS4ANklbYkd1l5b eT97/0r8Jc9se2D0cJNyvIr/qR4E1frHjqRVm6OrXSZBBxYCYHwfoXzAbiiVSOqpI/DI=; Date: Thu, 3 Dec 2026 09:36:24 +0100 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: "Orzel, Michal" Cc: Jan Beulich , Andrew Cooper , Teddy Astie , xen-devel@lists.xenproject.org Subject: Re: [PATCH] x86/shim: Make PV_SHIM depend on CPU_ONLINE_OFFLINE Message-ID: References: <20261203073632.84097-1-michal.orzel@amd.com> <0cd6f49c-3c26-4043-9596-006b4bc0a2c3@suse.com> <25f9f15d-a006-49a0-b35e-3fcbbdd208ed@amd.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <25f9f15d-a006-49a0-b35e-3fcbbdd208ed@amd.com> X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Thu, Dec 03, 2026 at 09:28:07AM +0100, Orzel, Michal wrote: > > > On 03-Dec-26 09:09, Jan Beulich wrote: > > On 03.12.2026 08:36, Michal Orzel wrote: > >> PV shim calls cpu_up_helper() and cpu_down_helper() from > >> pv_shim_cpu_{up,down}(). Since commit e8b34da6a098 ("Kconfig: Make cpu > >> hotplug configurable"), these helpers are only built with > >> CONFIG_CPU_ONLINE_OFFLINE. With this option disabled and PV_SHIM enabled > >> the build fails at link time: > >> > >> shim.c:866: undefined reference to `cpu_up_helper' > >> shim.c:899: undefined reference to `cpu_down_helper' > >> > >> Make PV_SHIM depend on CPU_ONLINE_OFFLINE. > >> > >> Fixes: e8b34da6a098 ("Kconfig: Make cpu hotplug configurable") > >> Signed-off-by: Michal Orzel > > > > I was tempted to give this an ack right away, but then I wondered: > > > >> --- a/xen/arch/x86/Kconfig > >> +++ b/xen/arch/x86/Kconfig > >> @@ -291,7 +291,7 @@ config PVH_GUEST > >> config PV_SHIM > >> def_bool y > >> prompt "PV Shim" > >> - depends on PV && XEN_GUEST > >> + depends on PV && XEN_GUEST && CPU_ONLINE_OFFLINE > > > > Might this not better be a select in this particular case? > It's up to you. I can do either way because I don't have any preference here. I would go with select, so that a user doesn't have to enable CPU_ONLINE_OFFLINE to see PV_SHIM. It's a non-trivial connection to make. Thanks, Roger.