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

Re: [PATCH 1/2] x86: move arch_generic_hweightl() to arch-specific library


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 26 Nov 2025 13:51:42 +0000
  • 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=xH3PSPtyfxlv7BsGDtw1CYgo/fmljYPSZrwxVD+LSmU=; b=X8VRi8OPa0MFLaYHNwGgY9hPJ2barhd7QCaEzmn7olpDC8scbcrY1ZcTC/p8MbYxh8A9jblYhszNh9qDCRrdxnKCKIDtzCT3WtC7OcLE8Ar1HgXa4Ff/CDHvdbM0jMcy8iHGCv/isac3mlz3h1Vklchh1/Mh1gXk03yDBUskfFQsUrek8+78LsHVWZ9wY1nc6C/CuiGbn6ztO4sJSRcCdlDaNzKQuPCwJiFnCIDO2dY09vw4SrkFHVqsiv/BAkMEMc2tcgsw2o93WCycBpCf5hkkTH43OxuYZOP4KshacXVtWRIusrBWWL5zSJH5VXrl/ZJx0oD93EdWPREDWKbUQA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Y/vUXVsOCZRtu+9ySqgxoudvkZXTu43ZBNrBXj3P3RpYFkLLvWrAg5M07eSuPSL69kk86mOyUcN86rHr0LEFvMxELM8gb3jmr2UY8srz3zIaCxKf6gcD4Jz54P8TLEkfSRQeDl4DoFDdIE2lMCePXXLTn8iZBN/uFqCr+fmyDL8aH+qbuWjIvnGnxkvMffU/uk6u4h1uzur1Kh2gDs9rF7DyHK1+I+YYTEIq21vwV0tsFQ6BzoQpiM5jy4TvakuZEijUJz04Ydf3VjxMbRGEl2EzxXEaYQux7tVIF6ZqisFxx1jeJn7V6+FRAO0m3ldDhpmaWaB1s7ZANIgqRHTtrg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: andrew.cooper3@xxxxxxxxxx, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 26 Nov 2025 13:51:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26/11/2025 1:24 pm, Jan Beulich wrote:
> diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk
> index 16368a498bb7..a0ee050c931b 100644
> --- a/xen/arch/x86/arch.mk
> +++ b/xen/arch/x86/arch.mk
> @@ -3,6 +3,8 @@
>  
>  export XEN_IMG_OFFSET := 0x200000
>  
> +ALL_LIBS-y += arch/x86/lib/lib.a
> +

Oh, I'd realised it was this easy, I'd have done so straight away when
adding x86's custom arch_generic_hweightl().

I assumed it was going to be more complicated getting the order of the
arch specific lib correct with the generic lib.

More concretely.  Given an x86 lib, we should move things like
arch/x86/memcpy.S to it.

Therefore, when we have common/lib.a and arch/lib.a, do we guarantee to
have arch/lib.a with higher precedence so for matching functions the
arch specific one guarantees to be taken?

Otherwise this feels like a trap waiting to happen.

~Andrew



 


Rackspace

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