HomeFreeBSD

amd64: properly recalculate mitigations knobs after resume

Description

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

Details

Provenance
kibAuthored on Mar 17 2023, 1:02 PM
Reviewer
emaste
Differential Revision
D39146: amd64: properly recalculate mitigations knobs after resume
Parents
rG9ee6278b7885: netstat: fix double-free in netlink error code path.
Branches
Unknown
Tags
Unknown