[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/2] x86/cpu-policy: move CPU policy library code


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 24 Feb 2026 09:53:05 +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=QaK/nnNJWzHaNc7e1YCLZ0K2DDioy2q+G1cdmPzMmTM=; b=fbAv9qXcl5gMpqafii5uL69483JV6eI0A3iy8SBRlhWe+WhPTKc1lpt7Nq6AUBbL/CoGbS1zv234qUbMfEL8G8mmWNgClA3juB2cZPgH7A9mznfhypeoT4or+SqIPSDxaNVfJL2EHDth/z0Zkbphvx9/bHsyz14dIgdWOLqID7qqbzv+TusZ9109BOk+ig1N8SS+wuvWJakFsAwb+ZSg1rAIQVcMY+elgn8WFErRvtgBNqdv3MlvtGQKaFPYkLwhlqWxxb2wfLYSGZrsiJ5xR3SZN0P1qFpF7g1ITmh/p44PRKzS6S9TXkdeJ6u07FjHlLlmlnlxByYTrvg0kEBI8w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HuHYKq8m1i2xEdIqa43Q4wFgzpaPH9iRQ5z4W2l0oEBYQohrxWHBX+s+NMkGSxz14cCpHOj2oX+Gt9aGTlx1HyW2JLulgp6sJ/3AiJfSFZBxo3G+UE/FKI/rZhlyXtrek3+69kHdhO/nU0/u0WKf+/yEONYMzxJCpOXxpCfIca/vMbMgZUG/a+aBXFzjf5KJjh0tkG9A7g6UP+K34w5xP/QKqJDIuqntk4BHBzFFum4ppTsCfCvUJrySBEUTD3/detEHi0L86BGjFVw/rN6C1yuX+uiclz9xm++TbrmLbSiYnxKo6Xxj4wX5Y8i+2a83B04fSpzdmWv43bgWGP2HUQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 24 Feb 2026 08:53:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Feb 24, 2026 at 07:54:29AM +0100, Jan Beulich wrote:
> On 23.02.2026 20:00, Andrew Cooper wrote:
> > On 02/02/2026 4:26 pm, Jan Beulich wrote:
> >> On 02.02.2026 16:47, Andrew Cooper wrote:
> >>> On 07/01/2026 2:17 pm, Jan Beulich wrote:
> >>>> diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk
> >>>> index 0203138a819a..be6c76d2934b 100644
> >>>> --- a/xen/arch/x86/arch.mk
> >>>> +++ b/xen/arch/x86/arch.mk
> >>>> @@ -4,6 +4,7 @@
> >>>>  export XEN_IMG_OFFSET := 0x200000
> >>>>  
> >>>>  ARCH_LIBS-y += arch/x86/lib/lib.a
> >>>> +ALL_LIBS-y += arch/x86/lib/cpu-policy/lib.a
> >>> This wants to extend ARCH_LIBS-y surely?  Is this a rebasing oversight?
> >> No, this was deliberate. The functions here are different from those in
> >> arch/x86/lib/lib.a. We don't need to fear collision with "common code"
> >> ones. Hence I preferred to use the more "normal" placement into what's
> >> passed to the linker.
> > 
> > I agree that we don't have the explicit ordering requirement that we
> > have with arch/x86/lib/lib.a.
> > 
> > But, it still reads as bogus to be putting arch/x86/lib/cpu-policy/lib.a
> > in the non-ARCH list.
> > 
> > What difference is there having this a little earlier in the linker
> > arguments?  Nothing AFAICT.
> 
> Indeed. The sole reason why I'd prefer things as presented is that putting
> stuff in ARCH_LIBS should imo be the special case (i.e. requiring a special
> reason), while putting things in ALL_LIBS should be the default.

I agree with Andrew that it feels weird that arch/x86/lib/lib.a is
placed in ARCH_LIBS-y and arch/x86/lib/cpu-policy/lib.a is placed in
ALL_LIBS-y.  If we want to do it that way it needs a comment
explaining why they are placed in different list, otherwise it seems
like a typo on first sight, and it's likely to confuse people in the
future.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.