FreeBSD/src b65e7b4sys/fs/nfsserver nfs_nfsdsocket.c

nfs_nfsdsocket.c: All Copy and Clone across file systems

For some server file system types, such as ZFS, a Copy/Clone
operation can be done across file systems of the same file
system type.

As such, this patch allows the Copy/Clone to be attempted
when the file handles are for files on different file systems.

This fixes a problem for exported ZFS file systems when a
copy_files on file_range(2) between file systems in the same
NFSv4 mount is attempted.

PR:     294010
MFC after:      2 weeks
DeltaFile
+2-1sys/fs/nfsserver/nfs_nfsdsocket.c
+2-11 files

FreeBSD/src 6cc99balib/libc/gen dup3.3, lib/libsys dup.2

dup(2): document the handling of filedescriptor flags

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D56121
DeltaFile
+4-1lib/libsys/dup.2
+2-0lib/libc/gen/dup3.3
+6-12 files

FreeBSD/src c8d40bfusr.bin/diff pr.c

diff: use O_CLOEXEC on pipes

This only simplifies the code, no functional changes expected

MFC After:      1 week
DeltaFile
+2-5usr.bin/diff/pr.c
+2-51 files

FreeBSD/src 945e60eusr.bin/diff3 diff3.c

diff3: set O_CLOEXEC on pipes

This avoid leaking pipe fd in children and simplifies the code

MFC After:      1 week
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D56120
DeltaFile
+2-6usr.bin/diff3/diff3.c
+2-61 files

FreeBSD/src 7b6be00sys/dev/hyperv/vmbus/x86 hyperv_reg.h, sys/x86/x86 local_apic.c

Hyper-V: Detect Extended Destination ID support

Hyper-V advertises support for the Extended Destination ID standard via
bit 2 of the value returned in the EAX register when the hypervisor
stack properties are queried via CPUID.

This is based on a commit to the Linux kernel, as there does not seem
to be any other documentation of this feature.

Reviewed by:    Souradeep Chakrabarti
MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55432
DeltaFile
+9-0sys/x86/x86/local_apic.c
+6-0sys/dev/hyperv/vmbus/x86/hyperv_reg.h
+15-02 files

FreeBSD/src 8dd9a0dsys/x86/x86 local_apic.c

Bhyve: Detect Extended Destination ID support

Bhyve advertises support for the Extended Destination ID standard via
bit 0 (aka CPUID_BHYVE_FEAT_EXT_DEST_ID) of the value returned in the
EAX register when Bhyve features are queried via CPUID.

MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55431
DeltaFile
+8-0sys/x86/x86/local_apic.c
+8-01 files

FreeBSD/src 49b6254sys/amd64/vmm x86.c, sys/x86/include bhyve.h

vmm: Move defines from x86.c to x86/bhyve.h

The values CPUID_BHYVE_FEATURES and CPUID_BHYVE_FEAT_EXT_DEST_ID are
useful for guests, not just hosts; so they belong in a header file in
sys/x86/include rather than simply in the .c file implementing the
bhyve host side.

The original addition of these defines took place without adding a
copyright statement, but since I'm moving them into a new file I've
added the original author's standard copyright (Amazon).

MFC after:      3 weeks
Fixes:  313a68ea20b4 ("bhyve: Add CPUID_BHYVE_FEATURES leaf")
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55430
DeltaFile
+35-0sys/x86/include/bhyve.h
+1-4sys/amd64/vmm/x86.c
+36-42 files

FreeBSD/src 9b18ba2sys/x86/x86 local_apic.c

Xen: Detect Extended Destination ID support

Xen advertises support for the Extended Destination ID standard via
bit 5 (aka XEN_HVM_CPUID_EXT_DEST_ID) of the value returned in the
EAX register when Xen features are queried via CPUID.

MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55429
DeltaFile
+6-0sys/x86/x86/local_apic.c
+6-01 files

FreeBSD/src 8c986d1sys/contrib/xen/arch-x86 cpuid.h

x86/cpuid: add CPUID flag for Extended Destination ID support

Introduce the CPUID flag to be used in order to signal the support for
using an extended destination ID in IO-APIC RTEs and MSI address
fields. Such format expands the maximum target APIC ID from 255 to
32768 without requiring the usage of interrupt remapping.

The design document describing the feature can be found at:

http://david.woodhou.se/15-bit-msi.pdf

