From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mx.groups.io with SMTP id smtpd.web10.22547.1683736285024303806 for ; Wed, 10 May 2023 09:31:25 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gmail.com header.s=20221208 header.b=dySuPynk; spf=pass (domain: gmail.com, ip: 209.85.216.52, mailfrom: pedro.falcato@gmail.com) Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-24dfc3c662eso5141726a91.3 for ; Wed, 10 May 2023 09:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683736284; x=1686328284; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+tsIZgBJsdWp9Yrwzg6cyeeY/Q29qh+bAuwaMhnFcjQ=; b=dySuPynku02/VM+fbs6aDldrFcFLRE+JETVPedcy7AWvV6mMo4G1fKfkdHaO86r6nv h7+9Rc7Y5d+DTGF561MP1YlX4svMMPdWwEUxt27fh4G8hodHBvwmqr3zt2DcdUcdwqZP 0Cay9ATxwIDOStuoT8MeN2yDWQ3ffvBEoJf8LAVh6chmvehK8qoAVzq8vsmz5XMCWpzX KcB84wIx+jo2MDiNAoBorGMFNCkqIuQLjylT7MYHUOATT56UjwxCzUWOa7JyVsdhdIur Vletc80lE55ziI0ny4qvGMhunVnhiJsn609I1Z/XBsUB0sXteaYF440MvHQF8WbLqjdG C76g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683736284; x=1686328284; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+tsIZgBJsdWp9Yrwzg6cyeeY/Q29qh+bAuwaMhnFcjQ=; b=faV3cru3RIe+SdgTonOVPyxs7AMuASnrzm4jyVlBMH3PkIDtznO1skiLXp6xV52zru IfsGVK7vRGnvgSTBq6nS35HUzbuZA5ylPXc2Si1AVHe3I4HnGGixvUmf/N2Fm+R2+Kjs D04Fp85w111piC8AR8bOMRrUf022Bbmfr0VmPzPLIbUH6TdL1WpSkiCpjGLNM5dBe5Fa UHw3MIlxWWjVaWKT1LtaKM7Gyx8f0PZcFPNItsGWNjVCVTgAH9vWYtkAcR+2uIvHH0t0 62jkhj2uIuKPH/Qxyh+7vffqJszb6YuW3vkatXm0YzG5/fE1BS4gIAkabFvM9ZKTcz7e ozDg== X-Gm-Message-State: AC+VfDzz9oNE+TqjuVuofb61DkTNQQf7/ID7q8z7yPlddtPtzqQx85iu 53W9zAaEVFOtIoOo9geoM+RhicwzR8IQh6Vo0jU= X-Google-Smtp-Source: ACHHUZ79X8bSiXHDdMFBkcGCRuPiR8piENT/TKjHBXySP77eocgN0FcUU4ka97/8b3rZauclZPS9mlt+yTiD9OFXd9M= X-Received: by 2002:a17:90a:6e44:b0:24d:ee34:57b6 with SMTP id s4-20020a17090a6e4400b0024dee3457b6mr17823280pjm.41.1683736284427; Wed, 10 May 2023 09:31:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Pedro Falcato" Date: Wed, 10 May 2023 17:31:13 +0100 Message-ID: Subject: Re: [edk2-devel] Side effects of enabling PML5 in EFI To: Gerd Hoffmann Cc: devel@edk2.groups.io, Andrew Fish , "Kinney, Michael D" , Ray Ni , Ard Biesheuvel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 10, 2023 at 10:18=E2=80=AFAM Gerd Hoffmann = 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). --=20 Pedro