DragonFlyBSD/src 7dc217bsys/cpu/x86_64/include cpufunc.h

cpu/x86_64: Whitespace and style tweaks to <cpufunc.h>
DeltaFile
+8-5sys/cpu/x86_64/include/cpufunc.h
+8-51 files

DragonFlyBSD/src a2a7105sys/dev/virtual/nvmm/x86 nvmm_x86_vmx.c

nvmm(4): Mark vmx_vmptrst() with '__diagused' instead of '__unused'

The vmx_vmptrst() function is only used with OS_ASSERT(), so change to
use '__diagused' makes more sense.

Referred-to: NetBSD (https://github.com/NetBSD/src/commit/90116d8fc2f0c32a7863c868afa8d77e9a865cc7)
DeltaFile
+1-1sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c
+1-11 files

DragonFlyBSD/src 0087a1dsys/cpu/x86_64/include cpufunc.h

cpu/x86_64: Fix do_cpuid() to explicitly set ECX=0

The old do_cpuid() did not initialize ECX before executing the CPUID
instruction, so the results could be incorrect when ECX contained a
non-zero garbage value.

This issue was observed on Intel CPUs when booting a FreeBSD 14.x/15.x
ISO under NVMM, where it caused a general protection fault (#GP) shortly
after the FreeBSD kernel was loaded:

    qemu-system-x86_64: NVMM: Mem Assist Failed [gpa=0xbfff8]
    qemu-system-x86_64: NVMM: Failed to execute a VCPU.
    Abort trap (core dumped)

It occurred when NVMM tried to handle the reading of
IA32_ARCH_CAPABILITIES MSR but the second do_cpuid() returned the
incorrect results indicating that the MSR was unavailable.

The problem was first reported by mneumann in bug #3310 on 2025-11-26 [1].

    [11 lines not shown]
DeltaFile
+6-8sys/cpu/x86_64/include/cpufunc.h
+6-81 files

DragonFlyBSD/src 01caa5esys/dev/virtual/nvmm/x86 nvmm_x86_vmx.c nvmm_x86.c

nvmm(4): Expose ARCH_CAP to guest only if the host CPU supports it

* Don't expose ARCH_CAP to guest on AMD CPUs, because the ARCH_CAP
  feature bit and the IA32_ARCH_CAPABILITIES MSR are Intel-specific and
  unavailable on AMD systems.  I decided to not follow Linux KVM, which
  chose to always provide ARCH_CAP and emulate the MSR for AMD CPUs.

* Check whether the host CPU supports the ARCH_CAP feature bit and only
  expose it to the guest if the host supports it.

Credit to tuxillo and Claude Opus LLM for the analyses and initial
patches.
DeltaFile
+14-7sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c
+2-2sys/dev/virtual/nvmm/x86/nvmm_x86.c
+16-92 files

DragonFlyBSD/src 602b3a3sys/dev/disk/ahci ahci.c atascsi.h

ahci - Read DevSleep DETO and MDAT parameters using READ LOG EXT command.

* DETO = DevSleep Exit Timeout in milliseconds
  MDAT = Minimum DEVSLP Assertion Time in milliseconds

* In the next step, these parameters will be programmed in the DevSleep
  register, when automatic DevSleep power management is enabled, if
  available. If we failed to get these values, or if they were read as
  zero, we should fall back to the "nominal" values of 20ms for DETO and
  10ms for MDAT listed in the Serial ATA specification.
DeltaFile
+40-2sys/dev/disk/ahci/ahci.c
+38-2sys/dev/disk/ahci/atascsi.h
+35-0sys/dev/disk/ahci/ahci_cam.c
+2-0sys/dev/disk/ahci/ahci.h
+115-44 files

DragonFlyBSD/src 7b8d312sys/dev/disk/ahci ahci.c ahci_dragonfly.c

ahci - Improve SATA port link state sysctl output.

This should now always print a meaningful state, instead of outputting
"unknown" in any case where there is no device, no established
communication with the device, or the phy is disabled.

The case "no communication" is relevant, since this can probably occur
in practice on notebooks where an optical drive may be disabled in the BIOS
settings. Or it can probably occur when a disk drive is plugged into a SATA
port, without connecting a power cable.
DeltaFile
+10-0sys/dev/disk/ahci/ahci.c
+3-2sys/dev/disk/ahci/ahci_dragonfly.c
+13-22 files

DragonFlyBSD/src 3dc2428share/man/man4 corecstat.4, sys/config LINT64

corecstat(4): Add driver for Intel CPUs' C-State residency counters

* Currently supports Core family CPUs starting at Nehalem series, up to
  Coffee Lake, as well as some ATOM CPUs.
DeltaFile
+603-0sys/dev/powermng/corecstat/corecstat.c
+104-0share/man/man4/corecstat.4
+10-0sys/cpu/x86_64/include/specialreg.h
+4-0sys/dev/powermng/corecstat/Makefile
+3-0sys/config/LINT64
+1-1sys/dev/powermng/Makefile
+725-12 files not shown
+727-18 files

DragonFlyBSD/src 7e73e8bsys/crypto/rc4 rc4.c

crypto: Fix whitespace in rc4.c
DeltaFile
+5-5sys/crypto/rc4/rc4.c
+5-51 files

DragonFlyBSD/src 8155ec8sbin/ifconfig ifconfig.8

ifconfig.8: Minor tweaks

- Add 'Xr' markup for bridge(4)
- Tweak a word and a punctuation
DeltaFile
+5-3sbin/ifconfig/ifconfig.8
+5-31 files

DragonFlyBSD/src 45cce4csys/sys signal2.h

<sys/signal2.h>: Move CURSIG_*() macros just after __cursig()

Move them closer to help readability a bit.
DeltaFile
+5-5sys/sys/signal2.h
+5-51 files

DragonFlyBSD/src d86287dusr.bin/netstat netstat.1

netstat.1: Fix styles for flags '-4' and '-6'
DeltaFile
+7-3usr.bin/netstat/netstat.1
+7-31 files

DragonFlyBSD/src 697e4e4sys/kern kern_checkpoint.c kern_sig.c, sys/sys signal.h signal2.h

sys: Whitespace and style cleanups
DeltaFile
+30-30sys/kern/kern_checkpoint.c
+6-5sys/kern/kern_sig.c
+5-2sys/sys/signal.h
+3-3sys/kern/kern_exec.c
+2-3sys/kern/kern_time.c
+2-2sys/sys/signal2.h
+48-452 files not shown
+49-488 files

DragonFlyBSD/src 2b93b26sys/sys sysctl.h

<sys/sysctl.h>: Restrict CTL_P1003_1B_MAXID to _KERNEL

This constant is only used to size an array within the kernel.

Obtained-from: FreeBSD (https://reviews.freebsd.org/D25816)
DeltaFile
+2-2sys/sys/sysctl.h
+2-21 files

DragonFlyBSD/src 129968dsys/kern kern_sig.c

kern: Add KTRACE support to kern_sigtimedwait()

The sigtimedwait()/sigwaitinfo() functions provide the userland program
with a way to explicitly accept signals, so add the KTRACE support
similar to postsig().

Meanwhile, tweak the code style in postsig().

Referred-to: FreeBSD
Reviewed-by: dillon
DeltaFile
+17-3sys/kern/kern_sig.c
+17-31 files

DragonFlyBSD/src 2845142sys/kern kern_sig.c

kern: Clean up lwpsignal() to reduce duplicate code on returns

No functional change.
DeltaFile
+9-26sys/kern/kern_sig.c
+9-261 files

DragonFlyBSD/src dd0d22clib/libkvm kvm_proc.c

libkvm: Fix whitespace
DeltaFile
+7-6lib/libkvm/kvm_proc.c
+7-61 files

DragonFlyBSD/src 6b5421asys/kern kern_sig.c

kern: Minor tweaks to kern_sigaction(), siginit(), lwpsignal()

Minor code cleanups; no functional changes.
DeltaFile
+9-11sys/kern/kern_sig.c
+9-111 files

DragonFlyBSD/src 59e384blibexec/telnetd defs.h

telnetd: Fix a typo in comment
DeltaFile
+1-1libexec/telnetd/defs.h
+1-11 files

DragonFlyBSD/src ffce7b1sys/kern kern_sig.c

kern: Style cleanups to expand_name() in kern_sig.c
DeltaFile
+15-7sys/kern/kern_sig.c
+15-71 files

DragonFlyBSD/src 41fc811lib/libc/sys Symbol.map

libc: Add SYSCALLS comments to sys/Symbol.map
DeltaFile
+4-0lib/libc/sys/Symbol.map
+4-01 files

DragonFlyBSD/src 76b8851share/man/man3 Makefile

share/man3: Style cleanups to Makefile
DeltaFile
+24-9share/man/man3/Makefile
+24-91 files

DragonFlyBSD/src d18ed41share/man/man4 bridge.4

bridge.4: Various markup improvements

Meanwhile, fix typos and letter cases, and improve wording.
DeltaFile
+34-23share/man/man4/bridge.4
+34-231 files

DragonFlyBSD/src c8b3dfdsys/sys thread.h

<sys/thread.h>: Add copyright and license header
DeltaFile
+33-3sys/sys/thread.h
+33-31 files

DragonFlyBSD/src 02e9788sys/kern kern_sig.c

kern: Tweak postsig() to assert signal is valid

Improve the KASSERT() to assert the signal is valid, similar to the
KASSERT() in lwpsignal().
DeltaFile
+1-1sys/kern/kern_sig.c
+1-11 files

DragonFlyBSD/src 0948e50sys/kern kern_sig.c

kern: Improve one diagnostic message in issignal()
DeltaFile
+2-1sys/kern/kern_sig.c
+2-11 files

DragonFlyBSD/src 98ae6b8sys/kern kern_sig.c

kern: Clean up kern_sigtimedwait()

- Use tstohz_high() instead of tvtohz_high() and thus remove the
  timespec->timeval conversion.
- Use timespecclear() to reset the 'ets' timespec.
- Use bool for 'timevalid' for better clarity.
- Minor style tweaks.
DeltaFile
+11-12sys/kern/kern_sig.c
+11-121 files

DragonFlyBSD/src 5a04572sys/kern kern_time.c

kern: Remove obsolete MPALMOSTSAFE comments from kern_time.c

The MPALMOSTSAFE comments were added when the code was updated to use
get_mplock(), which has been obsolete by using per-process tokens.
Therefore, remove the obsolete MPALMOSTSAFE comments.

In addition, remove the MPSAFE comments as all the functions has been
MP-safe.
DeltaFile
+0-34sys/kern/kern_time.c
+0-341 files

DragonFlyBSD/src 7253b85lib/librt Makefile

librt: Minor cleanups and tweaks to Makefile
DeltaFile
+6-5lib/librt/Makefile
+6-51 files

DragonFlyBSD/src 719e7c7sys/netinet in.h icmp6.h, sys/sys sysctl.h socket.h

sys: Remove obsolete sysctl name list macros

They were only ever intended for use in sysctl(8) and it has not used
them for many years.

See also: FreeBSD
DeltaFile
+5-111sys/sys/sysctl.h
+0-88sys/netinet/in.h
+0-43sys/sys/socket.h
+2-26sys/netinet/icmp6.h
+1-17sys/netinet/tcp_var.h
+0-17sys/vm/vm_param.h
+8-3029 files not shown
+8-36315 files

DragonFlyBSD/src be6979csys/dev/drm linux_pm_qos.c, sys/dev/drm/drm Makefile

pc64 - First hacky attempt at implementing a deep MWAIT sleep inhibitor.

This is needed by i915(4), to make its DisplayPort code reliable when deep
MWAIT C-States might be used. Since the i915(4) code is not aware of the
CPU core that its interrupt is routed to, we have to pessimistically inhibit
deep MWAIT sleeps on all cores.

This adds a very basic cpu_inhibit_deep_sleep() function to the pc64 platform.
cpu_inhibit_deep_sleep(1) increments a counter by 1, and
cpu_inhibit_deep_sleep(0) decrements that counter. And a positive value in
the counter inhibits deep MWAIT C-States on Intel hardware. Since modern AMD
hardware uses fully autonomous power-saving state selection, and no MWAIT
for idling, this function has no effect on AMD right now.
DeltaFile
+40-0sys/dev/drm/linux_pm_qos.c
+31-1sys/platform/pc64/x86_64/machdep.c
+4-1sys/dev/drm/include/linux/pm_qos.h
+2-0sys/platform/pc64/include/cpu.h
+1-0sys/dev/drm/drm/Makefile
+1-0sys/dev/drm/i915/intel_dp.c
+79-26 files