Signed-off-by: Roger Pau Monné <roger.pau at citrix.com>
Reviewed-by: Jan Beulich <jbeulich at suse.com>
DeltaFile
+7-0sys/contrib/xen/arch-x86/cpuid.h
+7-01 files

FreeBSD/src 9ab5aa3sys/x86/include kvm.h, sys/x86/x86 local_apic.c

KVM: Detect Extended Destination ID support

KVM advertises support for the Extended Destination ID standard via
bit 15 of the value returned in the EAX register when KVM features
are queried via CPUID.

Tested on:      EC2 r8i.96xlarge
MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55427
DeltaFile
+11-0sys/x86/x86/local_apic.c
+1-0sys/x86/include/kvm.h
+12-02 files

FreeBSD/src b0e1b10sys/x86/include apicvar.h, sys/x86/x86 io_apic.c

io_apic: Support APIC Extended Destination IDs

If APIC Extended Destination ID support is enabled, use it in APIC RTEs
by allowing APIC IDs up to 2^15 - 1 and encoding the high bits into
Intel "reserved" bits per the standard.

Reviewed by:    kib
MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55889
DeltaFile
+7-0sys/x86/x86/io_apic.c
+1-0sys/x86/include/apicvar.h
+8-02 files

FreeBSD/src 02f29c1sys/x86/x86 msi.c

msi: Support APIC Extended Destination IDs

If APIC Extended Destination ID support is enabled, use it in MSIs by
allowing APIC IDs up to 2^15 - 1 and encoding the high bits into
Intel "reserved" bits per the standard.

Tested on:      EC2 r8i.96xlarge
MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55426
DeltaFile
+9-2sys/x86/x86/msi.c
+9-21 files

FreeBSD/src d9db6d7sys/x86/include apicvar.h, sys/x86/x86 local_apic.c

x86: Add stub for Extended Destination ID support

Without an IOMMU, the APIC standard only allows 8 bits of Destination
ID for MSI messages, limiting us to 256 CPUs.  While IOMMUs can allow
for more than 256 CPUs to be supported, they are not necessarily
desirable in virtualized environments.

The Extended Destination ID standard authored by David Woodhouse uses
7 "Reserved" bits for the high bits of a 15-bit Extended Destination
ID in order to address this: http://david.woodhou.se/ExtDestId.pdf

Add a loader tunable machdep.apic_ext_dest_id to control the use of
this feature; the default value (-1) means "autodetect" while 0 and
1 mean disabled and enabled respectively.

Code to detect host support in Xen, Hyper-V, KVM, and Bhyve will come
in future commits, as will the code to use this setting in msi_map and
ioapic_program_intpin.


    [4 lines not shown]
DeltaFile
+15-0sys/x86/x86/local_apic.c
+1-0sys/x86/include/apicvar.h
+16-02 files

FreeBSD/src 5809c9asys/x86/x86 io_apic.c

io_apic: Don't route to APIC ID > 255

I/O APIC Redirection Table Entries use 8 bits to encode the Destination
ID.  Attempting to route an IRQ to a higher APIC ID would result in it
being silently routed to the value reduced modulo 256, causing a panic
if the IRQ fired since the receiving CPU would not expect that IRQ.

Instead, print a warning and mark the interrupt as invalid, resulting
in it being forcibly masked.

Reviewed by:    kib
Tested on:      EC2 r8i.96xlarge
MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55857
DeltaFile
+13-3sys/x86/x86/io_apic.c
+13-31 files

FreeBSD/src 1d0ccd6sys/x86/x86 io_apic.c

x86: Add struct ioapic_intsrc.io_valid

As of this commit, io_valid is always set to 1; but a future commit
will set it to 0, at which point IOART_INTMSET will be set to forcibly
disable interrupt sources regardless of whether they are requested to
be "masked".

Reviewed by:    kib
MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D56006
DeltaFile
+11-3sys/x86/x86/io_apic.c
+11-31 files

FreeBSD/src f350063sys/x86/x86 local_apic.c

clapic_handle_intr: KASSERT isrc != NULL

If an interrupt arrives at a CPU which isn't expecting that particular
vector, intr_lookup_source will return an isrc of NULL and we'll panic
when intr_execute_handlers increments *isrc->is_count.

Place a KASSERT a few nanoseconds earlier in order to leave some more
breadcrumbs for the next person to trip over this behaviour.

