2018-05-12 10:57:07

by Gabriel C

[permalink] [raw]
Subject: commit bd9240a18edfbfa72e957fc2ba831cf1f13ea073 seems to break with intel-ucode 20180425

Hi Peter,

after updating ucode to 20180425 on my laptop I always hit the
'TSC_DEADLINE disabled' error and so early microcode update from
inird breaks.

Also I'm able to late load the microcode from command line but
not from initrd.

Going back to ucode 20180312 make things work again.

I've tested on latest 4.16.8 kernel for now.

lscpu output:

Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 78
Model name: Intel(R) Core(TM) i7-6498DU CPU @ 2.50GHz
Stepping: 3
CPU MHz: 500.005
CPU max MHz: 3100.0000
CPU min MHz: 400.0000
BogoMIPS: 5184.00
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 4096K
NUMA node0 CPU(s): 0-3
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 no
nstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor
ds_cpl vmx 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 invpcid_single pti tpr_shadow vnmi flexpriority ept vpid
fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx
smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves ibpb ibrs
stibp dtherm ida arat pln pts hwp
hwp_notify hwp_act_window hwp_epp


Best Regards,

Gabriel C


2018-05-14 07:25:34

by Peter Zijlstra

[permalink] [raw]
Subject: Re: commit bd9240a18edfbfa72e957fc2ba831cf1f13ea073 seems to break with intel-ucode 20180425

On Sat, May 12, 2018 at 12:55:35PM +0200, Gabriel C wrote:
> Hi Peter,
>
> after updating ucode to 20180425 on my laptop I always hit the
> 'TSC_DEADLINE disabled' error and so early microcode update from
> inird breaks.
>
> Also I'm able to late load the microcode from command line but
> not from initrd.
>
> Going back to ucode 20180312 make things work again.
>
> I've tested on latest 4.16.8 kernel for now.
>
> lscpu output:

Please provide /proc/cpuinfo (a single cpu is sufficient) for both
firmwares.

lscpu (whatever that is) lacks useful information, like the microcode
version.

2018-05-14 12:17:08

by Gabriel C

[permalink] [raw]
Subject: Re: commit bd9240a18edfbfa72e957fc2ba831cf1f13ea073 seems to break with intel-ucode 20180425

2018-05-14 9:23 GMT+02:00 Peter Zijlstra <[email protected]>:
> On Sat, May 12, 2018 at 12:55:35PM +0200, Gabriel C wrote:
>> Hi Peter,
>>
>> after updating ucode to 20180425 on my laptop I always hit the
>> 'TSC_DEADLINE disabled' error and so early microcode update from
>> inird breaks.
>>
>> Also I'm able to late load the microcode from command line but
>> not from initrd.
>>
>> Going back to ucode 20180312 make things work again.
>>
>> I've tested on latest 4.16.8 kernel for now.
>>
>> lscpu output:
>
> Please provide /proc/cpuinfo (a single cpu is sufficient) for both
> firmwares.
>
> lscpu (whatever that is) lacks useful information, like the microcode
> version.

ucode 20180312:

http://ftp.frugalware.org/pub/other/people/crazy/ucode/dmesg-ucode-20180312
http://ftp.frugalware.org/pub/other/people/crazy/ucode/cpuinfo-ucode-20180312

ucode 20180425:

http://ftp.frugalware.org/pub/other/people/crazy/ucode/dmesg-ucode-20180425
http://ftp.frugalware.org/pub/other/people/crazy/ucode/cpuinfo-ucode-20180425

Loading microcode manually is working

http://ftp.frugalware.org/pub/other/people/crazy/ucode/reload-late-working-ucode-20180425

Also initramfs is made with dracut and his early microcode option.

Please let me know if you need more infos or want me to test different kernels.

Best Regards,

Gabriel C

2018-05-14 13:01:20

by Peter Zijlstra

