Re: [PATCH v2 0/7] arm64: Make EFI calls preemptible
From: Ard Biesheuvel <ardb@kernel.org>
Date: 2025-09-15 09:05:26
Also in:
linux-efi, lkml
Hi, Thanks for taking a look. On Mon, 15 Sept 2025 at 10:52, Sebastian Andrzej Siewior [off-list ref] wrote:
On 2025-09-05 15:30:36 [+0200], Ard Biesheuvel wrote:quoted
From: Ard Biesheuvel <ardb@kernel.org>…quoted
Note that this is only a partial solution in terms of RT guarantees, given that the runtime services execute at the same privilege level as the kernel, and can therefore disable interrupts (and therefore preemption) directly. But it should prevent scheduling latency spikes for EFI calls that simply take a long time to run to completion.That sounds nice. There is no feature flag that could tell if a specific EFI-call (or any) will disable interrupts, right?
Sadly, no. At runtime, the EFI APIs that manage this at a higher level of abstraction are no longer available, and so the only available option for firmware to ensure that code runs uninterrupted is to mask interrupts at the CPU side. Everything else (timers, interrupt controllers) is owned by the OS at this point, so runtime firmware cannot touch it (even if it wanted to - it has no idea where memory mapped peripherals live in the OS's memory map that it runs under) It would be nice if we could sandbox this in a VM but that is not straight-forward.
But if the source code is available, you could check.
Even though much of the code is based on the public reference implementation, the tweaks that require playing with interrupt masking/unmasking are often part of the downstream, closed source forks.