DragonFlyBSD/src 9e1703dsys/dev/virtual/nvmm/x86 nvmm_x86_vmx.c nvmm_x86_svm.c

nvmm(4): Improve guest TSC handling

Don't skip updating TSC if the emulator set a zero value, which can
happen if the emulator resets the VM.  In this case, we really want this
to be applied.

Meanwhile, rename 'gtsc_match' to 'gtsc_last'.

Credit: Maxime Villard (m00nbsd)
DeltaFile
+8-10sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c
+8-10sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c
+16-202 files

DragonFlyBSD/src 51e47edsys/dev/virtual/nvmm/x86 nvmm_x86_internal.h nvmm_x86_vmx.c

nvmm(4): Make use of kernel_fpu_begin() and kernel_fpu_end()

The kernel_fpu_*() API was added to help drm/amdgpu in commit
1be00ff1850ebb705db236c08160ee8fea99b32a, shortly after I ported NVMM.
Use this API to reduce difference with the NVMM upstream.

Credit: Maxime Villard (m00nbsd)
DeltaFile
+1-14sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c
+1-14sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c
+2-2sys/dev/virtual/nvmm/x86/nvmm_x86_internal.h
+4-303 files

DragonFlyBSD/src 2321945sys/dev/virtual/nvmm/x86 nvmm_x86_svm.c nvmm_x86.c

nvmm(4): Fix CPUID bits

- FMA/F16C/VAES/VPCLMULQDQ are part of AVX and should not be exposed.
- PSE36 is not supported and should not be exposed.
- EferLmsleUnsupp should be unconditionally exposed on AMD.
- SHA is part of XMM, which is supported, so it can be exposed.

Credit: Maxime Villard (m00nbsd)
DeltaFile
+10-10sys/dev/virtual/nvmm/x86/nvmm_x86.c
+1-0sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c
+11-102 files

DragonFlyBSD/src 5a1c409sys/dev/virtual/nvmm/x86 nvmm_x86.c nvmm_x86_vmx.c

nvmm(4): Add support for PCID on SVM

Credit: Maxime Villard (m00nbsd)
DeltaFile
+6-5sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c
+5-5sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c
+2-2sys/dev/virtual/nvmm/x86/nvmm_x86.c
+13-123 files

DragonFlyBSD/src 7af02f8doc TODO.nvmm, sys/dev/virtual/nvmm/x86 nvmm_x86_svm.c

nvmm(4): Add TPR support for SVM

If DecodeAssist is supported, intercept writes to CR8, and deliver
TPR_CHANGED VMEXITs to the emulator. This should improve the accuracy of
interrupt delivery on guests like Windows that make heavy use of CR8.

Credit: Maxime Villard (m00nbsd)
DeltaFile
+64-4sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c
+0-2doc/TODO.nvmm
+64-62 files

DragonFlyBSD/src 6776d55sys/dev/virtual/nvmm nvmm_internal.h nvmm_ioctl.h, sys/dev/virtual/nvmm/x86 nvmm_x86_vmx.c nvmm_x86_svm.c

nvmm(4): Remove NVMM_IOC_VCPU_INJECT and associated artifacts

Events are injected in vcpu_run, so this ioctl is not used anymore.

Credit: Maxime Villard (m00nbsd)
DeltaFile
+0-25sys/dev/virtual/nvmm/nvmm.c
+1-6sys/dev/virtual/nvmm/nvmm_ioctl.h
+1-2sys/dev/virtual/nvmm/nvmm_internal.h
+0-1sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c
+0-1sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c
+2-355 files

DragonFlyBSD/src 0d1bb89sys/dev/virtual/nvmm/x86 nvmm_x86_vmx.c nvmm_x86_svm.c

nvmm(4): Fix the XSAVE area size

- Fix nvmm_x86_xsave_size(): x87/SSE are in the legacy region, and the
  size of that region is constant regardless of whether SSE is enabled.

- When XSAVEC is supported, CPUID leaf 0x0000000D:ECX=1[EBX] is supposed
  to return the current XSAVE area size, but NVMM mistakenly returns
  zero. Given that NVMM supports only x87/SSE, XSAVEC is useless, so
  rather than fixing the EBX return value, just don't advertise XSAVEC.

Credit: Maxime Villard (m00nbsd)
DeltaFile
+7-6sys/dev/virtual/nvmm/x86/nvmm_x86.c
+0-1sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c
+0-1sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c
+7-83 files

DragonFlyBSD/src 0d06047sys/dev/virtual/nvmm/x86 nvmm_x86.h nvmm_x86.c

