[edk2-devel] Side effects of enabling PML5 in EFI

Pedro Falcato pedro.falcato at gmail.com
Wed May 10 16:31:13 UTC 2023


On Wed, May 10, 2023 at 10:18 AM Gerd Hoffmann <kraxel at redhat.com> wrote:
>
> On Tue, May 09, 2023 at 06:24:03PM +0100, Pedro Falcato wrote:
> > Hi all,
> >
> > (+CC people vaguely related to the EFI spec, the PML5 implementation
> > and kernel EFI boot code)
> >
> > As a result of the latest 5-level paging patches, I've been looking
> > into how tiano supports PML5.
> > This raised a question: Doesn't enabling PML5 in-firmware break
> > compatibility with non-PML5-aware bootloaders and kernels?
>
> kernels yes, bootloaders probably not (unless the bootloader not the
> kernel calls exitbootservices).

Bootloaders can theoretically enable "alternative translations" as
they call it in-spec. No need to EBS() to use your own page tables.
I have no idea how prevalent this is, but if someone told me GRUB does
this I would be 0% shocked.

> > So, how is any of this supposed to work?
>
> edk2 is relatively late to the party, so with everybody else supporting
> 5-level paging already it might not be much of an issue in practice even
> though there is no compatibility handling (I know of) in edk2.
>
> When running your operating system museum in virtual machines you have
> the option to just turn off 5-level paging support in the virtual cpu.

Ok, went looking. Linux supports this since ~2017. Darwin (from macOS)
does not support this.
FreeBSD supports LA57 from 2020 onwards. NetBSD does not support it.
Fuchsia does not support it.

And, more glaringly, Windows 11 does not support it (no source, went
testing with qemu -cpu +la57).

So, this is far from an operating system museum. I don't think this
can be safely enabled at all. And especially not,
when you're not running under a VM (presumably, this will get deployed
on real hardware).

-- 
Pedro


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#104589): https://edk2.groups.io/g/devel/message/104589
Mute This Topic: https://groups.io/mt/98788948/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list