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 5D6AD7803D8 for ; Fri, 1 Mar 2024 19:01:50 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=XGWN3rz6K15wfKU76Pa9oKpYSg80S5Pk+hsRzeqZukw=; 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=1709319708; v=1; b=bhLEicxTHahOs6KlPnOnqzIb1px6jvRiq+vd9JGQY2pldnyoZiWcuYqntR5NAab9AuXT9zvt cYCcng7+NC8Ce/RygisX3RgX668nGP2H+f/ZlJCQVGUrN7vNQyjJueJ/n1AJK6mxCPDL8PDwcHV V1t0RNH26NtbJFXdFg+msxcU= X-Received: by 127.0.0.2 with SMTP id 84KUYY7687511xLENRU4fhKv; Fri, 01 Mar 2024 11:01:48 -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.32185.1709319708263266106 for ; Fri, 01 Mar 2024 11:01:48 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-42-qvCM6p5ONECRs_0vunbUrA-1; Fri, 01 Mar 2024 14:01:45 -0500 X-MC-Unique: qvCM6p5ONECRs_0vunbUrA-1 X-Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (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 C256710B93A4; Fri, 1 Mar 2024 19:01:44 +0000 (UTC) X-Received: from [10.39.194.215] (unknown [10.39.194.215]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 475B4492BE2; Fri, 1 Mar 2024 19:01:43 +0000 (UTC) Message-ID: Date: Fri, 1 Mar 2024 20:01:42 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v2 00/10] OvmfPkg/ResetVector: cleanup and add 5-level paging support. To: devel@edk2.groups.io, kraxel@redhat.com Cc: Jiewen Yao , Oliver Steffen , Michael Roth , Erdem Aktas , Min Xu , Ard Biesheuvel , Tom Lendacky References: <20240301074402.98625-1-kraxel@redhat.com> From: "Laszlo Ersek" In-Reply-To: <20240301074402.98625-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 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: LxPoms3GvAf9JNgE2MsFTOHmx7686176AA= 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=bhLEicxT; 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 3/1/24 08:43, Gerd Hoffmann wrote: > So I ran with the suggestion by Laszlo to move the page table setup into > macros and untangle the non-CoCo / TDX / SEV code paths. The first five > patches of the series are doing that (without functional changes). >=20 > Support for 5-level paging is added by the following five patches. This > way it is indeed easier to understand. Additional bonus is that the > patches can be splitted into smaller pieces and 5-level paging for the > three cases (non-CoCo / TDX / SEC) can be enabled independently. >=20 > The SEV patches (#9 + #10) are included here for completeness, but it is > probably a good idea to merge them only after 5-level paging support was > added to BaseMemEncryptSevLib. This way we can turn on 5-level paging > support without breaking SEV. >=20 > v2 changes: > - remove SetCr3La57 label, use Enable5LevelPaging macro instead. > - turn GetSevCBitMaskAbove31 into a macro. > - comment fixes. >=20 > Gerd Hoffmann (10): > OvmfPkg/ResetVector: improve page table flag names > OvmfPkg/ResetVector: add ClearOvmfPageTables macro > OvmfPkg/ResetVector: add CreatePageTables4Level macro > OvmfPkg/ResetVector: split TDX BSP workflow > OvmfPkg/ResetVector: split SEV and non-CoCo workflows > OvmfPkg/ResetVector: add 5-level paging support > OvmfPkg/ResetVector: print post codes for 4/5 level paging > OvmfPkg/ResetVector: wire up 5-level paging for TDX > OvmfPkg/ResetVector: leave SEV VC handler installed longer > OvmfPkg/ResetVector: wire up 5-level paging for SEV >=20 > OvmfPkg/ResetVector/ResetVector.inf | 1 + > OvmfPkg/ResetVector/Ia32/AmdSev.asm | 40 ++- > OvmfPkg/ResetVector/Ia32/IntelTdx.asm | 17 +- > OvmfPkg/ResetVector/Ia32/PageTables64.asm | 299 +++++++++++++++++----- > OvmfPkg/ResetVector/Main.asm | 4 + > OvmfPkg/ResetVector/ResetVector.nasmb | 5 +- > 6 files changed, 272 insertions(+), 94 deletions(-) >=20 Patches 1 through 8 have been merged as 8 fded08e74400 OvmfPkg/ResetVector: improve page table flag names 9 52e44713d23d OvmfPkg/ResetVector: add ClearOvmfPageTables macro 10 4329b5b0cd58 OvmfPkg/ResetVector: add CreatePageTables4Level macro 11 b7a97bfac528 OvmfPkg/ResetVector: split TDX BSP workflow 12 e3bd782373d8 OvmfPkg/ResetVector: split SEV and non-CoCo workflows 13 49b7faba1d6e OvmfPkg/ResetVector: add 5-level paging support 14 318b0d714a7e OvmfPkg/ResetVector: print post codes for 4/5 level pa= ging 15 275d0a39c42a OvmfPkg/ResetVector: wire up 5-level paging for TDX via . In patch #8, I moved the "CheckForSev:" label into "%if PG_5_LEVEL" scope, = as discussed. 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 (#116285): https://edk2.groups.io/g/devel/message/116285 Mute This Topic: https://groups.io/mt/104660109/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-