nvmm(4): Advertise new CPUID and ARCH_CAP bits

Advertise SsbdNotRequired and BTC_NO bits in CPUID and mitigation bits
in ARCH_CAP, for the guest to know not to turn on costly mitigations if
the CPU doesn't require them.

Credit: Maxime Villard (m00nbsd)
DeltaFile
+31-1sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c
+7-2sys/dev/virtual/nvmm/x86/nvmm_x86.h
+7-2sys/dev/virtual/nvmm/x86/nvmm_x86.c
+45-53 files

DragonFlyBSD/src 4e53365sys/dev/virtual/nvmm/x86 nvmm_x86_svm.c

nvmm(4): Add CET bit to vmcb_clean on SVM

Small performance gain by caching this (currently unused) state.

Credit: Maxime Villard (m00nbsd)
DeltaFile
+2-1sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c
+2-11 files

DragonFlyBSD/src a45ecd8sys/dev/virtual/nvmm/x86 nvmm_x86_svm.c

nvmm(4): Better restrict access to EFER on SVM

Credit: Maxime Villard (m00nbsd)
DeltaFile
+22-9sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c
+22-91 files

DragonFlyBSD/src b69a74bdoc TODO.nvmm, sys/dev/virtual/nvmm/x86 nvmm_x86_svm.c

nvmm(4): Restrict access to CR4 on SVM similar to VMX

Credit: Maxime Villard (m00nbsd)
DeltaFile
+80-6sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c
+0-2doc/TODO.nvmm
+80-82 files

DragonFlyBSD/src 657498dsys/dev/virtual/nvmm nvmm_internal.h nvmm.c, sys/dev/virtual/nvmm/x86 nvmm_x86_vmx.c nvmm_x86.c

nvmm(4): Sync a few minor changes from m00nbsd

* Add new CPUID bits, and rename a few existing ones.

* Define NPF constants locally; don't rely on OS-provided PGEX_* values.

* Use os_vmspace_t instead of 'struct vmspace', which is the proper
  OS-independent structure.

No functional changes.

Credit: Maxime Villard (m00nbsd)
DeltaFile
+17-4sys/dev/virtual/nvmm/x86/nvmm_x86.h
+13-5sys/dev/virtual/nvmm/x86/nvmm_x86_svm.c
+15-2sys/dev/virtual/nvmm/x86/nvmm_x86.c
+2-2sys/dev/virtual/nvmm/nvmm.c
+1-1sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c
+1-1sys/dev/virtual/nvmm/nvmm_internal.h
+49-156 files

DragonFlyBSD/src 214b3b9sys/dev/virtual/nvmm/x86 nvmm_x86_internal.h

nvmm(4): Define x86_get_cpuid() by own

Define x86_get_cpuid(l, d) to be x86_get_cpuid2(l, 0, d), so thus reduce
one OS-specific interface to port.
DeltaFile
+1-2sys/dev/virtual/nvmm/x86/nvmm_x86_internal.h
+1-21 files

DragonFlyBSD/src 7f42a23sys/dev/virtual/nvmm/x86 nvmm_x86_vmx.c

nvmm(4): Explicitly specify sub-leaf 0 for CPUID 0x00000007

The 0x00000007 (Structured Extended Feature Flags) leaf has sub-leaves,
so use x86_get_cpuid2() to explicitly specify the sub-leaf for
correctness and portability.

See also the commit 0087a1d163488a57787a9a6431dd94070b1988d4 that fixes
do_cpuid() to explicitly set ECX=0.
DeltaFile
+2-2sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c
+2-21 files

DragonFlyBSD/src 0f07d51sys/dev/virtual/nvmm/x86 nvmm_x86_vmx.c nvmm_x86.c

nvmm(4): Improve ARCH_CAP feature bit exposure on VMX

The CPUID_0_07_EDX is reserved and is zero on AMD SVM, so simplify the
logic to expose the ARCH_CAP feature bit on VMX.

This improves my previous commit 01caa5e3ae83149daac28ad634f8236d39dbaedd.

Credit: Maxime Villard (m00nbsd)
DeltaFile
+2-2sys/dev/virtual/nvmm/x86/nvmm_x86_vmx.c
+2-2sys/dev/virtual/nvmm/x86/nvmm_x86.c
+4-42 files

DragonFlyBSD/src 92a70ebcontrib/gcc-12 README.DRAGONFLY, doc upgrading_gcc.txt

doc: Document the steps to import and upgrade GCC

This is partially based on a README created by Scott Parlane (sparlane).

