FreeBSD/src 0aaa95asys/dev/vmm vmm_ktr.h

vmm: Add an include to vmm_ktr.h for vm_name()

Required when KTR is configured.

Remove the pcpu.h include while here, as it seems to be unneeded.

Reported by:    Jenkins
Fixes:          5f13d6b60740 ("vmm: Move common accessors and vm_eventinfo into sys/dev/vmm")
DeltaFile
+3-1sys/dev/vmm/vmm_ktr.h
+3-11 files

FreeBSD/src 5f13d6bsys/amd64/include vmm.h, sys/amd64/vmm vmm.c

vmm: Move common accessors and vm_eventinfo into sys/dev/vmm

Now that struct vm and struct vcpu are defined in headers, provide
inline accessors.  We could just remove the accessors outright, but they
don't hurt and it would result in unneeded churn.

As a part of this, consolidate definitions related to struct
vm_eventinfo as well.  I'm not sure if struct vm_eventinfo is really
needed anymore, now that vmmops_run implementations can directly access
vm and vcpu fields, but this can be resolved later.

No functional change intended.

MFC after:      2 months
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D53586
DeltaFile
+67-0sys/dev/vmm/vmm_vm.h
+1-40sys/amd64/include/vmm.h
+0-40sys/riscv/vmm/vmm.c
+0-37sys/amd64/vmm/vmm.c
+0-37sys/arm64/vmm/vmm.c
+1-29sys/riscv/include/vmm.h
+69-1836 files not shown
+78-21112 files

FreeBSD/src ed85203sys/amd64/include vmm.h, sys/amd64/vmm vmm.c

vmm: Deduplicate VM and vCPU state management code

Now that the machine-independent fields of struct vm and struct vcpu are
available in a header, we can move lots of duplicated code into
sys/dev/vmm/vmm_vm.c.  This change does exactly that.

No functional change intended.

MFC after:      2 months
Sponsored by:   The FreeBSD Foundation
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D53585
DeltaFile
+5-478sys/amd64/vmm/vmm.c
+476-0sys/dev/vmm/vmm_vm.c
+5-312sys/arm64/vmm/vmm.c
+5-312sys/riscv/vmm/vmm.c
+47-2sys/dev/vmm/vmm_vm.h
+0-37sys/amd64/include/vmm.h
+538-1,14112 files not shown
+551-1,22718 files

FreeBSD/src a6411f6sys/amd64/include vmm.h, sys/amd64/vmm vmm.c

vmm: Consolidate vm and vcpu definitions

There is quite a lot of duplication of code between amd64, arm64 and
riscv with respect to VM and vCPU state management.  This is a bit
tricky to resolve since struct vm and struct vcpu are private to vmm.c
and both structures contain a mix of machine-dependent and
machine-independent fields.

To allow deduplication without also introducing a lot of churn, follow
the approach of struct pcpu and 1) lift the definitions of those
structures into a new header, sys/dev/vmm/vmm_vm.h, and 2) define
machine-dependent macros, VMM_VM_MD_FIELDS and VMM_VCPU_MD_FIELDS which
lay out the machine-dependent fields.

One disadvantage of this approach is that the two structures are no
longer private to vmm.c, but I think this is acceptable.

No functional change intended.  A follow-up change will move a good deal
of machine/vmm/vmm.c into sys/dev/vmm/vmm_vm.c.

    [5 lines not shown]
DeltaFile
+121-0sys/dev/vmm/vmm_vm.h
+1-82sys/amd64/vmm/vmm.c
+36-35sys/arm64/include/vmm.h
+2-65sys/arm64/vmm/vmm.c
+1-55sys/riscv/vmm/vmm.c
+27-28sys/amd64/include/vmm.h
+188-26514 files not shown
+239-30220 files

FreeBSD/src 1410d22contrib/llvm-project/libcxx/include/__memory uninitialized_algorithms.h

libc++: silence -Wnontrivial-memaccess warning with newer clang

Apply part of LLVM commit 71315698c91d0cda054b903da0594ca6f072c350 to
silence the -Wnontrivial-memaccess warning that is triggered any time
this function is instantiated by user code. This fixes another
buildworld failure with Clang HEAD.

