From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mx.groups.io with SMTP id smtpd.web11.22468.1683736743262271601 for ; Wed, 10 May 2023 09:39:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20221208 header.b=fySsybNK; spf=pass (domain: gmail.com, ip: 209.85.215.172, mailfrom: pedro.falcato@gmail.com) Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-517ab9a4a13so6730780a12.1 for ; Wed, 10 May 2023 09:39:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683736743; x=1686328743; 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=TscOXPmdEOyewNa+NoaSBY4MAtL0fKcvP6qUtbBzhbc=; b=fySsybNKwGhJyfsupx0LEeY7Pbr022okMOLRqKAyXnzXeNNgiNfrOH6DWkqCvl0yty EoCKeUndYkLo1DsX+0Aw6MWBirI6Azi407Mf0NwNjG8+wKwr/WTpDRGQalz5JmjyCf07 YJtSrsU5GFbfl+k+55mp1d9k+dt//V6DON7LjrY2oID7KKBRSs84wVPewEdg4S0OF0kL y6oPtG3iiRMMI/ns4wmiq3lYXzzvxpci7mfi5ZyO4X69nH3jFb56Y1nWcnHcpea44W6Z Kwfsrpz2sTcE35jIIF1KEEpTwQmYcUJbpkykh6NLAIG7tvkJYZvVsxHttTYzKfpTIpoT ZGvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683736743; x=1686328743; 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=TscOXPmdEOyewNa+NoaSBY4MAtL0fKcvP6qUtbBzhbc=; b=NcO+JId8mJpdNbs3+p02Dq6QBztD2bkFJa7rKBWSFUYaXRIwWkg9O0I7ht+/wGqceM 5V5O8N/oNmjLlbSZbMYrvvMHgiozjyb2azhgh2qTIurHWF2pvmyLur1kBRk0As9U5QYg VT+rRN8tc1xnbswGR7aa6k0YxtcjxOx6Dl7taM5x8vlSvjdJeda3mfwqgSzkhK/x+jZd aZb+gaLLPPOkyerCPOdVgAkTPgqROvXEcZtEiTAJV8yeIYXKUj1HoR/9UA29gbuOEkWo RSaPoDyrx3CTDIDc61tUUI5Vsv83YbvxhMgGwSX6fo+T2vgHCphFUsLw5Ka0fE8mwPfs FgSw== X-Gm-Message-State: AC+VfDzMFXrD9jvkNlwmi3CrFn3lW9LHIOdT5G0qLHF4EXdl3CGRGc6d pk28j/feIgDQevJXLiw+SShQtX0LmT6NLGstqgU= X-Google-Smtp-Source: ACHHUZ5u4TADpClSBgb3wN5vSWKkilxtfPCgontvDRXvWYwAtGCJ2DAmboMhn6YocWS3Fg/vGpTAfxBVjX2j1CzRa4Y= X-Received: by 2002:a17:90a:2b4a:b0:24e:49d4:bc42 with SMTP id y10-20020a17090a2b4a00b0024e49d4bc42mr17950177pjc.1.1683736742652; Wed, 10 May 2023 09:39:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Pedro Falcato" Date: Wed, 10 May 2023 17:38:51 +0100 Message-ID: Subject: Re: [edk2-devel] Side effects of enabling PML5 in EFI To: "Ni, Ray" Cc: Gerd Hoffmann , "devel@edk2.groups.io" , Andrew Fish , "Kinney, Michael D" , Ard Biesheuvel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 10, 2023 at 10:34=E2=80=AFAM Ni, Ray wrote: > > Firmware chooses to use 5-level paging when the platform using this firmw= are claims to boot 5-level paging OS only. > > Usually, firmware uses 4-level paging to keep maximum OS compability. Hi Ray, So, what happens if I don't enable LA57, have a gazillion TB of memory (such that I go over the 128TB 47-bit AS limit). Will EFI never try to access memory up there and page fault? What happens to the OS/bootloader? If it asks for memory up there (for KASLR, etc)? Does the memory map pre-reserve those upper regions of memory that are not accessible using 4-level paging? I really fail to see the advantages of PML5 support in EFI fw at the moment, particularly as you can simply choose to start all your allocations lower down the memory map (where you can indeed access things), reserve the upper, inaccessible bits, and things Should Work? Unless you're keeping some MMIO ranges up there, in which case, the solution is probably hard. --=20 Pedro