FreeBSD/src fb2b8c3usr.sbin/bhyve pciids_intel_gpus.h

bhyve: add PCI IDs of Intel GPUs from Linux v6.15

Linux maintains a list of all known PCI IDs for Intel GPUs. We need this list
in the future because the quirks applied by our GVT-d emulation don't work for
the latest generation of Intels integrated graphcis devices. We have to detect
the generation and then apply some generation specific quirks to it.
Fortunately, Linux has macros for each graphic device type making it easy for
us to use that header to detect the generation of the device in the next step.

Copied from Linux v6.15:
* https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/drm/intel/pciids.h?h=v6.15

Reviewed by:            markj
MFC after:              1 week
Sponsored by:           Beckhoff Automation GmbH & Co. KG
Differential Revision:  https://reviews.freebsd.org/D50806
DeltaFile
+873-0usr.sbin/bhyve/pciids_intel_gpus.h
+873-01 files

FreeBSD/src b222153usr.sbin/bhyve pci_passthru.c, usr.sbin/bhyve/amd64 pci_gvt-d.c

bhyve: support VBTs which lay outside of the OpRegion

Previously, all of our devices had an OpRegion with a VBT which lays inside the
OpRegion. Unfortunately, the OpRegion has a fixed size and VBTs get more and
more features/settings. A VBT can be larger than the allocated space of 6 KB
inside the OpRegion. For larger VBTs, Intel added two fields to the OpRegion to
report the VBT address and the VBT size. Make bhyve aware of those fields and
put the VBT into the guest memory too.

Unfortunately, Intel forgot to consider virtualization when defining OpRegion
v2.0. OpRegion v2.0 uses an absolute address for pointing to the VBT. This
address is useless in a guest environment. It's possible to patch that.
However, it requires some more work and we can't test it because we have no
test device with this combination. Therefore, we don't want to do that yet
until we have a use case. Fortunately, Intel noticed the issue and from v2.1
onwards, the VBT address is a relative address.

Reviewed by:            markj
MFC after:              1 week

    [2 lines not shown]
DeltaFile
+112-0usr.sbin/bhyve/amd64/pci_gvt-d.c
+1-1usr.sbin/bhyve/pci_passthru.c
+113-12 files

FreeBSD/src b5c04c8etc/mtree BSD.tests.dist, lib/csu/tests Makefile

csu/tests: Add tests to verify that errno == 0 upon program startup

Reviewed by:    kib, kevans
Differential Revision:  https://reviews.freebsd.org/D50998
DeltaFile
+23-0lib/csu/tests/errno/errno_test.c
+18-0lib/csu/tests/errno/Makefile
+2-0etc/mtree/BSD.tests.dist
+1-0lib/csu/tests/Makefile
+44-04 files

FreeBSD/src 09c9cabtests/sys/netinet broadcast.c

netinet/tests: Mark broadcast:INADDR_BROADCAST as needing network access

The test fails in environments where there is no broadcast address
configured, and this arises in some CI environments.

Fixes:  ad77d3177f3e ("tests/netinet: add few tests for sending a broadcast packet")
DeltaFile
+5-1tests/sys/netinet/broadcast.c
+5-11 files

FreeBSD/src 6458400lib/libc/csu libc_start1.c

csu: C standard requires errno on main() entry

Reported by:    Greg Becker <greg.becker at klarasystems.com>
Reviewed by:    emaste, kevans, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Also see:       https://reviews.freebsd.org/D50998
Differential revision:  https://reviews.freebsd.org/D50997
DeltaFile
+9-0lib/libc/csu/libc_start1.c
+9-01 files

FreeBSD/src 97e2915usr.sbin/makefs/zfs zap.c

makefs: Implement the collision differentiator for micro ZAPs

In the unlikely event of a hash collision, the collision differentiator
is used to create a unique lookup key for ZAP entries.  While the fat
ZAP implementation in makefs implemented this, the micro ZAP
implementation did not, so it's possible to end up with collisions in
directory entries.  These are caught deterministically by OpenZFS, but
the result is a panic.

