Page MenuHomeFreeBSD

Add x86 msr tweak KPI.
ClosedPublic

Authored by kib on Nov 17 2019, 4:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 23 2023, 3:55 AM
Unknown Object (File)
Nov 30 2023, 2:27 AM
Unknown Object (File)
Nov 16 2023, 1:02 PM
Unknown Object (File)
Nov 12 2023, 12:49 AM
Unknown Object (File)
Nov 11 2023, 1:43 PM
Unknown Object (File)
Nov 11 2023, 1:42 AM
Unknown Object (File)
Nov 10 2023, 12:12 PM
Unknown Object (File)
Nov 9 2023, 8:10 AM
Subscribers

Details

Summary

It is consistently uses rendezvouz IPI instead of binding current thread to all CPUs.

Use the KPI to tweak MSRs in mitigation code.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This looks great. My only complaint is using the name "tweak", I think it's too casual and poorly descriptive. Maybe x86_program_msr_smp()?

Rename to x86_msr_op().
Restore sched_bind() mode of broadcast to keep the ssb toggle algorithm unchanged. I do think that my switch to smp_rendezvous for ssb is actually fine because our use of mwait does not re-enable interrupts, but let do that as separate change.

sys/x86/x86/cpu_machdep.c
153 ↗(On Diff #64519)

Should we also assert that OP_LOCAL and OP_SCHED are not both specified?

172 ↗(On Diff #64519)

I think it would be nicer to have an explicit name for this case, to make it easier to read the calling code. Maybe MSR_OP_RENDEZVOUS.

kib marked 2 inline comments as done.

Add MSR_OP_RENDEZVOUS. Assert that exactly one command mode flag is passed.

This revision is now accepted and ready to land.Nov 18 2019, 4:25 PM

Minor request, if the MSR_OP_LOCAL/SCHED/RENDEVOUS opcodes are mutually exclusive from each other then don't make them be bitfield definitions, just have them be sequential numbers.

Make execution submode numeric.

This revision now requires review to proceed.Nov 18 2019, 7:27 PM
This revision is now accepted and ready to land.Nov 18 2019, 7:56 PM
This revision was automatically updated to reflect the committed changes.