Tested on:      EC2 r8i.96xlarge
MFC after:      3 weeks
Sponsored by:   Amazon
Differential Revision:  https://reviews.freebsd.org/D55851
DeltaFile
+3-0sys/x86/x86/local_apic.c
+3-01 files

FreeBSD/src 72bb61bsys/amd64/conf NOTES, sys/x86/conf NOTES

i386/amd64/NOTES: Add some missing devices

The following devices to x86: ocs_fc aq vge tws
And this to amd64: ufshci

These are in GENERIC, but not NOTES.

Sponsored by:           Netflix
DeltaFile
+5-0sys/x86/conf/NOTES
+3-0sys/amd64/conf/NOTES
+8-02 files

FreeBSD/src ccc235fsys/dev/vmgenc vmgenc_acpi.c

vmgenc: fix typo in MODULE_DEPEND declaration

The random_harvestq dependency was registered under the misspelled
name "vemgenc" instead of "vmgenc", causing the dependency to not
be associated with the correct module.

Signed-off-by: Christos Longros <chris.longros at gmail.com>
Reviewed by: cem, imp
Differential Revision:  https://reviews.freebsd.org/D56012
DeltaFile
+1-1sys/dev/vmgenc/vmgenc_acpi.c
+1-11 files

FreeBSD/src beab2fesys/net/route route_ctl.c

routing: Include opt_route.h in route_ctl.c

Fix incorrect removal of opt_route.h header in route_ctl.c

Reported by:    Jenkins
Fixes:          254b23eb1f54 ("routing: Retire ROUTE_MPATH compile option")
Differential Revision: https://reviews.freebsd.org/D55884
DeltaFile
+1-0sys/net/route/route_ctl.c
+1-01 files

FreeBSD/src 254b23esys/net rtsock.c route.h, sys/net/route route_ctl.c nhop_ctl.c

routing: Retire ROUTE_MPATH compile option

The ROUTE_MPATH compile option was introduced to
test the new multipath implementation.
Since compiling it has no overhead and it's enabled
by default, remove it.

Reviewed by:    melifaro, markj
Relnotes:       yes
Differential Revision: https://reviews.freebsd.org/D55884
DeltaFile
+2-36sys/net/route/route_ctl.c
+13-21sys/netlink/route/rt.c
+10-22sys/net/rtsock.c
+0-17sys/net/route.h
+4-13sys/net/route/nhop_ctl.c
+6-8sys/netinet/in_fib.c
+35-11741 files not shown
+67-22347 files

FreeBSD/src 2371b24tests/sys/netinet6 ndp.sh

tests: Add grand link-layer event in netinet6/ndp

Add test for ndp to verity link-layer address change event
actually triggers the grand.

Differential Revision: https://reviews.freebsd.org/D55927
DeltaFile
+50-0tests/sys/netinet6/ndp.sh
+50-01 files

FreeBSD/src 6cf1afeusr.sbin/newsyslog newsyslog.c

newsyslog: check for rename failure during log rotation

Differential Revision:  https://reviews.freebsd.org/D56088
DeltaFile
+3-3usr.sbin/newsyslog/newsyslog.c
+3-31 files

FreeBSD/src 8330871release/packages/ucl rc.ucl

packages: Add dependency from rc to mtree

/etc/rc.d/var_run uses mtree, which is in the devel set and isn't
installed as part of either minimal or optional, so add a manual
dependency.

Reviewed by:    des, bapt, emaste
Differential Revision:  https://reviews.freebsd.org/D54540
Sponsored by:           https://www.patreon.com/bsdivy
DeltaFile
+5-2release/packages/ucl/rc.ucl
+5-21 files

FreeBSD/src 4377300release/packages/ucl xz-all.ucl

packages: Move xz to the minimal set

pkg(8), via its daily periodic script, requires xz.  We don't have
a way to encode dependencies from ports on base packages right now,
so instead move xz to the minimal set so it's always installed.

This isn't an ideal solution, but it's justified in this case since
pkg(8) is always installed, so having its dependencies always
installed is acceptable.

(Following discusson on the diff, new versions of pkg have now been
changed to use zstd instead of xz, but we still think xz is useful
enough to keep in minimal.)

MFC after:      1 week (stable/15 only)
Reviewed by:    des, bapt, emaste
Differential Revision:  https://reviews.freebsd.org/D55630
Sponsored by:           https://www.patreon.com/bsdivy
DeltaFile
+1-1release/packages/ucl/xz-all.ucl
+1-11 files

