Re: [PATCH] mefi: add dynamic control interface for EFI runtime services
Sebastian Andrzej Siewior <[email protected]>
| Newsgroups | org.kernel.vger.linux-efi,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 2026-07-23 08:37:23 [+0200], Ard Biesheuvel wrote:
> (cc Sebastian)
Thanks.
> On Sat, 4 Jul 2026, at 02:33, Junxiao Chang wrote:
> > b/Documentation/admin-guide/kernel-parameters.txt
> > index b5493a7f8f228..533213101f808 100644
> > --- a/Documentation/admin-guide/kernel-parameters.txt
> > +++ b/Documentation/admin-guide/kernel-parameters.txt
> > @@ -1595,7 +1595,8 @@ Kernel parameters
> > efi= [EFI,EARLY]
> > Format: { "debug", "disable_early_pci_dma",
> > "nochunk", "noruntime", "nosoftreserve",
> > - "novamap", "no_disable_early_pci_dma" }
> > + "novamap", "no_disable_early_pci_dma",
> > + "dynamic" }
> > debug: enable misc debug output.
> > disable_early_pci_dma: disable the busmaster bit on all
> > PCI bridges while in the EFI boot stub.
> > @@ -1612,6 +1613,8 @@ Kernel parameters
> > novamap: do not call SetVirtualAddressMap().
> > no_disable_early_pci_dma: Leave the busmaster bit set
> > on all PCI bridges while in the EFI boot stub
> > + dynamic: enable EFI runtime services, which can be
> > + disabled via /sys/firmware/efi/dynamic_enable.
> >
> > efi_no_storage_paranoia [EFI,X86,EARLY]
> > Using this parameter you can use more than 50% of
>
> I'd prefer not to add a command line option for this. If the sysfs control
> is useful, we can enable it unconditionally, or depend on PREEMPT_RT.
If we do this enable/ disable at runtime, could we name if
"runtime_enable" or "enabled" instead "dynamic_enable"?
We could also have the =noruntime option as an initial off switch which
could be overwritten at runtime to enable it temporary.
This probably benefits only efivars since everything else (like efi-rtc)
remains non-functional or broken (if enabled/ disabled at runtime).
We have this thing where the efi-runtime workqueue can be limited to a
certain CPU in case it helps. But then I learned then certain EFI
versions do block all other CPUs while the one CPU is performing a EFI
invocation…
Sebastian