Original commit message:
[clang] Warn about memset/memcpy to NonTriviallyCopyable types (#111434)
This implements a warning that's similar to what GCC does in that
context: both memcpy and memset require their first and second operand
to be trivially copyable, let's warn if that's not the case.

Reviewed by:    emaste, dim
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D52534

(cherry picked from commit 34a006eaa39ceb6b0a96fa386c9b9b8a44681979)
(cherry picked from commit ca149d75e9bd6455abc3c74e7db160464cfabbdb)
DeltaFile
+2-1contrib/llvm-project/libcxx/include/__memory/uninitialized_algorithms.h
+2-11 files

FreeBSD/src 018c097contrib/llvm-project/libcxx/include/__functional binary_function.h unary_function.h, contrib/llvm-project/libcxx/include/__memory allocator_traits.h

libc++: Fix deprecation warnings with latest clang

Latest clang has become more strict in diagnosing deprecated decls, so
pull in LLVM commit 9feac2cbd0d80927ce9a8b4c3e810d2b81802d55.

Original commit message:
[libc++] Improve deprecated diagnostic guards.

Recent Clang-21 builds improved the deprecated diagnotics. This
uncovered missing guards in libc++ internally.

Reviewed by:    dim
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D52531

(cherry picked from commit 086ce467adec42d58414fdb4d54c2b6819cf0c07)
(cherry picked from commit 703c98dc6eeb2b36ec94e138269a221704e55f4c)
DeltaFile
+2-3contrib/llvm-project/libcxx/include/__functional/binary_function.h
+2-3contrib/llvm-project/libcxx/include/__functional/unary_function.h
+2-0contrib/llvm-project/libcxx/include/__memory/allocator_traits.h
+2-0contrib/llvm-project/libcxx/include/__functional/weak_result_type.h
+8-64 files

FreeBSD/src 21f206bcontrib/llvm-project/libcxx/include tuple

libc++: avoid use of deprecated __reference_binds_to_temporary

This was removed in upstream libc++ in commit
437ad06f762ab07d89badecdd20627db200b98d3, but as this does not apply
cleanly to the current repository, I am applying the equivalent change
in a minimally invasive way. This is needed to build with latest clang
HEAD as of today.

Reviewed by:    dim
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D52530

(cherry picked from commit dee76cf2f3dace6290ccab07c2db17355994e70f)
(cherry picked from commit e487653fe43434768b533b1d7f360ec448c05b4c)
DeltaFile
+3-1contrib/llvm-project/libcxx/include/tuple
+3-11 files

FreeBSD/src 4fc0ae5share/mk bsd.debug.mk

share/mk: Remove trailing '/' from debug info directories

Signed-off-by: Marian Cingel <cingel.marian at gmail.com>
Reviewed by:    emaste
Pull request:   https://github.com/freebsd/freebsd-src/pull/1947
(cherry picked from commit 7359df79d3affeccf17f12f16c23ba3d4c5e0346)
(cherry picked from commit 3e8f7f7c6c015f044f9e65ea8a1f307d449d41b3)
DeltaFile
+1-1share/mk/bsd.debug.mk
+1-11 files

FreeBSD/src e9e97edcontrib/llvm-project/libcxx/include/__type_traits is_trivially_relocatable.h

libc++: avoid use of deprecated builtin

This pulls in LLVM commit accfbd4cb327411ad66c0109ba1841482b871967 to
avoid the use of __libcpp_is_trivially_relocatable.
This fixes building FreeBSD libc++ with clang HEAD as of today.

Original commit message:
[libc++] Replace __is_trivially_relocatable by is_trivially_copyable (#124970)

The __is_trivially_relocatable builtin has semantics that do not
correspond to any current or future notion of trivial relocation.
Furthermore, it currently leads to incorrect optimizations for some
types on supported compilers:
- Clang on Windows where types with non-trivial destructors get
  incorrectly optimized
- AppleClang where types with non-trivial move constructors get
  incorrectly optimized

Until there is an agreed upon and bugfree implementation of what it

    [10 lines not shown]
DeltaFile
+5-3contrib/llvm-project/libcxx/include/__type_traits/is_trivially_relocatable.h
+5-31 files

FreeBSD/src 90b9a77usr.sbin/bhyve net_backend_slirp.c bhyve.8, usr.sbin/bhyve/slirp slirp-helper.c

bhyve: support MTU configuration for SLIRP net backend

Support configuring MTU for the SLIRP net backend, for example:

  -s 1:0,virtio-net,slirp,mtu=2048,open

Update the manual page accordingly.  While here, also document
MAC address configuration.

Reviewed by:    markj
Approved by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D54133
DeltaFile
+30-5usr.sbin/bhyve/net_backend_slirp.c
+14-8usr.sbin/bhyve/slirp/slirp-helper.c
+3-1usr.sbin/bhyve/bhyve.8
+47-143 files

FreeBSD/src a6d57f3sys/fs/nfsserver nfs_nfsdsubs.c nfs_nfsdport.c

nfsd: Fix handling of hidden/system during Open/Create

When an NFSv4.n client specifies settings for the archive,
hidden and/or system attributes during a Open/Create, the
Open/Create fails for ZFS.  This is caused by ZFS doing
a secpolicy_xvattr() call, which fails for non-root.
If this check is bypassed, ZFS panics.

This patch resolves the problem by disabling va_flags
for the VOP_CREATE() call in the NFSv4.n server and
then setting the flags with a subsequent VOP_SETATTR().

This problem only affects FreeBSD-15 and main, since the
archive, system and hidden attributes are not enabled
for FreeBSD-14.

I think a similar problem exists for the NFSv4.n
Open/Create/Exclusive_41, but that will be resolved
in a future commit.

    [9 lines not shown]
DeltaFile
+38-0sys/fs/nfsserver/nfs_nfsdsubs.c
+11-0sys/fs/nfsserver/nfs_nfsdport.c
+49-02 files

FreeBSD/src bf98d67usr.sbin/sesutil sesutil.c

sesutil: Remove width modifier on encoded "Desc" field

Remove the width modifier to remove white space padding
added to "description" field when running
`sesutil --libxo:JP show`.

Reviewed by:    asomers
Approved by:    asomers (mentor)
MFC after:      1w
Sponsored by:   ConnectWise
Differential Revision:  https://reviews.freebsd.org/D54536
DeltaFile
+1-1usr.sbin/sesutil/sesutil.c
+1-11 files

FreeBSD/src cbc6f7eusr.sbin/bhyve rfb.c pci_fbuf.c

bhyve: add UNIX domain socket support to rfb

This commit adds support for a UNIX domain socket to bhyve's remote
framebuffer. It enables the use of the graphical console when the bhyve instance
is running in a jail with no networking, for instance. A VNC client running on
the host can then connect to the UNIX domain socket through the filesystem.

Signed-off-by:  Quentin Thébault <quentin.thebault at defenso.fr>
Sponsored by:   Defenso
Reviewed by:    kevans, markj
MFC after:      2 weeks
Differential Revision: https://reviews.freebsd.org/D53814
DeltaFile
+35-12usr.sbin/bhyve/rfb.c
+21-1usr.sbin/bhyve/pci_fbuf.c
+8-4usr.sbin/bhyve/bhyve.8
+6-1usr.sbin/bhyve/bhyve_config.5
+3-1usr.sbin/bhyve/rfb.h
+73-195 files

FreeBSD/src 16f8ea6sys/amd64/conf GENERIC MINIMAL

amd64: Remove tpm(4) from GENERIC for now

It breaks suspend/resume and no one has had time to investigate and fix
it.

PR:             291067
Reviewed by:    emaste
Fixes:          3deb21f1afd5 ("random: TPM_HARVEST should have been named RANDOM_ENABLE_TPM")
Differential Revision:  https://reviews.freebsd.org/D54587
DeltaFile
+2-1sys/amd64/conf/GENERIC
+2-1sys/amd64/conf/MINIMAL
+4-22 files

FreeBSD/src d2f1c8e. Makefile.inc1 Makefile

Makefile: Update doxygen requirements

MFC after:      3 days
Reviewed by:    imp, ziaee
Signed-off-by:  Minsoo Choo <minsoochoo0122 at proton.me>
Closes:         https://github.com/freebsd/freebsd-src/pull/1869
DeltaFile
+8-0Makefile.inc1
+2-2Makefile
+10-22 files

FreeBSD/src b72cb30sys/dev/bnxt/bnxt_en if_bnxt.c

bnxt: fix i2c read to allow access to different addresses

Allow reading of i2c addresses other than A0. A0 does provide most
information, but doesn't provide things like module temps, and optical
signal levels.

Sponsored by: Netflix
Reviewed by: sumit.saxena_broadcom.com
Differential Revision: https://reviews.freebsd.org/D54590
MFC after: 3 days
DeltaFile
+1-1sys/dev/bnxt/bnxt_en/if_bnxt.c
+1-11 files

FreeBSD/src 0df9054sys/netpfil/pf pf_nl.c

pf: handle nlattr_add_nested() failure

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+45-0sys/netpfil/pf/pf_nl.c
+45-01 files

FreeBSD/src bf19253sys/netpfil/pf pf_nl.c

pf: remove redundant zeroing

nlmsg_reserve_object() already zeroes the header before it gives it to
us, so there's no need to explicitly zero these fields again.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+0-54sys/netpfil/pf/pf_nl.c
+0-541 files

FreeBSD/src c0df8f6sys/dev/acpica/Osd OsdSchedule.c

acpi: Make taskqueue only run on BSP

This is needed because when we add the suspend-to-idle loop, we only
want to break the BSP out of idle to process the taskqueue while keeping
all the others idled.

Currently assuming BSP to be CPU0, which may not always be the case on
non-x86.

Reviewed by:    kib
Approved by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54406
DeltaFile
+5-1sys/dev/acpica/Osd/OsdSchedule.c
+5-11 files

FreeBSD/src cae2809libexec/nuageinit nuageinit

nuageinit: set the hostname when user-data is missing

This address the situation reported here
https://github.com/freebsd/freebsd-src/pull/1952#issuecomment-3720210259

The user-data file was missing and the `sethostname` function is never
called. This commit adjusts slightly the logic to avoid the `exit()` call
when the `user-data` file is missing.

MFC After:      1 week
Signed-off-by: Gonéri Le Bouder <goneri at lebouder.net>
Differential Revision:  https://github.com/freebsd/freebsd-src/pull/1953
DeltaFile
+67-46libexec/nuageinit/nuageinit
+67-461 files

FreeBSD/src 65e77d3libexec/nuageinit/tests nuageinit.sh

nuageinit: fix test after recent behaviour change

with recent change nuageinit always create a "freebsd" user, if no
users are specified, which means we do need to get the rootdir in the
testsuite containing a group file otherwise pw complains and the tests
fails.
DeltaFile
+4-0libexec/nuageinit/tests/nuageinit.sh
+4-01 files

FreeBSD/src 9ae4335release/tools gce.conf

GCE: ARM64 Support: Add hw.pci.honor_msi_blacklist=0.

This is required for MSI support on GCE ARM64 instances which is
prerequisite to gve(4) not panicking at boot, and nvme(4) also has
a real sad time without interrupts. Tested on a variety of c4a VMs.

This is meant to be a temporary hack; long term fix would be to
check for the hypervisor and quirk gve(4) device with
PCI_QUIRK_ENABLE_MSI_VM.

PR:             kern/292081
MFC after:      1 week
DeltaFile
+3-0release/tools/gce.conf
+3-01 files

FreeBSD/src 709c104release/tools gce.conf

GCE: Fix growfs path

The sed command was missing the ${DESTDIR} prefix, meaning it was
attempting to modify the build host's /etc/rc.d/growfs instead of
the target image's script. Tested in an arm64 builder that builds
as non-root.

PR:             kern/292081
MFC after:      1 day
DeltaFile
+1-1release/tools/gce.conf
+1-11 files

FreeBSD/src f604d84release/tools gce.conf

GCE: Enable vtnet(4) Multiqueue.

Removes hw.vtnet.mq_disable=1.

This workaround was originally introduced nearly a decade ago to
address stability issues on KVM that have long since been resolved
in both the FreeBSD driver and the GCE hypervisor. Removing this
allows network interrupts to scale across multiple vCPUs.

Tested on n2-highcpu-16 VM with 15.0-RELEASE and confirmed multiple
queue pairs active and interrupts handling across cores.

PR:             kern/292081
MFC after:      1 day
DeltaFile
+0-1release/tools/gce.conf
+0-11 files

FreeBSD/src eb1b6ecsys/contrib/openzfs/module/icp/asm-x86_64/modes aesni-gcm-avx2-vaes.S aesni-gcm-x86_64.S

zfs: emit .note.GNU-stack section for all ELF targets

On FreeBSD, linking the zfs kernel module with binutils ld 2.44 shows
the following warning:

    ld: warning: aesni-gcm-avx2-vaes.o: missing .note.GNU-stack section implies executable stack
    ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker

Some of the `.S` files under `module/icp/asm-x86_64/modes` check whether
to emit the `.note.GNU-stack` section using:

    #if defined(__linux__) && defined(__ELF__)

We could add `&& defined(__FreeBSD__)` to the test, but since all other
`.S` files in the OpenZFS tree use:

    #ifdef __ELF__

it would seem more logical to use that instead. Any recent ELF platform

    [5 lines not shown]
DeltaFile
+1-1sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S
+1-1sys/contrib/openzfs/module/icp/asm-x86_64/modes/aesni-gcm-x86_64.S
+1-1sys/contrib/openzfs/module/icp/asm-x86_64/modes/ghash-x86_64.S
+3-33 files

FreeBSD/src cd1aa5ftools/cam cam_all_but_scsi.d README

tools/cam: Start to add the testing tools for CAM

Create a directory for testing tools arond CAM. These are snippets of
what will eventually be camio. At the moment, it was written using fbt
traces. This is OK, but fragile, so they need to be re-written with the
cam provider. cam_all_but_scsi.d is the first step. It shows how to do
this with the new cam dtrace provider.

Sponsored by:           Netflix
Reviewed by:            adrian
Differential Revision:  https://reviews.freebsd.org/D54472
DeltaFile
+89-0tools/cam/cam_all_but_scsi.d
+9-0tools/cam/README
+98-02 files

FreeBSD/src efb7795cddl/lib/libdtrace cam.d Makefile

dtrace: Add definitiosn for the cam dtrace provider

Sponsored by:           Netflix
Reviewed by:            adrian
Differential Revision:  https://reviews.freebsd.org/D54471
DeltaFile
+194-0cddl/lib/libdtrace/cam.d
+2-1cddl/lib/libdtrace/Makefile
+196-12 files

FreeBSD/src aaec2a9sys/cam/scsi scsi_all.c

cam: When inq data isn't valid, pass NULL

When the device isn't there, we don't have valid inq data. Pass NULL in
this case. All the routines that receive this test against NULL already.

Sponsored by:           Netflix
Reviewed by:            adrian
Differential Revision:  https://reviews.freebsd.org/D54470
DeltaFile
+8-10sys/cam/scsi/scsi_all.c
+8-101 files

FreeBSD/src 1a7151fshare/man/man4 dtrace_cam.4 Makefile, sys/cam cam_xpt.c

cam: Add probes for xpt actions

cam::xpt:action(union ccb *)
cam::xpt:done((union ccb *)
cam::xpt:async-cb(void *cbarg, uint32_t async_code, struct cam_path
        *path, void *async_arg);

Called when xpt_action(), xpt_done*() and the xpt async callbacks are
called.

Sponsored by:           Netflix
Reviewed by:            adrian
Differential Revision:  https://reviews.freebsd.org/D54469
DeltaFile
+42-0share/man/man4/dtrace_cam.4
+21-1sys/cam/cam_xpt.c
+1-0share/man/man4/Makefile
+64-13 files

FreeBSD/src ecb1f46sys/cam cam.h cam.c

cam: Start adding dtrace provider 'cam'

Start to provide robust tracing in cam now that clang has broken my
fbt-based dtrace scripts a couple of times.

Sponsored by:           Netflix
Reviewed by:            adrian
Differential Revision:  https://reviews.freebsd.org/D54468
DeltaFile
+14-0sys/cam/cam.h
+5-0sys/cam/cam.c
+19-02 files