[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN][PATCH] x86/hvm: vlapic: move vlapic_set_ppr/apicv_write() under CONFIG_INTEL_VMX
- To: Grygorii Strashko <grygorii_strashko@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Thu, 23 Oct 2025 16:30:25 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=s6BpgfENMwdRZxJi4fJcgdFSVq6aJwS6FJNe2jquDHI=; b=Ox7e1GxLYxvUGdCCe0pxsfSQtydK7fJkUKFOj9NYSWTRqM9eTNiA+iHafq4YtDMRuZv/SRkuw0ot+fxTGxLtBtvKn5N7fZd42LtKWNbBJEsQOOXlp3vJvuFeIogP3ENVWtf9lFxl9fy/WYVU5cqGjYboKs1Z6mtD2BFOPOAbiZNAc0drVkG+rvYG93u2aBKXnOuT5YtUzfulT1pLNbMkRJIumQhlxa61DF4V5tBK2kGhsrtUGa8YzhFASKqdlOaCLTZ0waK6vm712R0IqxEwVGOXtXeMl/r3uwj1P4OvnoRftJ9/ABsvjsIlydKlWwC/rv07kQqV82XmUue9M//teA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=j5sX0DFy97TMA5v1vaY8mNxXdrcSxVJwnQZlU5sRZoFNmOGCW6B7WvZjPO00kBtZ2eweMD64oWwg6nl0+4kKISsBF81Uey8iFBhHKbPXUfw+UHTqpvSK5GaLe7t2IQLMaFd5TSwvxK8fyrDGcQtedQh8xFhPQ568Xc5u9kig/3B5GMN47PQx6jQ0N0JEa55AwG6yIxvLiEh++LN7wbmMkSZaOIm5guQ6+cREyz18/w0tkcBQBTos/9lyg1pQ1ZCUcurTkyE9A9PYatBjFs/t1yC3RTxk4FMnrWbArRUNUGkzi8HJrMKXqwW60nD16u1Wn96VWhxw9jaOnAsFjCvy0g==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- Delivery-date: Thu, 23 Oct 2025 15:30:41 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 23/10/2025 4:20 pm, Grygorii Strashko wrote:
> From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
>
> Functions:
> - vlapic_apicv_write()
> - vlapic_set_ppr()
> are used by Intel VMX code only, so move them under CONFIG_INTEL_VMX ifdef.
>
> Signed-off-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
Yes and no. Yes right now, but this is needed for AMD AVIC, which I
understand is one one of the plans.
Throwing #ifdef's around like this in common files is fragile and will
lead to a randconfig nightmare.
There is an alternative which ought to work. Turning on
-ffunction-sections (we already have this for livepatching), and
implementing link time --gc-sections (new work).
That way, the compiler/linker simply drops functions that are not
referenced in the final binary.
Personally I think it will be far nicer and more scalable than the
#ifdefary, (not to mention far easier - it gets rid of everything
unreferenced with one fell swoop).
Thoughts?
~Andrew
|