Page MenuHomeFreeBSD

amd64: Add sysctl knobs for loader tunables
AbandonedPublic

Authored by zlei on Oct 16 2023, 5:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 23, 10:21 AM
Unknown Object (File)
Wed, Oct 23, 10:21 AM
Unknown Object (File)
Wed, Oct 23, 10:04 AM
Unknown Object (File)
Sep 28 2024, 8:03 AM
Unknown Object (File)
Sep 10 2024, 12:19 PM
Unknown Object (File)
Sep 5 2024, 11:14 AM
Unknown Object (File)
Jul 10 2024, 11:41 AM
Unknown Object (File)
Jun 3 2024, 8:19 PM

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.