Credit: Scott Parlane (sparlane)
DeltaFile
+150-0doc/upgrading_gcc.txt
+2-0contrib/gcc-12/README.DRAGONFLY
+152-02 files

DragonFlyBSD/src 6c2bca4share/man/man7 hier.7

hier.7: Update a bit.
DeltaFile
+12-1share/man/man7/hier.7
+12-11 files

DragonFlyBSD/src ef1ba79share/misc pci_vendors

Update the pciconf(8) database.

Aug 5, 2026 snapshot from https://pci-ids.ucw.cz
DeltaFile
+2,162-776share/misc/pci_vendors
+2,162-7761 files

DragonFlyBSD/src 5dff546share/misc bsd-family-tree

bsd-family-tree: Sync with FreeBSD.
DeltaFile
+15-5share/misc/bsd-family-tree
+15-51 files

DragonFlyBSD/src 8aa3a09sys/dev/apple/fw apple_fw.c

kernel/apple_fw: Remove unused malloc type.
DeltaFile
+0-2sys/dev/apple/fw/apple_fw.c
+0-21 files

DragonFlyBSD/src 39b2956share/mk bsd.libnames.mk

bsd.libnames.mk: Remove libsupc++.
DeltaFile
+0-1share/mk/bsd.libnames.mk
+0-11 files

DragonFlyBSD/src 357c69clib/libutil pty.3, sbin/gpt gpt.8

Fix some typos in manual pages and visible text.
DeltaFile
+2-2sys/kern/vfs_lock.c
+1-1usr.bin/setcaps/setcaps.1
+1-1sbin/gpt/gpt.8
+1-1lib/libutil/pty.3
+5-54 files

DragonFlyBSD/src 97241calib/libutil Makefile

libutil: Remove ineffective COPTS in the Makefile.
DeltaFile
+0-2lib/libutil/Makefile
+0-21 files

DragonFlyBSD/src 728aaaausr.bin/bmake Makefile

bmake: Use FLAGS_GROUPS et al. for file specific options.

No need to hand roll this.
DeltaFile
+3-2usr.bin/bmake/Makefile
+3-21 files

DragonFlyBSD/src fac5240lib/libfetch http.c

libfetch: Fix GCC 12.5's -Wstringop-overread.

Taken-from: FreeBSD (57fbafb8deac75b924faf1fa6c2222a7719fdfec)
DeltaFile
+3-2lib/libfetch/http.c
+3-21 files

DragonFlyBSD/src 7e7c534contrib/ncurses/ncurses/base lib_screen.c

Merge branch 'vendor/NCURSES'
DeltaFile
+1-1contrib/ncurses/ncurses/base/lib_screen.c
+1-11 files

DragonFlyBSD/src 333ea1fusr.sbin/installer/dfuibe_installer fn_install.c

installer: Fix GCC 12's -Waddress in world. cp_src[i] is never NULL.
DeltaFile
+3-3usr.sbin/installer/dfuibe_installer/fn_install.c
+3-31 files

DragonFlyBSD/src dc79421contrib/ncurses/ncurses/base lib_screen.c

vendor/ncurses: Add a trailing nul for magic-string in putwin.

This was flagged by GCC 12.5's -Wstringop-overread.

Patch is from upstream, therefore fixing on the vendor branch.
DeltaFile
+1-1contrib/ncurses/ncurses/base/lib_screen.c
+1-11 files

DragonFlyBSD/src f48dc6ainitrd mkinitrd.sh

initrd/mkinitrd.sh: Force strip the binaries to fix size exceeding

A user may set DEBUG_FLAGS in /etc/make.conf to retain debug symbols
during the installation phase, so the copied /rescue tools containing
the debug symbols would exceed the allowed maximum initrd image (current
15MB) and then break the installworld phase.

This issue was introduced by my commit 9d10863cc2df1e9077eb6405dd8572c243ba94d7
that removed the hardcoded 'strip' invocation from crunchgen(1)-
generated makefiles.

Now we force strip the binaries after copying them to the initrd build
directory.

Reported-by: swildner
Discussed-with: swildner
DeltaFile
+18-6initrd/mkinitrd.sh
+18-61 files

DragonFlyBSD/src cb392f0initrd/oinit Makefile oinit.c

initrd/oinit: Implement login_tty() to avoid depending on libutil

Copy the login_tty() from libutil and thus remove the dependency on
libutil.  However, this doesn't reduce the final binary size...

Meanwhile, remove unnecessary header inclusions.
DeltaFile
+18-14initrd/oinit/oinit.c
+0-7initrd/oinit/Makefile
+18-212 files