From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 232E3AC142B for ; Wed, 14 Feb 2024 11:07:29 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=tANSIWHiQhBa5Rh+MOWD1SgZrhN+7kDZLX8uQjDcsXI=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20140610; t=1707908848; v=1; b=hJASqlc5A7nQN+e4U+jqMVQGHLAjJqbxz+0BNycGc3jBBQwsNsHnJvrhuTD57YQGanYm2IxF IU1iQ+Gj39IonjMGK4KqNKVpzIH96jNdplQoLLPgm/Rw+IfvNo7FfcVYeIqsby1+oRdaMhaZlhT wIq/WxXN6WQ6Uzi+A9pWxIpM= X-Received: by 127.0.0.2 with SMTP id RZPLYY7687511xef8YIhGDPr; Wed, 14 Feb 2024 03:07:28 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.39336.1707908847950771455 for ; Wed, 14 Feb 2024 03:07:28 -0800 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-67-4FY6x9TsMhefwB8uLEQLEA-1; Wed, 14 Feb 2024 06:07:22 -0500 X-MC-Unique: 4FY6x9TsMhefwB8uLEQLEA-1 X-Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 76DE12812FE4; Wed, 14 Feb 2024 11:07:22 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.193.192]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3F28B1BDD1; Wed, 14 Feb 2024 11:07:22 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 084DE1800DC8; Wed, 14 Feb 2024 12:07:21 +0100 (CET) Date: Wed, 14 Feb 2024 12:07:20 +0100 From: "Gerd Hoffmann" To: Laszlo Ersek Cc: devel@edk2.groups.io, Jiewen Yao , Oliver Steffen , Ard Biesheuvel Subject: Re: [edk2-devel] [PATCH v2 3/4] OvmfPkg/PlatformPei: rewrite page table calculation Message-ID: References: <20240202104720.1275308-1-kraxel@redhat.com> <20240202104720.1275308-4-kraxel@redhat.com> <6a5ece37-2164-e207-7779-6a1258c7445e@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 1s2RtNivAmFWkoAy5cfYquKOx7686176AA= Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=hJASqlc5; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Wed, Feb 14, 2024 at 11:48:57AM +0100, Laszlo Ersek wrote: > On 2/14/24 10:32, Gerd Hoffmann wrote: > > Hi, > > > >> (3) I'm slightly disturbed by the fact that here we don't shift the > >> original MaxAddr by 48 bits, but Level3Pages by 9 bits. Namely, if > >> Level3Pages was set to 1 by the MAX (i.e., because the >> 39 resulted > >> in zero), then the input of *this* bit shift is nonsensical. It's a > >> happenstance that 1 >> 9 is zero too, for Level4Pages, and we're just > >> exploiting that practical result here. > > > > I had it that way initially. Got failures for 32-bit builds in CI, > > because the compiler used 64-bit math intrinsics somewhere. > > Right, I had certainly expected that in advance. You must have missed my > earlier update on that, still in the v1 thread. My original proposal > there was indeed problematic in that sense, but a few minutes later I > posted an update, replacing the bit-shifts inside the MAX() macro > invocations with RShiftU64() calls: Happened even with the RShiftU64() calls, must have been something else. take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115443): https://edk2.groups.io/g/devel/message/115443 Mute This Topic: https://groups.io/mt/104117101/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-