[permalink] [raw]
Subject: Re: commit bd9240a18edfbfa72e957fc2ba831cf1f13ea073 seems to break with intel-ucode 20180425

On Mon, May 14, 2018 at 02:15:44PM +0200, Gabriel C wrote:
> http://ftp.frugalware.org/pub/other/people/crazy/ucode/cpuinfo-ucode-20180312
> http://ftp.frugalware.org/pub/other/people/crazy/ucode/cpuinfo-ucode-20180425

That's 0xc2 and 0x9e respectively, for the microcode revision.

For model 78 (INTEL_FAM6_SKYLAKE_MOBILE) we need at least 0xb2.

Now, obviously 0xc2 is in fact larger than 0xb2, however 0x9e is
smaller and it is rightfully complaining.

Now, I have (debian testing):

$ apt-cache show intel-microcode
Package: intel-microcode
Version: 3.20180425.1

$ hexdump /lib/firmware/intel-ucode/06-4e-03 | head
0000000 0001 0000 00c2 0000 2017 1116 06e3 0004
0000010 f699 c6c6 0001 0000 00c0 0000 83d0 0001
0000020 8400 0001 0000 0000 0000 0000 0000 0000

Which gives 0xc2 as version for your CPU.

If I download microcode-20180425.tgz from:

https://downloadcenter.intel.com/download/27776/Linux-Processor-Microcode-Data-File

I again get 0xc2 for 06-4e-03.

So please double check your package...

> Loading microcode manually is working

IIRC late loading doesn't re-evaluate any of this. If you down-grade you
can 'wreck' your system.

> Also initramfs is made with dracut and his early microcode option.

Yes, early microcode should be the right thing.


2018-05-14 14:18:47

by Gabriel C

[permalink] [raw]
Subject: Re: commit bd9240a18edfbfa72e957fc2ba831cf1f13ea073 seems to break with intel-ucode 20180425

2018-05-14 14:58 GMT+02:00 Peter Zijlstra <[email protected]>:
> On Mon, May 14, 2018 at 02:15:44PM +0200, Gabriel C wrote:
>> http://ftp.frugalware.org/pub/other/people/crazy/ucode/cpuinfo-ucode-20180312
>> http://ftp.frugalware.org/pub/other/people/crazy/ucode/cpuinfo-ucode-20180425
>
> That's 0xc2 and 0x9e respectively, for the microcode revision.
>
> For model 78 (INTEL_FAM6_SKYLAKE_MOBILE) we need at least 0xb2.
>
> Now, obviously 0xc2 is in fact larger than 0xb2, however 0x9e is
> smaller and it is rightfully complaining.
>
> Now, I have (debian testing):
>
> $ apt-cache show intel-microcode
> Package: intel-microcode
> Version: 3.20180425.1
>
> $ hexdump /lib/firmware/intel-ucode/06-4e-03 | head
> 0000000 0001 0000 00c2 0000 2017 1116 06e3 0004
> 0000010 f699 c6c6 0001 0000 00c0 0000 83d0 0001
> 0000020 8400 0001 0000 0000 0000 0000 0000 0000
>
> Which gives 0xc2 as version for your CPU.
>
> If I download microcode-20180425.tgz from:
>
> https://downloadcenter.intel.com/download/27776/Linux-Processor-Microcode-Data-File
>
> I again get 0xc2 for 06-4e-03.
>
> So please double check your package...

Yes hexdump matches here too.

I've build a initramfs with the files from microcode-20180425.tgz (
with distro packages removed ) with the same result.

Maybe dracut is doing something stupid .. but I'm not sure what since
the setup does not change just the ucode files.

I'll try to find out.

>
>> Loading microcode manually is working
>
> IIRC late loading doesn't re-evaluate any of this. If you down-grade you
> can 'wreck' your system.
>
>> Also initramfs is made with dracut and his early microcode option.
>
> Yes, early microcode should be the right thing.

I try to build an kernel with built-in ucode file without a initrd
and figure whatever that works.