Implement a simple differentiator by simply assigning a unique value to
each ZAP entry.  This scheme works since the 16-bit space of
differentiators is larger than the maximum number of entries in a micro
ZAP.  (While the on-disk encoding provides 32 bits of space for the
differentiator, the in-memory representation of micro ZAP entries is
smaller.)

PR:             287482
MFC after:      1 week

(cherry picked from commit 64e0b2e8f75286f9f4d85a86fbb6815b435c7096)
DeltaFile
+7-1usr.sbin/makefs/zfs/zap.c
+7-11 files

FreeBSD/src 1b09c94. ObsoleteFiles.inc

Obsoletefiles.inc: Correct paths for some man pages

Reported by:    dougm
MFC after:      1 week
Fixes:          87b646630c48 ("vm_page: Consolidate page busy sleep mechanisms")

(cherry picked from commit 18117f3f1269c3b70c04ed741cc1ca3f3ecd8be9)
DeltaFile
+3-3ObsoleteFiles.inc
+3-31 files

FreeBSD/src 478f977lib Makefile

libclang_rt: Descend into libclang_rt to clean

Otherwise, during a clean buildworld we don't descend into libclang_rt
to remove object files.

Reviewed by:    brooks, dim, emaste
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D50766

(cherry picked from commit 20c636620c6955795f97619d22c7eca9f8599ad7)
DeltaFile
+2-1lib/Makefile
+2-11 files

FreeBSD/src 1609b4dsys/compat/linuxkpi/common/include/linux pm_runtime.h

linuxkpi: Add `pm_runtime_get_if_active()` variant from Linux 6.9

With Linux 6.9, `pm_runtime_get_if_active()` lost its second `bool`
argument.

This change is put behind a check of `LINUXKPI_VERSION` to keep
compatibility.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50991
DeltaFile
+5-0sys/compat/linuxkpi/common/include/linux/pm_runtime.h
+5-01 files

FreeBSD/src cf16d65sys/compat/linuxkpi/common/include/linux math64.h

linuxkpi: Define `div64_ul()` as a synonym to `div64_u64()`

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50986
DeltaFile
+2-0sys/compat/linuxkpi/common/include/linux/math64.h
+2-01 files

FreeBSD/src 81e6c01sys/compat/lindebugfs lindebugfs.c

lindebugfs.c: Fix possible NULL dereference

If `debugfs_destroy()` is called early as part of error handling during
initialzation, `pn->pn_data` is unset. This led to a panic in that if
because `dm` is NULL.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50985
DeltaFile
+1-1sys/compat/lindebugfs/lindebugfs.c
+1-11 files

FreeBSD/src 0e0df1fbin/cp utils.c, bin/cp/tests cp_test.sh

cp: Fix improper use of O_PATH.

This does not appear to make any practical difference at the moment, but
technically `O_PATH` means “I'm not going to use this descriptor for any
other purposes than vnode lookups”, so using it to read the directory's
ACLs is improper and might fail in the future.

Fixes:          82fc0d09e8625
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D50984
DeltaFile
+18-0bin/cp/tests/cp_test.sh
+1-1bin/cp/utils.c
+19-12 files

FreeBSD/src 60f970bkrb5/include Makefile

krb5: Fix install /usr/include INCS

Build and install of subdirs does not need to include bsd.subdir.mk.

As with include/, copies must always be built. And installincludes is
placed after bsd.prog.mk.

Reported by:    fluffy
DeltaFile
+3-4krb5/include/Makefile
+3-41 files

FreeBSD/src 18a8f57tools/build/mk OptionalObsoleteFiles.inc

krb5: Do not remove krb5.h when selecting Heimdal
DeltaFile
+0-2tools/build/mk/OptionalObsoleteFiles.inc
+0-21 files

