arm64: Add arm64 SVE tests
Add the tests/sys/arch directory for architecture-specific tests and
use it to add arm64 SVE tests. These test the kernel is managing the
SVE state in a way we expect.
These tests require SVE hardware support to run so will skip when they
can't detect it.
Reviewed by: markj
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D43311
[VPlan] Strip VPDT-assert forbidding replicate regions (#189342)
VPDominatorTree::properlyDominates currently unnecessarily forbids
replicate regions, as there is no such limitation either in the parent
DominatorTree, or in VPlanCFG. Strip the assert entirely.
[mlir][OpenMP] Don't allow loop bounds/step from inside the task (#190827)
The omp.taskloop.context region represents what goes inside the outlined
task function. The loop bounds must be passed to the OpenMP runtime call
for taskloop and so this cannot be supported in general.
In a follow up patch I will re-allow pure operations because sinking
constants inside of the tasklooop context will be useful for something
else I am prototyping.
Assisted-by: codex
java/openjdk*: Fix possible race after configure
Some setups could fail when building with poudriere bulk with a message
about the configuration was out of date. Since configure is run as part
of the build in any case, we don't need the explicit configure check in
the openjdk build system, so we disable it.
Fix originally proposed by jonc at chen.org.nz.
Since this doen not change the port, only whether it will build or not,
I have not bumped the PORTREVISION for this change.
PR: 294199
Reported by: nxjoseph
Reviewed by: glewis
Approved by: glewis
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56289
Fix https://sourceware.org/bugzilla/show_bug.cgi?id=34033
- Deprecate loc_ntoa because it does not specify the size of the destination
buffer and replace it with loc_ntoa1
- Replace sprintf(3) with snprintf(3), checking for string overflow.
This removes all sprintf(3) uses in libc, except in compat/net/compat_ns_ntoa.c
Thanks to phone@ for reviewing and Florian Weimer for notifying us.
mail/ruby-mime-types-data: update to 3.2026.0407
3.2026.0407 (2026-04-07)
* Updated registry entries from the IANA media registry and provisional
media registry and the Apache Tika media registry as of the release date.
vm_fault: Reset m_needs_zeroing properly
- When allocating a page, we should only consider the PG_ZERO flag when
handling the top-level page.
- Unconditionally reset the flag when restarting the fault handler.
Previously, vm_fault_busy_sleep() would fail to reset it.
PR: 294039
Reviewed by: kib
Tested by: Peter Much <pmc at citylink.dinoex.sub.org>
MFC after: 3 days
Fixes: cff67bc43df1 ("vm_fault: only rely on PG_ZERO when the page was newly allocated")
Differential Revision: https://reviews.freebsd.org/D56234
imgact_elf: Unconditionally initialize a variable in a note handler
In the sb == NULL case, we are computing the size of the note using a
dummy sbuf drain handler which counts bytes and discards the contents of
the buffer, so the fact that "structsize" is uninitialized doesn't
matter. But, the compiler may complain about this, so we might as well
just initialize it unconditionally to silence the warning, as other
handlers already do.
PR: 292811
MFC after: 1 week
ip6_mroute: VNETify counters
Commit a223d6c489c7 made most of the ip6_mroute state per-VNET, but
failed to do this for a couple of counter structures. Make them
per-VNET too.
Reported by: zlei
Reviewed by: pouria, zlei
Fixes: a223d6c489c7 ("ip6_mroute: Start putting global variables into a structure")
Differential Revision: https://reviews.freebsd.org/D56253
arm64: Have a common call to userret
Rather than each exception calling userret use a common copy. As
syscallret already calls userret we need to skip it in that case.
Reviewed by: kib
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D55250
(cherry picked from commit 14e97448fcebbe4b038eaf5628933abe5f9e690d)
arm64: Optimise the repeated TLBI workaround
It has been reported that the overhead of repeating all TLBI
instructions is too large [1]. The Software Developer Errata Notices
(SDEN) for the relevant Arm CPUs have been updated so a single
"tlbi vale1is, xzr" followed by "dsb ish" is sufficient to work around
the issues.
Replace the places we repeat TLBI instructions with the new sequence.
[1] https://lore.kernel.org/linux-arm-kernel/20260218164348.2022831-1-mark.rutland@arm.com/
Reviewed by: kib
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D55646
(cherry picked from commit 80b4129bef8b908eb19fe47853cb6e45e4513d76)
arm64/vmm: Support PMU v3p9
The only new register is read-only. As the kernel just passes the
registers to the guest directly no further change should be needed.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D51764
(cherry picked from commit d1650d226205cdf07fb19e0c9b10b47b941e8747)
arm64: Treat the PMUVer field of ID_AA64DFR0 as unsigned
The PMUVer field of ID_AA64DFR0 contains an unsigned version of the
Performance Monitors Extension, but it is currently treated as signed.
Change it to unsigned.
Reviewed by: andrew
Sponsored by: Arm Ltd
Signed-off-by: Kajetan Puchalski <kajetan.puchalski at arm.com>
Pull Request: https://github.com/freebsd/freebsd-src/pull/2062
(cherry picked from commit e40e5458616d13b44cd407aa1afff620f8ff8766)