Page MenuHomeFreeBSD

x86: Add sysctl knobs for loader tunables
AbandonedPublic

Authored by zlei on Oct 16 2023, 7:05 AM.
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 16 2024, 7:58 PM
Unknown Object (File)
Sep 5 2024, 11:15 AM
Unknown Object (File)
Aug 29 2024, 1:10 PM
Unknown Object (File)
Aug 18 2024, 1:01 PM
Unknown Object (File)
Jul 26 2024, 8:48 AM
Subscribers

Details

Reviewers
kib
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.attach_intel_csr_pci
  2. hw.cpu_stdext_disable
  3. hw.dmar.enable
  4. hw.dmar.fault_log_size
  5. hw.dmar.ir
  6. hw.dmar.pmr.disable
  7. hw.dmar.qi
  8. hw.dmar.qi_size
  9. hw.x2apic_enable

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, 7:05 AM
sys/x86/iommu/intel_drv.c
163

I guess those knobs hw.dmar.xxx should be under hw.iommu.dmar.

sys/x86/iommu/intel_drv.c
163

I guess those knobs hw.dmar.xxx should be under hw.iommu.dmar.

Found a history change https://reviews.freebsd.org/D25807 .

So how should we process the inconsistency ?
Maybe with a compile condition COMPAT_FREEBSD10 ?

+#ifdef COMPAT_FREEBSD10
        TUNABLE_UINT64_FETCH("hw.dmar.timeout", &timeout);
+#endif
+       TUNABLE_UINT64_FETCH("hw.iommu.dmar.timeout", &timeout);
sys/x86/acpica/madt.c
200

Emm, we already have hw.apic.x2apic_mode, a hw.x2apic_enable seems redundant .

Quote from D42233 by @kib

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/x86/iommu/intel_drv.c
163

well, iommu == dmar.

So if you want to rename, do it by hw.dmar => hw.iommu or hw.iommu.intel (because for AMD it would be different)

COMPAT_FREEBSD10 does not make sense since it is present in 14 as well. But IMO this should not be kept, just rename the knobs. People that use them should know what they do, it is not a typical user tweak.

sys/x86/pci/qpi.c
65

Again not too useful. Either buses are attached and knob worked, or there are no buses visible.

sys/x86/x86/identcpu.c
1523

Not too useful to provide.