FreeBSD/src 8ba3adaetc/mtree BSD.include.dist

etc/mtree: Restore removed package tags

Following commit 436618a427b4 which added package tags to mtree,
some of the tags were later removed due to an issue with empty
packages being created.  That problem has been fixed by commit
7965c93e4d41, so we can now restore the tags that were removed.

This reverts commit 00352ef6d2a013650f0ab2a4c9b016c22552ed25.
This reverts commit 1fbdb149aa486961c5d9d6403065e90123b3f5fe.
This reverts commit ef2d586d7efb908bf39e7d5eb5d4305193d0ca6e.
This reverts commit 2a8a6179eb6cef8ba1a417a4c8a1f7063c704533.

MFC after:      2 weeks (stable/15 only)
Reviewed by:    des, bapt, emaste
Differential Revision:  https://reviews.freebsd.org/D55645
Sponsored by:           https://www.patreon.com/bsdivy
DeltaFile
+5-5etc/mtree/BSD.include.dist
+5-51 files

FreeBSD/src c789376share/man/man9 DEVICE_IDENTIFY.9

DEVICE_IDENTIFY.9: Fix function call to detect driver in example code

Fixes:          ccabc7c2e556 ("DEVICE_IDENTIFY.9: Modernize description and use cases")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1share/man/man9/DEVICE_IDENTIFY.9
+1-11 files

FreeBSD/src 18ce9e2tests/sys/netlink test_snl.c

tests/netlink: Bugfix on snl_parse_errmsg_capped test

Turn off the NETLINK_EXT_ACK flag to fix bug of snl_parse_errmsg_capped.

Reviewed by:    pouria
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1660
DeltaFile
+2-2tests/sys/netlink/test_snl.c
+2-21 files

FreeBSD/src ebe529esys/dev/ixgbe ixgbe_type_e610.h ixgbe_e610.c

ix(4): Add EEE support for E610 adapters

The ix driver now supports Energy Efficient Ethernet (EEE) on Intel
E610 devices. EEE allows the network interface to enter low-power
states during periods of low link utilization, reducing power
consumption while maintaining full performance when needed.

E610 adapters provide EEE support through BASE-T PHY functionality.
Due to this PHY-based implementation, EEE is supported only
on 2.5Gb speeds and above.

Signed-off-by: Yogesh Bhosale <yogesh.bhosale at intel.com>
Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>

Authored-by: Yogesh Bhosale <yogesh.bhosale at intel.com>

Approved by:    kbowling (mentor)
Tested by:      Mateusz Moga <mateusz.moga at intel.com>
Sponsored by:   Intel Corporation

    [3 lines not shown]
DeltaFile
+43-14sys/dev/ixgbe/ixgbe_type_e610.h
+35-13sys/dev/ixgbe/ixgbe_e610.c
+34-0sys/dev/ixgbe/if_ix.c
+112-273 files

FreeBSD/src 97934f7sys/amd64/conf NOTES, sys/conf options.amd64

Revert superfluous mis-MFC of "Add ASMC_DEBUG make option"

Revert commit 12e1ab887d58 ("Add ASMC_DEBUG make option, 2026-01-04"),
as the original commit it intended to MFC has already been MFCed as
ab3eaa6ea29d846d on 2026/02/22 (UTC).  The reverted commit introduced
some (superfluous) duplicate lines and an unrelated change.

This is a direct commit to stable/14.

Fixes:          12e1ab887d58 ("Add ASMC_DEBUG make option, 2026-01-04")
Sponsored by:   The FreeBSD Foundation
DeltaFile
+0-4sys/amd64/conf/NOTES
+0-3sys/conf/options.amd64
+0-72 files

FreeBSD/src 1491fe8sys/dev/uart uart_bus_pci.c

uart/pci: support 16550A PCI serial devices

Expand the current check to also attach the ns8250 driver to devices
reporting as 16550A.  This has been tested to work on a real device.

From an inspection of the code in the ns8250 driver it seems like it should
support up to 16950A devices, but I don't have hardware to ensure that,
hence be conservative with the change.

MFC: 2 weeks
Reviewed by: imp
Differential revision: https://reviews.freebsd.org/D56095
DeltaFile
+1-1sys/dev/uart/uart_bus_pci.c
+1-11 files