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
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]
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")
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
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)
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)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)