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 641A1D811AC for ; Thu, 22 Feb 2024 11:54:42 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=MVj96wJ7PIoFV30qqIJjOUfFvfWncgDZs+tPD9IRIIg=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1708602881; v=1; b=hnXe1ZbPNKYT9yLpEqKa8eSH6T/7Jns895nZB8IFZ5FkPeeq7KJfsfSc/gRMXFMpow9sO9fU AAn1I8Ugux2wfvSSGzbXwFVpAiYelrVSa6Hk7bPgx1xhhgMQ/LXLCNXOc7MfyJHZax8LX0uz9dO uLG6X1q5ZNCE4Wg6XawdSys0= X-Received: by 127.0.0.2 with SMTP id mphaYY7687511xUka8g4Quku; Thu, 22 Feb 2024 03:54:41 -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.web11.11048.1708602880508229009 for ; Thu, 22 Feb 2024 03:54:40 -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-110-wRAANUXLPnOgrO_Ev1QpNA-1; Thu, 22 Feb 2024 06:54:38 -0500 X-MC-Unique: wRAANUXLPnOgrO_Ev1QpNA-1 X-Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 DA39D82DFE1; Thu, 22 Feb 2024 11:54:37 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.237]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2C6368CF3; Thu, 22 Feb 2024 11:54:37 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E7EA918007A1; Thu, 22 Feb 2024 12:54:35 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Tom Lendacky , Jiewen Yao , Oliver Steffen , Laszlo Ersek , Erdem Aktas , Michael Roth , Ard Biesheuvel , Gerd Hoffmann , Min Xu Subject: [edk2-devel] [PATCH 00/10] OvmfPkg/ResetVector: cleanup and add 5-level paging support. Date: Thu, 22 Feb 2024 12:54:25 +0100 Message-ID: <20240222115435.85794-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 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: c71W6eZyAZ06HY1r9ctxfXasx7686176AA= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=hnXe1ZbP; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none) 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). 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. 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. 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 OvmfPkg/ResetVector/ResetVector.inf | 1 + OvmfPkg/ResetVector/Ia32/AmdSev.asm | 34 +-- OvmfPkg/ResetVector/Ia32/IntelTdx.asm | 17 +- OvmfPkg/ResetVector/Ia32/PageTables64.asm | 300 +++++++++++++++++----- OvmfPkg/ResetVector/Main.asm | 4 + OvmfPkg/ResetVector/ResetVector.nasmb | 1 + 6 files changed, 264 insertions(+), 93 deletions(-) -- 2.43.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115802): https://edk2.groups.io/g/devel/message/115802 Mute This Topic: https://groups.io/mt/104506788/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-