sysctls should have positive sense. hw.mds_disable is really something like hw.mds_mitigation_enable: % sysctl -d hw.mds_disable hw.mds_disable: Microarchitectural Data Sampling Mitigation (0 - off, 1 - on VERW, 2 - on SW, 3 - on AUTO it's even more confusing in light of the corresponding status sysctl: % sysctl hw.mds_disable_state hw.mds_disable_state: inactive
also hw.ibrs_disable and hw.spec_store_bypass_disable
In https://reviews.freebsd.org/D22374 scottl suggests: > My suggestion is to move ssb, mds, tsx, and probably others from _hw to > something like _hw.x86.mitigations. Then rename each with a name that's not > enable or disable. We would still have compat OIDs, and I think that the values > could remain the same. That's work for a future time, though.