FreeBSD/src 3f494a4release Makefile

release: Add NODISTSETS to skip legacy dist sets

`make -DPKGBASE -DNODISTSETS` can now be used to build an installer
without any support for dist sets.

Reviewed by:    Isaac Freund <ifreund at freebsdfoundation.org>
Event:          Kitchener-Waterloo Hackathon 202506
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50919
DeltaFile
+16-3release/Makefile
+16-31 files

FreeBSD/src 47c3158usr.sbin/bsdinstall/scripts auto

bsdinstall: Skip pkgbase question if no legacy dist sets

If the install media was built without dist sets (and so has no MANIFEST
file) we do not need to prompt the user, and only pkgbase is in use.

Reviewed by:    Isaac Freund <ifreund at freebsdfoundation.org>
Event:          Kitchener-Waterloo Hackathon 202506
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50918
DeltaFile
+9-5usr.sbin/bsdinstall/scripts/auto
+9-51 files

FreeBSD/src 2669d26share/man/man7 intro.7

intro.7: Reference tracing(7)
DeltaFile
+3-1share/man/man7/intro.7
+3-11 files

FreeBSD/src 0a5b763. ObsoleteFiles.inc, include dirent.h

libc: Rename fscandir{,_b}() to fdscandir{,_b}().

This seems to fit the pattern better (e.g. fdopendir()).

I've added weak references to ease the transition, but since it's only
been a few days, we can remove them (and the ObsoleteFiles entries for
the manual pages) before we branch stable/15.

Fixes:          deeebfdecab5
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D50980
DeltaFile
+14-14lib/libc/gen/scandir.3
+10-4lib/libc/gen/scandir.c
+6-6lib/libc/tests/gen/scandir_blocks_test.c
+6-6lib/libc/tests/gen/scandir_test.c
+4-0ObsoleteFiles.inc
+2-2include/dirent.h
+42-323 files not shown
+47-359 files

FreeBSD/src 124b5dbsys/arm64/arm64 identcpu.c, sys/arm64/include cpu.h

arm64: Add more CPU MIDR values

Found in Linux and https://github.com/arm-software/data

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D50726
DeltaFile
+26-2sys/arm64/arm64/identcpu.c
+19-1sys/arm64/include/cpu.h
+45-32 files

FreeBSD/src cbc2e34sys/dev/virtio/block virtio_blk.c

virtio_blk: Limit use of indirect descriptors

Pass 0 as the number of indirect descriptors when they are not
supported.

This fixes an issue on the Arm FVP model where we don't negotiate
them, however pass a number of segments greater than
VIRTIO_MAX_INDIRECT. This leads to virtqueue_alloc failing and
virtio_blk failing to attach.

Reviewed by:    Harry Moulton <harry.moulton at arm.com>
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D50909
DeltaFile
+5-1sys/dev/virtio/block/virtio_blk.c
+5-11 files

FreeBSD/src 1e4b86asys/arm64/include armreg.h

arm64: Remove the MRS_REG macro and it's users

These are now unused so can be removed.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D50906
DeltaFile
+0-82sys/arm64/include/armreg.h
+0-821 files

FreeBSD/src 3113ac2sys/arm64/arm64 identcpu.c, sys/arm64/include cpu.h

arm64: Add get_user_reg

This is similar to get_kernel_reg such that it gives us a common view
of the userspace ID register.

This will be used to replace extract_user_id_field in a future change.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D50902
DeltaFile
+18-0sys/arm64/arm64/identcpu.c
+1-0sys/arm64/include/cpu.h
+19-02 files

FreeBSD/src b47a6c9sys/arm64/arm64 undefined.c, sys/arm64/include undefined.h armreg.h

arm64: Reduce where we decode msr/mrs instructions

We only use the mrs_Op* and mrs_CR* functions and MRS_* macros when
handling userspace executing a msr/msr instruction.

Move the macros to where they are used and expand the functions to
just use the macros directly.

