[LV] Always try to use fixed VF for low TC loops if no epilogue allowed. (#226318)
Remove the MaxPowerOf2RuntimeVF gate for falling back to using fixed
width VFs when no epilogue is allowed and the trip count is below the
minimum for tail folding.
MaxPowerOf2RuntimeVF being not set means we cannot compute the maximum
runtime VF, due to missing max vscale. In that case we are not able to
determine if a epilogue loop remains for scalable VFs, but we can still
pick a fixed VF, if no epilogue remains for it.
Also updates processLoop to ignore CM_EpilogueNotNeededFoldTail, if the
trip count is below the tail-folding threshold.
PR: https://github.com/llvm/llvm-project/pull/226318
uchcom: Set rate to 1 if 0
If userspace provides rate == 0, it causes kernel panic as rate is
directly used as a divident, which cannot be zero. Fix it by set the
rate to 1 if it is passed as 0.
Reviewed by: imp, emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59111
boot-test.sh: Add gptboot.efi tests
Make sure that we can chainboot with gptboot.efi. Many projects use this
as their migration tool from gptboot to ping-pong partitions to boot
from. This tests that functionality which I recently broke.
Assisted-by: Claude Code (Fable 5, Opus 5)
Sponsored by: Netflix
Restore booting the partition the EFI boot image was loaded from.
BSDRP images are built with "poudriere image -t firmware", which puts
gptboot.efi on the ESP instead of loader.efi. gptboot.efi reads the GPT
bootme attribute, picks the active system partition (BSDRP1 or BSDRP2),
chainloads /boot/loader.efi from it and hands loader.efi that partition
in LoadedImage->DeviceHandle (stand/efi/boot1/boot1.c:try_boot).
Since ce9bfd78167 ("loader.efi: Refactor try_boot_device_partitions"),
find_currdev() no longer tries that device: try_boot_device_partitions()
walks the parent disk while explicitly skipping dp->pd_handle, on the
assumption that the boot image always comes from an ESP holding no root
filesystem. When chainloaded, the partition gptboot.efi selected is
therefore the one partition never considered, and loader.efi falls
through to the first other UFS partition on the disk - the previous
system. Every A/B upgrade silently boots the old slice.
Commit 1c85c5eea09, which introduced try_boot_device_partitions(), did
try dp itself before its siblings; the refactor dropped it. Restore it,
[5 lines not shown]
boot-test.sh: Add netboot-http-efi test
Using iPXE, chainboot loader.efi with rootdev=http://${next-server}/
to test the loader's http:// code.
Sponsored by: Netflix
boot-test.sh: Add virtio-rng-pci to the EFI RAM-disk netboot qemu invocation
Since the PixieFail security fixes (CVE-2023-45237), EDK II's DxeNetLib --
underneath essentially all of NetworkPkg (Mnp/Arp/Ip4/Dhcp4/Tcp/Http) --
carries a DEPEX on EFI_RNG_PROTOCOL. With no RNG protocol producer
available, that DEPEX is never satisfied and the entire NetworkPkg driver
stack silently fails to load: no error, no assert, it just isn't there.
netboot-efi and netboot-ramdisk never noticed because they only ever touch
the raw EFI_SIMPLE_NETWORK_PROTOCOL via our own net.c, which has no such
dependency. A test that needs EDK II's own NetworkPkg (e.g. one exercising
EFI_HTTP_PROTOCOL) is the first to be affected.
RngDxe can satisfy the DEPEX from the RDRAND instruction alone on a
sufficiently recent edk2 build, but not every installed OVMF is that
recent. -device virtio-rng-pci provides an RNG unconditionally via
VirtioRngDxe, regardless of edk2 vintage or host CPU features.
Unfortunately, the edk2 shipped with qemu lacks the network this needs.
[2 lines not shown]
boot-test.sh: Add a http server per interface
Add the built-in python http server, bound to each of the interaces we
create to expand network testing to include http:// in various
scenarios.
Sponsored by: Netflix
linux: Exposes renderD nodes and chardev in sysfs
To allow normal users to render through the render device, we expose the
renderD node. This enables Wayland applications to use hardware
acceleration when running under the Linux emulator.
Additionally, libdrm and Mesa need to look up
/sys/dev/char/<major>:<minor> and <pcidev>/drm to identify the
corresponding renderer device (e.g., a renderD device). We expose this
path as well so that libdrm can locate the renderer.
Differential Revision: https://reviews.freebsd.org/D59190
Fix for a clang-repl crash when passing non-existent file to --Xcc (#225861)
Problem: When clang-repl fails to initialize because an --Xcc file does
not exist, Interpreter::create() destroys the partially initialized
Interpreter. Its destructor unconditionally calls FinalizeAction(),
which invokes FrontendAction::EndSourceFile() without a registered
CompilerInstance and triggers an assertion.
Fix: Track whether interpreter initialization completed successfully and
only finalize the frontend action for successfully initialized
interpreters.
Test: Add a regression test covering a nonexistent --Xcc file.
This change resolves https://github.com/llvm/llvm-project/issues/225429
Assisted by gpt-5.6-luna
---------
Co-authored-by: Anutosh Bhat <andersonbhat491 at gmail.com>
Do not write multiple assignment of the same value to multiple cmmu registers
as nested assignment in a single statement.
This used to work in the gcc 2 days, but from gcc 3 onwards, because these
registers are declared volatile, this caused register reloads to propagate
the assignment value.
This had been noticed and fixed in arch/luna88k/luna88k/machdep.c 1.135, but
the similar constructs in this file were missed.
Noticed by tsutsuii at netbsd
Do not limit kernel-mode cmmu fault handling to segment and page faults,
there could be write protection faults as well.
The CMU Mach code did not have such a restriction, it had been added by
Nivas while doing the original mvme88k port.
The logic is now the same for kernel and userland.
Noticed by tsutsui at netbsd.
Revert "[clang][bytecode] Stop relying on `CheckEvaluationResult()` (… (#226637)
…#186045)"
This reverts commit 55b498466a7b2620d09fcdf1b2300f71a35f6d8b.
This breaks two msan builders and reproducing the failure locally takes
forever.
Revert "[clang][OpenMP] Only accept char strings in the message clause" (#226636)
Reverts llvm/llvm-project#226080
The newly added test error_message.c is failing on the PS4 bot
https://lab.llvm.org/buildbot/#/builders/144/builds/66294
[libc++][NFC] Avoid empty namespace in internal headers of `<ranges>` (#226034)
...in pre-C++20/23 modes. This follows up
0c94a978df783bd67535350eac84088fc482716a and fixes more complaints from
clang-tidy checks in CI.
pkg: minor fixes to the vec iterators
Clear the caller"s pointer when the list is empty, as the previous
implementation did, and declare the index before the statements.
Handle two causes of the panic "lfs_ifile: looping". Repurpose the lfs_iflock
to be locked with RW_WRITER while the segment lock is held, preventing
updates to the Ifile while its blocks are being gathered; and allow more
iterations than 10 before panicking, since we might need to rewrite the
entire segment table one block per iteration. Issue uncovered in the course
of PR kern/60746.
Rename pwenc_secret_matches unit test to a unique basename
## Problem
The new `pytest/unit/utils/test_pwenc.py` shares its basename with the existing `tests/unit/test_pwenc.py`. The unit test run collects both trees in one pytest session, so collection aborts with "import file mismatch".
## Solution
Renamed the new file to `test_pwenc_secret_matches.py`, which also matches what it actually tests.