]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/microcode: microcode_write() should not reference boot_cpu_data
authorAnkur Arora <ankur.a.arora@oracle.com>
Wed, 25 Apr 2018 21:55:02 +0000 (17:55 -0400)
committerBrian Maly <brian.maly@oracle.com>
Tue, 8 May 2018 19:58:57 +0000 (15:58 -0400)
commit6b66bc2c9dd91ed006f2160b012d068d7221dac8
tree11575e8597cdf832253cef873f33ea1fe6bcc24d
parent0fa448d49af55bf1215b2afa5548b8f95c34be67
x86/microcode: microcode_write() should not reference boot_cpu_data

microcode_write() internally calls the AMD or Intel microcode
update logic, both of which update the cpu_data(cpu)->microcode
value. For probing speculation features however, we call
init_scattered_cpuid_features() with boot_cpu_data which is stale
and might have an old value of microcode version.

Fix this by using cpu_data() instead.

Orabug: 27878230

Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Reviewed-by: John Haxby <john.haxby@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(cherry-picked from commit ea35f733dca011782ef2a3647e7f3ac284dbed2e)

Conflict:
  arch/x86/kernel/cpu/microcode/core.c

[Backport: modify arch/x86/kernel/microcode_core.c instead.]

Signed-off-by: Brian Maly <brian.maly@oracle.com>
arch/x86/kernel/cpu/microcode/core.c