[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: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 11 Jan 2022 12:43:56 +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=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=yp4jrTsCCvkgGLA8Y52FbPggkwNCfXkkJ/HXFoFzxSs=; b=lVx441YJWi2Pvr7abeeTXKF8MdCp5vjsbosWRIgb5IPHcEcY5uKj3JN1YWek6s9s96fCwBoN98Eweik8NbFObCKtI1hwt+fdkWUFqrfM3hcYkpL0J5eSEUae/8IlRrbCD6n2FeuBpm/zBxxFdl3lh+yocO7l314qTVsgpQGfgUZo/y24Vgsu9cP27jNnd/4Clu+p4UzxV32ec0tCsCFavzfBmlNyOOL3kbgG53eftavykuVGANvpV/LKoqpsDzWXCyjPbMt0WQ+bvcgkChPJtP9MImjPZmC3jPI/AlZHv14yYLARLhEdse8Z/ozODnD6mxIaETO6Kt4dPOUq/r00Ug==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F+V1C1QNOruarva65dsAMe7cSGwzO/XG5CaXNIyZMrrdHH0tIXAA+MUM9T5bwzmKv/9tbbeYIaEmQu/MpTwdi7hTValQbUi8C1tNjJJD9fKMZ+U7gAYTWUFLqJCpcWgG+4CaWFRm/KeGoZQJd0FLd27ZwoJR+EBY3/I57N8TnOFyc698l4zBDBY28P8lgADA5jtxby8STC8BMO1OvPHgATQPfdf8UiklSROTDxmacWxifHyRjjVXlUji5KIqVNhjhfg0T3o4x6hxGfHwnj0Xbi5QXU7lksA+IP2xdkUJHcK+2yhhtNwsjXEFDlTAkpvoK9q7dpnUgaxn9sVJLEQ0Gw==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 11 Jan 2022 11:44:11 +0000
  • Ironport-data: A9a23:820zeau8jLumMRGizQWGzFb5HefnVNtZMUV32f8akzHdYApBsoF/q tZmKTrXOK7YajShedAnPYq+9hhQuJSGzII1QAJk+yo8EH4X+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZQP0VOZigHtIQMsadUsxKbVIiGHdJZS5LwbZj2NYx2IHhWmthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ NpliJWMVh8AZff3t/UMTRVoC3whN41bweqSSZS/mZT7I0zudnLtx7NlDV0sPJ1e8eFyaY1M3 aVGcnZXNEnF3r/ohuLgIgVvrp1LwM3DJoQQt2sm1TjEJf0nXYrCU+PB4towMDIY2JseQaaBP pNxhTxHaj+fcj4MMG8sB8w6s8aRmGmjQyADtwfAzUYwyzeKl1EguFT3C/LXdcaNXt59hVuDq yTN+GGRKgEXMpmTxCSI9lqoh/TThmXrVYQKDrq6+/V2xlqJyQQ7Fxk+RVa95/6jhSaWWdhSN kgV8SoGtrUp+QqgSdyVdxynolaUsxgEQd1SHuYmrgaXxcLpDx2xXzZeCGQbMZp/6ZFwFWdCO kK1c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aZLXLbUQ6TQr2KgrGSoQEIdxeOk9K1kJ 0QDpSWa+eAc2SS7/yKmTVQeuxIqLLskNHKuQ6d9QYUcegDUdAe0+4TMHf8LqQZfngjOXJvf6 Dsmvav6gDQMUg/X4CePD0oTuLDr9rEmNbPZgMHPQcu7E2rgSmz4LD3PhCE1lNGOgk/i4sKwC zgqUjU96+ju/a0xlv10HLS1Y1fnJ/ExsFYDMKBp8AJInHHixquZq5mR7qe1QpF692H2RIPqp 3hsh0gN8N85zf4eXy0mwLk303a3DMn+xbZuCilqEqmhfa8aCMxCsJHi44cWADe8VAcsNZ117 8O936FtrJMZCmw0xjV1pztbVVHh0C0qX0tnao4lHpES7YTb7dXsMg24F5VKpEdByj3gbpXXN WGNPuspcq+TGnqL0ww5gJUsZ+RtzUIb1q7q3E5y4KoO2M8pgE686MarPZv6kvouqhNDqWs3N 60QpiAoos+O/P+XZgNddvpfvHHeVAlYSi8Rl56cm6XXZ3uBRr22uzKCfMOlaWXRKA=
  • Ironport-sdr: X45VAQLh80GIkcZqHvJEx6ALdKDu2Uh1jg1S+ek1tY/XtXvabXUN7hG6hntAScw7fQokfUypKO xzQMwpcXoOsbm4Aqr+wZfj/GNv5JFkm3iI7vWjtzdp+J1DkygktX+jE6d7e4q28XqM0BXnimJD gFQecBnUZ9WGm7B4bq+HnWIeV4yhMvXQ8Tp5zt9QnWtMXZYA3mZVUsYwojCR0UQMMkKI4CQk9J i3dTIwY+b0ey+6Boj5T1kuQ0GdIsVnmhc9PhNuBDG+btDQcBVZQ/faI7BjbBJrNRgRbH+roZ1s 4R2t8ehgorErR0pxBESTTwJy
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Dec 06, 2021 at 04:25:36PM +0100, Jan Beulich wrote:
> 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.

Yes, looks like. Will remove it.

> > --- 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?

I think it's good practice, as if we ever need to add to use ERROR or
similar from those functions we would require xch, and it's better to
avoid having to change the interface later.

Thanks, Roger.



 


Rackspace

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