Page MenuHomeFreeBSD

amd64: Add sysctl knobs for loader tunables
AbandonedPublic

Authored by zlei on Oct 16 2023, 5:22 PM.
Tags
None
Referenced Files
F81889185: D42233.id128846.diff
Thu, Nov 28, 4:53 PM
F81889183: D42233.id128846.diff
Thu, Nov 28, 4:53 PM
F81889182: D42233.id128846.diff
Thu, Nov 28, 4:52 PM
F81889181: D42233.id128846.diff
Thu, Nov 28, 4:52 PM
F81889180: D42233.id128846.diff
Thu, Nov 28, 4:52 PM
F81889179: D42233.id128846.diff
Thu, Nov 28, 4:52 PM
F81889178: D42233.id128846.diff
Thu, Nov 28, 4:52 PM
Unknown Object (File)
Wed, Nov 20, 5:56 AM

Details

Reviewers
kib
alc
grehan
Group Reviewers
bhyve
Summary

The following loader tunable do not have corresponding sysctl MIB
entries. Add them so that they can be retrieved, and sysctl -T will
also report them correctly.

  1. hw.clflush_disable
  2. hw.memtest.tests
  3. hw.skz63_enable
  4. hw.use_xsave
  5. hw.vmm.ept.use_exec_only
  6. hw.vmm.ept.use_hw_ad_bits
  7. hw.vmm.ept.use_superpages
  8. hw.vmm.npt.enable_superpage
  9. hw.xsave_mask

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

zlei requested review of this revision.Oct 16 2023, 5:22 PM
sys/amd64/vmm/amd/npt.c
51
62

I would suggest initializing the variables at their definitions, rather than at run-time.

sys/amd64/amd64/fpu.c
173

The description is wrong.

That said, I do not see much use for these and other x86-related tunables to be exposed as sysctl. They are debugging tools, useful only for people who understand the code.

sys/amd64/amd64/fpu.c
173

Thanks for the explanation.
That make sense. Those tunables are not documented and confused me until git blame shows theirs history.

sys/amd64/amd64/fpu.c
173

If you want to add some information about these tunables, a source comment would be appropriate.

Abandoned as no need to add sysctl knobs for debugging purpose only tunables.

They are debugging tools, useful only for people who understand the code.

sys/amd64/vmm/amd/npt.c
66

Actually the flag enable_superpage can be retrieved from npt_flags which is exposed via sysctl MIB hw.vmm.npt.pmap_flags.

So hw.vmm.npt.enable_superpage should be for debugging purpose only. A new sysctl knob for it is redundant.

sys/amd64/vmm/intel/ept.c
76

Redundant.
They can be retrieved from sysctl MIB hw.vmm.ept.pmap_flags.