Page MenuHomeFreeBSD

amd64: Add sysctl knobs for loader tunables
AbandonedPublic

Authored by zlei on Oct 16 2023, 5:22 PM.
Tags
None
Referenced Files
F82553920: D42233.id128846.diff
Tue, Apr 30, 5:50 AM
Unknown Object (File)
Tue, Apr 30, 5:10 AM
Unknown Object (File)
Mon, Apr 29, 10:09 PM
Unknown Object (File)
Sat, Apr 27, 1:34 PM
Unknown Object (File)
Mar 4 2024, 1:16 PM
Unknown Object (File)
Jan 5 2024, 10:33 PM
Unknown Object (File)
Dec 25 2023, 5:22 PM
Unknown Object (File)
Dec 23 2023, 2:39 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.