]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: properly recalculate mitigations knobs after resume
authorKonstantin Belousov <kib@FreeBSD.org>
Fri, 17 Mar 2023 13:02:03 +0000 (15:02 +0200)
committerKonstantin Belousov <kib@FreeBSD.org>
Sat, 18 Mar 2023 15:40:05 +0000 (17:40 +0200)
commit02904a06c76be857307b78184863654b9e7b88ab
treeebbc2cef1db3749af5922e3f68541d944c1b743c
parent9ee6278b78859e8a9e303ec4a037b4e76d6ed89a
amd64: properly recalculate mitigations knobs after resume

Revision r333125 AKA 986c4ca38772f72 forced clear cpu_stdext_feature3
on suspend, since at that time microcode update was not reloaded
early on resume. Then, revision 050f5a8405c63 started re-reading
cpu_stdext_feature3 again. Since modern CPUs do not require mitigations
from the Skylake era, this went unnoticed for some time.

Keep zeroing cpu_stdext_feature3 on suspend, but re-read it in more
controlled way on resume after microcode is reloaded, and recalculate
active workarounds based on actual microcode capabilities.

Reported and tested by: romain
Reviewed by: emaste, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D39146
sys/amd64/acpica/acpi_wakeup.c
sys/amd64/amd64/initcpu.c