HomeFreeBSD

Turn off IBRS on suspend.

Description

Turn off IBRS on suspend.

Resume starts CPU from the init state, which clears any loaded
microcode updates. As result, IBRS MSRs are no longer available,
until the microcode is reloaded.

I have to forcibly clear cpu_stdext_feature3, which assumes that CPUID
leaf 7 reg %ebx does not report anything except Meltdown/Spectre bugs
bits. If future CPUs add new bits there, hw_ibrs_recalculate() and
identify_cpu1()/identify_cpu2() need to be adjusted for that.

Submitted and tested by: Michael Danilov <mike.d.ft402@gmail.com>
PR: 227866
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D15236

Details

Provenance
kibAuthored on Apr 30 2018, 8:18 PM
Parents
rG47280ef170b2: Fix null pointer dereference on nodes without a "compatible" property.
Branches
Unknown
Tags
Unknown