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 2C35994137F for ; Wed, 14 Feb 2024 10:49:06 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=W2PsW5at0XnqE35uQerDqeGb/TozdL+o2b/PLALlIm8=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1707907744; v=1; b=OGA61I5vvCUMglsTuc4vuFwp1uVBey7y259U8T4UOKWuXFKIrwhZwfcPFPN+uECNxEZvVMY1 wknX7el1la65zzz6G0NcH2rLCQq88Yv4t313M+OB1gSvnKQue2e6pnMBcNIjeJsdgIf+rYJzUBL a+7cws0aVhuJAV0k0We1pM0U= X-Received: by 127.0.0.2 with SMTP id 5TWAYY7687511xTD6hyUcBTn; Wed, 14 Feb 2024 02:49:04 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.38680.1707907744132327727 for ; Wed, 14 Feb 2024 02:49:04 -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-596-iuH6yFdfOWyKZqVUB7kzfw-1; Wed, 14 Feb 2024 05:49:00 -0500 X-MC-Unique: iuH6yFdfOWyKZqVUB7kzfw-1 X-Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (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 C2F871C068E5; Wed, 14 Feb 2024 10:48:59 +0000 (UTC) X-Received: from [10.39.195.45] (unknown [10.39.195.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 088AE1121313; Wed, 14 Feb 2024 10:48:58 +0000 (UTC) Message-ID: Date: Wed, 14 Feb 2024 11:48:57 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v2 3/4] OvmfPkg/PlatformPei: rewrite page table calculation To: Gerd Hoffmann Cc: devel@edk2.groups.io, Jiewen Yao , Oliver Steffen , Ard Biesheuvel References: <20240202104720.1275308-1-kraxel@redhat.com> <20240202104720.1275308-4-kraxel@redhat.com> <6a5ece37-2164-e207-7779-6a1258c7445e@redhat.com> From: "Laszlo Ersek" In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 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,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: hv8nmmK4hVIgXME7HjFxVIoGx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=OGA61I5v; 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 2/14/24 10:32, Gerd Hoffmann wrote: > Hi, >=20 >> (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. >=20 > 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: Re: [edk2-devel] [PATCH 2/3] OvmfPkg/PlatformPei: rewrite page table calc= ulation msgid: 74ccb355-7d71-150b-7258-305149699c0d@redhat.com https://edk2.groups.io/g/devel/message/114906 > So I went back to the version working with UINT32 ... OK. Laszlo -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115442): https://edk2.groups.io/g/devel/message/115442 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] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-