snd_hdsp*: malloc(9) with M_WAITOK
Perform the allocations outside the lock section so that we can use
M_WAITOK. Holding the lock here is actually not really necessary and we
could just as well remove it, but keep it for consistency.
Sponsored by: The FreeBSD Foundation
MFC after: 1 month
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D59079
bhyve: Do not panic on invalid input in HDA emulation
The emulated HDA controller passed values taken from guest registers and
from guest memory straight into assert(), so a guest could abort bhyve
with values the emulation did not expect. Reject them instead.
In case the guest asked to start something and it failed, clear the
corresponding run/enable bit.
PR: 256379, 256381, 256382, 256383, 256384, 256385, 256386, 256498
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: bnovkov, jhb
Differential Revision: https://reviews.freebsd.org/D59082
rc.d/bgfsck: use the correct variable name
The name of the script and the name used internally for rc.conf differ,
as such the hardcoded disabling of service jails for the didn't work.
Fix by using the correct name.
Fixes: f99f0ee14e3af rc.d: add a service jails config to all base system services
(cherry picked from commit 84d8d2878a6efbb2c97a591054f1fc42b7d406ab)
etc/rc.subr: svcj - use the filename for services
We have ports and basesystem services, where the internal name and the
filename differ. While the documentation recommends to keep them in
sync, the reality is different. For service jails use the basename of
the service filename.
Fixes: 2efbd48 rc: add service jails framework
Suggested by: joneum
MFC after: 1 week
MFC to: stable/15
(cherry picked from commit d0f0a3b89b932b776b76278fa6885f19e8b30cbb)
nuageinit: root should be allowed to log in when disable_root is false
PermitRootLogin is "no" by default and that stopped root from logging in
even though disable_root was set to false during initialization.
Reviewed by: bapt
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D59101
bsdinstall: Ensure logging retained when BSDINSTALL_LOG is not changed by preamble
Before the preamble script is sourced, initialize BSDINSTALL_LOG with the
file in $debugFile, if it is not already set.
Without this change, the bsdinstall script would assume the preamble set
BSDINSTALL_LOG to empty and the comparison with $debugFile will fail,
causing the log to be re-initialized to /dev/null.
Reviewed by: dteske
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25343
bhyve: document missing options in bhyve_config(5)
Document a few options that are currently supported but
not covered in bhyve_config(5):
- vcpu.N.cpuset
- domains.N.{size,cpus,domain_policy}
- console (for arm64 and riscv)
MFC after: 1 week
Reviewed by: bnovkov, jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58399
(cherry picked from commit a257e2dc9c6ecd3db41e1aa27a5297a0f328694a)
pci: Expose a VF's owning PF to bus subclasses
ofw_pcibus now uses pci_iov_get_pf() to inherit PF locality for
VFs, but the accessor was inadvertently left in an uncommited ACPI
change. This breaks powerpc builds.
Expose the accessor from the PCI core and provide a stub when PCI_IOV
is omitted. Record VF ownership before pci_add_child() so child added
callbacks can safely query it, and remove the later redundant
assignment.
Fixes: f003e86335c9 ofw_pcibus: Inherit PF locality for SR-IOV VFs
MFC after: 2 weeks
Sponsored by: BBOX.io
examples/jails: Allow any character in interface names
Interface names have no limitations on the allowed character set, only
a length restriction.
Widen the allowed character set for interface names to include any
printable character.
PR: 290916
Reviewed by: dteske
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53865
examples/jails: New version of jib (9.0)
Add $Version, -h/-v, and SPDX-License-Identifier: BSD-2-Clause.
Drop the long-form license and bump the copyright to 2026.
MFC after: 1 week
e1000: Limit the TSO sentinel to lem(4) controllers
The TSO workaround splits the final DMA segment to create a four byte
sentinel descriptor. Intel documents the premature descriptor writeback
erratum and this workaround in the 82540EP and 82545GM specification
updates (erratum 3) and the 82546GB specification update (erratum 1).
Limit the workaround and its preceding TSO state to the legacy PCI and
PCI-X controllers so PCIe controllers retain their natural descriptor
layout using one fewer descriptor per TSO packet, no split of the final
segment, and one less four byte DMA.
MFC after: 2 weeks
Sponsored by: BBOX.io
dounmount(): generalize comment on covered vnode lock recursion
The need for recursion applies (in somewhat different form) to both
nullfs and unionfs, and would likely apply to any other hypothetical
stacked filesystem as well.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D58858
unionfs_lock(): eliminate LK_CANRECURSE special-case
As of commit 9f5c4ef328 ("dounmount(9): temporarily enable recursion
for the covered vnode lock"), the unmount path handles recursion
automatically, so there's no longer a need to handle this case
in unionfs-specific code.
Reviewed by: kib, markj
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D58858
unionfs7.sh: eliminate stderr redirection
The bash-ism here results in an "ambiguous output redirect"
error when run under tcsh. Similar unionfs stress2 tests don't
do this, and unionfs7 doesn't seem to generate spurious output
when run locally, so just delete it.
Reviewed by: pho
Differential Revision: https://reviews.freebsd.org/D58856
snd_hdsp: Avoid allocation in the interrupt handler
Cache PCM children instead of calling device_get_children() from the
interrupt handler. Drain callbacks before child detach so cached
pointers cannot outlive the PCM softc. Allocate the parent softc by
its actual size.
This mirrors snd_hdspe's interrupt dispatch and detach lifecycle.
Reported by: christos
MFC after: 1 week
ofw_pcibus: Honor device proximity for DMA tags
BUS_GET_DOMAIN can report a PCI function's firmware locality, including
an SR-IOV VF's inherited PF locality, but ordinary OFW PCI functions
still use the shared bus DMA tag. Consequently, busdma metadata and
coherent memory can be allocated from the bus's domain instead of the
function's domain.
Create and cache a child tag for each function that requests a DMA tag
and apply its reported domain without modifying the shared parent tag.
Apply the same domain to the private IOMMU tag already created by the
pSeries PCI bus. Destroy cached tags when PCI children are removed so
VF create and destroy cycles do not leak them.
Reviewed by: PowerPC (jhibbits)
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59065
ofw_pcibus: Inherit PF locality for SR-IOV VFs
PCI VFs are allocated dynamically and have no corresponding OFW node.
The zero-filled OFW PCI devinfo currently leaves obd_node as 0, which
is not the invalid-node sentinel and can send NUMA lookup through an
unrelated firmware node.
Initialize dynamically allocated devinfo with an invalid OFW node. For
VF locality queries, use the owning PF's node when it exists. Fall back
to the PCI bus when neither the VF nor PF has a firmware node.
This preserves existing CPU-locality behavior for ordinary PCI devices
while making VF domain and interrupt placement follow their PF.
Reviewed by: PowerPC (jhibbits)
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59064