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

Re: [PATCH v2 09/15] x86: Out-of-inline the policy<->featureset convertors


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 4 Apr 2023 17:01:27 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=aaynlAKGKmHgycZ7qG6oJUclcTjJpuYDyEq4fa/d5Qw=; b=SnXL8GYPzKQZWYU1emHWNgm0NgZmj4qZXM9v7gSgS41IOcUQNKBx6BaDA+hrwSSdCN06hdC+ITKfQW/auuSXnm0VmZx2wjx9d/ZlN0yF6ZBXMdN/PzdW+YUdFLbIVozsRC9q0NkFwzP5b4oysrsCkFC+qTmIXxuB8sh2bNA93zGkot1BYly7alUGQt1bdnoxtJ8mQ6aXxSoUjHjI02X9gkUZMm3Gy14lzelZRoGCU/RBk9ottjHD9NXBe5P8fHd44HyGTp3YVTgRoTPPy9gQAsyoFMkGh6fYWbdZG/RfATTM4wCKsqEkZiN7mSJQsIheH0OgwwHKHc6+WYqQ5X9lBg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cnu0U4TuQngHdyNyTYVEFbBFhsVXEe9GL/nuyWVZ7SVtt5JfGi3nT3iFPZA9AZTkPVWkb6YPXmwgP6IqB9UvyUdI6t9CDjVO/aNGylNc6P6ySy4UrYH4z6VUugAr4DvDeXH7d4wl6FUjT7lb14YVr98gXVKpm89qsgwZ7drAcUKucWkq0T6/ftdQ8NotCdMqV0YBbEBZnUJ9p2fLX3nmELWMU31kaudTT1PZxbbKQsx/XuPZy6ApAPzHHxms4Lx96e4mz634KTWbHHJSCLMSTQouRDK0cbyKbZ5Ck9YZIJF22oTZJlGbwLEZogvCWSOIlWBMdU/GgB7cNbpYaM/r4w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 04 Apr 2023 15:01:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 04.04.2023 11:52, Andrew Cooper wrote:
> These are already getting over-large for being inline functions, and are only
> going to grow more over time.  Out of line them, yielding the following net
> delta from bloat-o-meter:
> 
>   add/remove: 2/0 grow/shrink: 0/4 up/down: 276/-1877 (-1601)
> 
> Switch to the newer cpu_policy terminology while doing so.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

I take it you have a reason to ...

> --- a/xen/lib/x86/cpuid.c
> +++ b/xen/lib/x86/cpuid.c
> @@ -60,6 +60,48 @@ const char *x86_cpuid_vendor_to_str(unsigned int vendor)
>      }
>  }
>  
> +void x86_cpu_policy_to_featureset(
> +    const struct cpu_policy *p, uint32_t fs[FEATURESET_NR_ENTRIES])
> +{
> +    fs[FEATURESET_1d]        = p->basic._1d;
> +    fs[FEATURESET_1c]        = p->basic._1c;
> +    fs[FEATURESET_e1d]       = p->extd.e1d;
> +    fs[FEATURESET_e1c]       = p->extd.e1c;
> +    fs[FEATURESET_Da1]       = p->xstate.Da1;
> +    fs[FEATURESET_7b0]       = p->feat._7b0;
> +    fs[FEATURESET_7c0]       = p->feat._7c0;
> +    fs[FEATURESET_e7d]       = p->extd.e7d;
> +    fs[FEATURESET_e8b]       = p->extd.e8b;
> +    fs[FEATURESET_7d0]       = p->feat._7d0;
> +    fs[FEATURESET_7a1]       = p->feat._7a1;
> +    fs[FEATURESET_e21a]      = p->extd.e21a;
> +    fs[FEATURESET_7b1]       = p->feat._7b1;
> +    fs[FEATURESET_7d2]       = p->feat._7d2;
> +    fs[FEATURESET_7c1]       = p->feat._7c1;
> +    fs[FEATURESET_7d1]       = p->feat._7d1;
> +}
> +
> +void x86_cpu_featureset_to_policy(
> +    const uint32_t fs[FEATURESET_NR_ENTRIES], struct cpu_policy *p)
> +{
> +    p->basic._1d             = fs[FEATURESET_1d];
> +    p->basic._1c             = fs[FEATURESET_1c];
> +    p->extd.e1d              = fs[FEATURESET_e1d];
> +    p->extd.e1c              = fs[FEATURESET_e1c];
> +    p->xstate.Da1            = fs[FEATURESET_Da1];
> +    p->feat._7b0             = fs[FEATURESET_7b0];
> +    p->feat._7c0             = fs[FEATURESET_7c0];
> +    p->extd.e7d              = fs[FEATURESET_e7d];
> +    p->extd.e8b              = fs[FEATURESET_e8b];
> +    p->feat._7d0             = fs[FEATURESET_7d0];
> +    p->feat._7a1             = fs[FEATURESET_7a1];
> +    p->extd.e21a             = fs[FEATURESET_e21a];
> +    p->feat._7b1             = fs[FEATURESET_7b1];
> +    p->feat._7d2             = fs[FEATURESET_7d2];
> +    p->feat._7c1             = fs[FEATURESET_7c1];
> +    p->feat._7d1             = fs[FEATURESET_7d1];
> +}

... add quite a few padding blanks in here, unlike in the originals?

Jan



 


Rackspace

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