While here update MRS_Op0_MASK to include bit 20 as this will cause
the correct op0 value to be calculated for all instructions we decode.

Reviewed by:    Harry Moulton <harry.moulton at arm.com>
Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D50214
DeltaFile
+42-7sys/arm64/arm64/undefined.c
+0-20sys/arm64/include/undefined.h
+0-19sys/arm64/include/armreg.h
+42-463 files

FreeBSD/src 128085asys/arm64/arm64 identcpu.c, sys/arm64/include cpu.h

arm64: Use ISS to search for a special register

Previously we would use part of the msr/mrs instruction to find what
register was being asked for. This was the only use for these values.

We now have ESR_EL1 ISS field values for the same register so can use
this new value to find what register is asked for. This lets us remove
the old reg field from struct mrs_user_reg.

Add macros to keep the old KPI.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D50905
DeltaFile
+8-10sys/arm64/arm64/identcpu.c
+12-4sys/arm64/include/cpu.h
+2-1sys/arm64/vmm/vmm.c
+22-153 files

FreeBSD/src f820b6esys/arm64/arm64 exec_machdep.c

arm64: Switch to get_user_reg in fill_dbregs

This lets us read the register in one go then decode it, rather than
searching for the register 3 times.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D50903
DeltaFile
+16-6sys/arm64/arm64/exec_machdep.c
+16-61 files

FreeBSD/src 5948644sys/arm64/arm64 identcpu.c, sys/arm64/include cpu.h

arm64: Remove extract_user_id_field

It's unneeded now we have get_user_reg.

Sponsored by:   Arm Ltd
Differential Revision:  https://reviews.freebsd.org/D50904
DeltaFile
+0-17sys/arm64/arm64/identcpu.c
+0-1sys/arm64/include/cpu.h
+0-182 files

FreeBSD/src b2ac169lib/libc/gen glob.c

glob: Delete trailing whitespace in 'struct glob_limit' definition

Sponsored by: Klara, Inc.
DeltaFile
+2-2lib/libc/gen/glob.c
+2-21 files

FreeBSD/src 66d780alib/libc/gen glob.3

glob.3: Fix punctuation mistakes

Fixes: 1e0743f54d2d
Sponsored by: Klara, Inc.
DeltaFile
+3-3lib/libc/gen/glob.3
+3-31 files

FreeBSD/src 0ee191fsys/sys fcntl.h

fcntl.h: warn that bits for O_* flags are scarce

Running out of O_* flag bits will end out ability to make additions that
are source compatible with other operating systems.

Add a warning to coordinate all additions with srcmgr@.

Reviewed by:    markj, emaste
Differential Revision:  https://reviews.freebsd.org/D50703

(cherry picked from commit 6d0a335aaa81d3ddce95de8d862a23c97bb038a6)
DeltaFile
+10-0sys/sys/fcntl.h
+10-01 files

FreeBSD/src 6ff6a0bcontrib/libexecinfo execinfo.h, lib/msun/riscv fenv.h

Don't rely on sys/_types.h including sys/cdefs.h

These headers relied in __BEGIN_DECS/__END_DECLS being defined when
sys/_types.h was included, but there's not a requirement that this be
the case.

Reviewed by:    imp
Exp-run by:     antoine (PR 286274)
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1595

(cherry picked from commit b01e971fd39d10273a387788019457792873e81c)
(cherry picked from commit 4f4c465b45d42ed8d2b65c8b4c909246987ac877)
(cherry picked from commit 12913e4ddf710e517f3ae00b7b420b783cca9b37)
DeltaFile
+2-0contrib/libexecinfo/execinfo.h
+2-0sys/arm/include/sysarch.h
+2-0sys/arm64/include/sysarch.h
+1-0lib/msun/riscv/fenv.h
+1-0lib/msun/src/math.h
+1-0sys/sys/procdesc.h
+9-03 files not shown
+12-09 files