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

Re: [PATCH v2 3/3] tools/xen-ucode: print information about currently loaded ucode


  • To: Sergey Dyasli <sergey.dyasli@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 13 Mar 2023 17:31:02 +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=hDcKdplSk+i3MqTWznByf9vgi9yBSa0JjkN0upLKQuk=; b=IzbhuPPI4C2vIWPtbeBZOWkXHOMUly0bTzKe024MWsDj/6zccx2DoXAwJrzaDUOn0wvDU1D6vMEPHaNlPp5XQR2wDGU5XiIaOjgcH7pcRQq291la0CCDxMRWIjl0e8znBhihghEQf36gSLp9QdRTvirpu2+spwOk2C+yKiGF/4C28Sdw5ROxZEkjxxNRbaQNB4MVUzLPK2izntURFrmFBU59mK3cO+k6NzmOuqhjywExdkdLBNczKxIPir9ZBbgixdkAQwSFRSSgKmEtbO4yWWDfBB0Z3u4/NZTFNXjiVPdPkq5nNbREB7mJNxbm8Kiqac8maykyUwToKzWz9DmLeA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fPBEZXpXp62solHz6JcoO/T6Mw1xD4o2zRihc9wvuTClLGWTg3lq+aCl086eOp5cB2SDxe7dqjhqodVrBhdMQJiYOEm6yC72uq8Q0YN7OTHX+AxUcMX6w+ELbxL9eUFXP9z7DnvfIa4K042Jos86fg27PBfPF62U1TNv+miPaKXW9T8BVP6k6X1i2/LYrSGgJH6syywq9f/aIHFBp6xQxDFvscYxYG0hh8qyATzPho7F2ZDcRy2k/OB8Mha6vJ7DXDQwHOLtJnyljpTicQgZUV/zPGpqpF7oeQepW1RNbVlvEtugQWFpjp7RQztF9op9et0uVgjen9Hxysq2vktRQQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 13 Mar 2023 16:31:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01.03.2023 19:01, Sergey Dyasli wrote:
> On Wed, Mar 1, 2023 at 11:31 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>
>> On 28.02.2023 18:39, Sergey Dyasli wrote:
>>> Add an option to xen-ucode tool to print the currently loaded ucode
>>> version and also print it during usage info.  Print CPU signature and
>>> processor flags as well.  The raw data comes from cpuinfo directory in
>>> xenhypfs and from XENPF_get_cpu_version platform op.
>>
>> While I don't mind the use of the platform-op, I'm little puzzled by the
>> mix. If CPU information is to be exposed in hypfs, can't we expose there
>> everything that's needed here?
>>
>> Then again, perhaps in a different context, Andrew pointed out that hypfs
>> is an optional component, so relying on its presence in the underlying
>> hypervisor will need weighing against the alternative of adding a new
>> platform-op for the ucode-related data (as you had it in v1). Since I'm
>> unaware of a request to switch, are there specific reasons you did?
> 
> Ideal situation would be microcode information in Dom0's /proc/cpuinfo
> updated after late load, since that file already has most of the
> information about the cpu. And the closest thing to /proc is xenhypfs.
> It allows the user to query information directly, e.g.
> 
>     # xenhypfs cat /cpuinfo/microcode-revision
>     33554509
> 
> Which could be used manually or in scripts, instead of relying on
> xen-ucode utility. Though printing the value in hex would be nicer.
> That was my motivation to go hypfs route. In general it feels like cpu
> information is a good fit for hypfs, but agreement on its format and
> exposed values is needed.
> I can always switch back to a platform op if that would be the preference.

I've confirmed with Andrew that I was remembering correctly and he would
not want to see a dependency on hypfs in such a tool. Since it's optional
in the hypervisor, you'd need an alternative source of the same info
anyway, and hence you can as well go just that non-hypfs route.

FTAOD: This isn't to say that some CPU info wouldn't be useful to expose
in hypfs. But that's then an independent task.

Jan



 


Rackspace

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