Skip to content

intel-microcode 3.20220510.0ubuntu0.22.04.1 disables AVX-512 on Alder Lake #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Lastique opened this issue Jun 20, 2022 · 9 comments

Comments

@Lastique
Copy link

Reported in Ubuntu: https://bugs.launchpad.net/ubuntu/+source/intel-microcode/+bug/1979123

Updating intel-microcode to 3.20220510.0ubuntu0.22.04.1 results in AVX-512 inaccessible on Alder Lake CPU, even if the BIOS supports it and it is enabled in the BIOS. The problematic firmware is /lib/firmware/intel-ucode/06-97-02.

Last known working version of intel-microcode is 3.20210608.2ubuntu1. That package version does not contain the microcode (presumably, the version loaded by the BIOS is used).

lscpu:

Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         46 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  16
  On-line CPU(s) list:   0-15
Vendor ID:               GenuineIntel
  Model name:            12th Gen Intel(R) Core(TM) i7-12700K
    CPU family:          6
    Model:               151
    Thread(s) per core:  2
    Core(s) per socket:  8
    Socket(s):           1
    Stepping:            2
    CPU max MHz:         6700.0000
    CPU min MHz:         800.0000
    BogoMIPS:            7219.20
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmpe
                         rf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l2 invpc
                         id_single cdp_l2 ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_
                         ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves split_lock_detect avx_vnni avx512_bf16 dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx51
                         2_vnni avx512_bitalg tme avx512_vpopcntdq rdpid movdiri movdir64b fsrm avx512_vp2intersect md_clear serialize pconfig arch_lbr avx512_fp16 flush_l1d arch_capabilities
Virtualization features: 
  Virtualization:        VT-x
Caches (sum of all):     
  L1d:                   384 KiB (8 instances)
  L1i:                   256 KiB (8 instances)
  L2:                    10 MiB (8 instances)
  L3:                    25 MiB (1 instance)
NUMA:                    
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-15
Vulnerabilities:         
  Itlb multihit:         Not affected
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Mmio stale data:       Not affected
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl and seccomp
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; Enhanced IBRS, IBPB conditional, RSB filling
  Srbds:                 Not affected
  Tsx async abort:       Not affected
@ValeZAA
Copy link

ValeZAA commented Feb 15, 2025

It also fuses it off right, so you can no longer downgrade the ucode, or more accurately when you do it does not restore AVX512.

@hmh
Copy link

hmh commented Feb 16, 2025

The proper way to test this requires that your motherboard firmware be old enough to not disable AVX512 in the first place.

Otherwise, the more probable explanation is that microcode downgrades do not undo the change to the AVX512 chicken bit. If that's what you meant, then yes, this is very likely...

@Lastique
Copy link
Author

My understanding is that microcode downgrades either don't happen or don't enable AVX-512. I.e. the loaded microcode version can only go up. So, to have AVX-512 enabled, you need:

  • A CPU with factory-fused microcode that didn't yet disable AVX-512, and
  • A motherboard BIOS that has a microcode that didn't yet disable AVX-512 and has an option to enable it, which is turned on, and
  • The OS does not upload a microcode that disables AVX-512.

Neither BIOS nor the OS permanently overwrites the factory-fused microcode, so upgrading and then reverting back should not permanently disable AVX-512. At least, with Ubuntu microcode packages I confirmed exactly that, as I first noticed the lack of AVX-512 when I updated the package and then restored AVX-512 when I reverted.

@ValeZAA
Copy link

ValeZAA commented Feb 17, 2025

"The proper way to test this requires that your motherboard firmware be old enough to not disable AVX512 in the first place."

Even if you downgrade BIOS Intel ME cannot always be downgraded.

"I.e. the loaded microcode version can only go up. "

That is not how it works because there is no way to overwrite ucode. Ucode uploads into Bigcore, and it behaves lile RAM.

@Lastique
Copy link
Author

ME firmware has nothing to do with CPU microcode or AVX-512 in particular.

@ValeZAA
Copy link

ValeZAA commented Feb 17, 2025

ME firmware has nothing to do with CPU microcode or AVX-512 in particular.

Intel ME Minix CRBUS is what uploads intel ucode into the Bigcore. And deRSAs it. And does RSA PSS on it to verify the signature. And many other things.

@Lastique
Copy link
Author

Lastique commented Feb 17, 2025

Sure, may be, I don't know the details how the microcode is uploaded. But what's important is that the microcode is provided by either BIOS or the OS.

@ValeZAA
Copy link

ValeZAA commented Feb 17, 2025

Sure, but the microcode is provided by either BIOS or the OS.

Fuses that can be switched and disable parts of silicon, like AVX 512 part of silicon, or part of silicon that got demaged are switched off by Intel ME. To switch them back you need Fuse decryption key.

@Lastique
Copy link
Author

This is not how it works. You can run the latest ME firmware and still have AVX-512 enabled. I'm telling because that's what I do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants