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

Re: [PATCH v5 03/12] libs/guest: allow fetching a specific CPUID leaf from a cpu policy


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 6 Dec 2021 16:25:36 +0100
  • 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=Kr0cj4QOEF2tnC3drtQqJd3HaRInyWKrIhu6JAJnMws=; b=KkBZ71fy2uK8RPvAlw9sq+MOPb2RKhXb1h6jYwStEgJgViOtb+d7WzLHI7Hf9celDyzFuTjk5qAvrE+0HCBUvvN1XQHgNSfZtZBmiAvLazSoyBTfKGLNOLNOypwoeKpdJxyApGWfuwCJjSxamHzAMXUF3wguu5YJB8xTIVCezSdTywc338vKFpwyB7dscocjhC8j0EsXurfKGahUSZGgfhR31qc/qMCZQKc03kbQz9bPJ8Kqatk8wL9Fzuklka07m5O42qC9zKlqsMg4x3Rc3zlMaeFDS0V7LtVw/2YLUnLcAvUvlbge7E/W1JO4LV17Do+lNtT8yOev6BWqC3WJ2A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DUJuk3mlGQSHSkuAwAspG1I4X9/TPv4gc3YW3IHaxk+PgRmQNE1EaxNdWF9tDgFzVWYXh45sKrKormgmNMEaDkSSsJkCFKfoViiQqDdyHPA0ulmrSP1MEsCSm0V7VcLbUa0kcbz+bdnuAt/Ly2NQuoVFZFe/JZ2ojX9i24U8oFcN2lY91qgGCuo0gtRbMXRsQFFa/2p3Po/7KK1Xc+AYzJ5I66wTPIuE1j+uWCC7N3kivWSeXvSD6R7lkVmXHAR6BuvJ/y45Hl4zSnkBadlEY14fNAzhZKiRVNzjOZmkQHp8OLRA4yRIxPz5ILTspHyRPEikPeUXkOVvkuwOO1yEvA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 06 Dec 2021 15:25:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 29.11.2021 16:33, Roger Pau Monne wrote:
> Introduce an interface that returns a specific leaf/subleaf from a cpu
> policy in xen_cpuid_leaf_t format.
> 
> This is useful to callers can peek data from the opaque
> xc_cpu_policy_t type.
> 
> No caller of the interface introduced on this patch.
> 
> Note that callers of find_leaf need to be slightly adjusted to use the
> new helper parameters.

Is this sentence a leftover from an earlier version? I can't associate
it with anything.

> --- a/tools/libs/guest/xg_cpuid_x86.c
> +++ b/tools/libs/guest/xg_cpuid_x86.c
> @@ -855,6 +855,29 @@ int xc_cpu_policy_update_msrs(xc_interface *xch, 
> xc_cpu_policy_t *policy,
>      return rc;
>  }
>  
> +int xc_cpu_policy_get_cpuid(xc_interface *xch, const xc_cpu_policy_t *policy,
> +                            uint32_t leaf, uint32_t subleaf,
> +                            xen_cpuid_leaf_t *out)

Is it common practice in libxc / libxg to have xch parameters even if
they're unused?

Jan




 


Rackspace

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