public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" <lavr@ncbi.nlm.nih.gov>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: RE: CPU microcode reported wrong in /proc/cpuinfo
Date: Thu, 16 Jul 2020 14:56:56 +0000	[thread overview]
Message-ID: <DM6PR09MB40436391B9BA65DDA951DE97A57F0@DM6PR09MB4043.namprd09.prod.outlook.com> (raw)
In-Reply-To: <68eea787-9cde-d6ed-499b-61dfc036adff@SystematicSw.ab.ca>

> Managed to get this tested and applied thanks to your help and it has landed in
> new Cygwin 3.1.6 so please post your results and any further comments when you
> have a chance to upgrade and test.

I checked it out in the new Cygwin 3.1.6, and it shows microcode version correctly now, but assuming Windows was booted up from the initial power-on, i.e. after BIOS POST.

There's another problem, though...  After wakeup (from sleep), Windows reports microcode versions in the registry weirdly.

Only the CPU0 (which in my case core 0) is reported with the same info that was reported for all cores after the initial boot-up, all other cores are reported with some old microcode version (I presume that's the microcode that Windows has on its own in one of its CPU driver DLLs).

So for core 0 it is as it was (and for all of them after the boot-up):

C:\Windows\system32>regtool list -v /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/0/
Component Information (REG_BINARY) = 00 00 00 00 00 00 00 00
Identifier (REG_SZ) = "Intel64 Family 6 Model 23 Stepping 10"
Configuration Data (REG_FULL_RESOURCE_DESCRIPTOR) = ?
ProcessorNameString (REG_SZ) = "Intel(R) Xeon(R) CPU           X5470  @ 3.33GHz"
VendorIdentifier (REG_SZ) = "GenuineIntel"
FeatureSet (REG_DWORD) = 0x215b3ffe (559628286)
~MHz (REG_DWORD) = 0x00000d04 (3332)
Update Signature (REG_BINARY) = 00 00 00 00 0e 0a 00 00
Update Status (REG_DWORD) = 0x00000007 (7)
Previous Update Signature (REG_BINARY) = 00 00 00 00 0e 0a 00 00
Platform ID (REG_DWORD) = 0x00000040 (64)

For other cores (1-3), it's this (after wake-up; but after the boot-up it was the same as the above for core 0):

C:\Windows\system32>regtool list -v /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/1/
Component Information (REG_BINARY) = 00 00 00 00 00 00 00 00
Identifier (REG_SZ) = "Intel64 Family 6 Model 23 Stepping 10"
Configuration Data (REG_FULL_RESOURCE_DESCRIPTOR) = ?
ProcessorNameString (REG_SZ) = "Intel(R) Xeon(R) CPU           X5470  @ 3.33GHz"
VendorIdentifier (REG_SZ) = "GenuineIntel"
FeatureSet (REG_DWORD) = 0x215b3ffe (559628286)
~MHz (REG_DWORD) = 0x00000d04 (3332)
Update Signature (REG_BINARY) = 00 00 00 00 0b 0a 00 00
Update Status (REG_DWORD) = 0x00000000 (0)
Previous Update Signature (REG_BINARY) = 00 00 00 00 00 00 00 00
Platform ID (REG_DWORD) = 0x00000040 (64)

Note that there's no "Previous Update Signature" in the latter case, and "Update Status" is 0 (instead of 7, for core 0, and what it also was for these same cores 1-3 after the boot-up).  I'm being repetitive to underscore the noted differences.

So Cygwin reports these same values in its /proc/cpuinfo output (core0: 0xA0E, cores1-3: 0xA0B)...  Meanwhile, Intel CPU ID utility keeps saying the CPU microcode version is still 0xA0E (they don't show "per-core" values, if that was the thing at all), and so does HWiNFO64 (again for the CPU as a whole).

I'm not exactly sure how to read Window's registry values with cores on the same CPU having different microcode versions (is that even possible?)

I tried to dig into what "Update Status" means, but I couldn't find any useful information, unfortunately.

I suspect that "0" means a successful update, but that would also mean that Windows updated ucode in cores 1-3 from nothing to 0xA0B -- and I checked that that's the latest microcode that is shipped with this version of Windows, as a Windows Update, for this CPU.  I found one post that said that "Update Status" 6 would mean no matching update found, but there is no 6 in my case.

An interesting fact is that when I run Linux in VMWare on Windows woken up from sleep, allocating two CPUs for the VM, I can get a mix of one 0xA0E and one 0xA0B ucode reported in "/proc/cpuinfo" for the cores, or it can be two 0xA0Bs.  But it looks like Linux knows exactly it is run virtualized on VMWare, and so may not be reporting from the actual values from the MSRs for that.  I also noticed that it does not attempt to load any microcode in this case.  When I use VirtualBox for the same, I get a completely different microcode version output (but so far consistent and same for both cores), 0x60B (which I don't think is a valid value at all, TBH).  Yet the same, it does not looks like it attempts to load any on its own because it knows it is run virtualized (yet it does not state exactly the host OS VM software unlike it does with VMWare).

So, apologies for the long post.  I just tried to be thorough ;-)

Thanks,
Anton


  reply	other threads:[~2020-07-16 14:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 20:23 Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2020-06-10 21:45 ` Brian Inglis
2020-07-10  1:27   ` Brian Inglis
2020-07-16 14:56     ` Lavrentiev, Anton (NIH/NLM/NCBI) [C] [this message]
2020-07-16 19:46       ` Brian Inglis
2020-07-16 20:13         ` Brian Inglis
  -- strict thread matches above, loose matches on Subject: below --
2020-07-16 20:41 Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2020-07-16 20:36 Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2020-06-10 15:34 Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2020-06-10 21:45 ` Brian Inglis
2020-05-31 15:07 Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2020-06-02 20:11 ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR09MB40436391B9BA65DDA951DE97A57F0@DM6PR09MB4043.namprd09.prod.outlook.com \
    --to=lavr@ncbi.nlm.nih.gov \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).