From mboxrd@z Thu Jan 1 00:00:00 1970 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.10177.1679306791667685121 for ; Mon, 20 Mar 2023 03:06:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Emi0CGpf; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679306790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3eUXnJ2jXWZIhS0yQrQqvLBKaPk52LG9LXjLRwkBQxQ=; b=Emi0CGpfXjccHGhvnuwRpbHumnrrJmBfmuvEZ1WyttiY/3xH1vDE8BiQlc7gmBVUFKfpjY 9jQcq6ngoYu3sjfHY2wdcVpd7KU8erfOyFw/w+kejf6CZMIpRngtHuNAR3p0OA/ZexKlD7 Z+kHK37C41fuuD1Komg7o+nxE3A0p9E= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-615-oZX6iKcONiypxYkD_YzRig-1; Mon, 20 Mar 2023 06:06:27 -0400 X-MC-Unique: oZX6iKcONiypxYkD_YzRig-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 95E7887B2A1; Mon, 20 Mar 2023 10:06:26 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.144]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 68B2440C20FA; Mon, 20 Mar 2023 10:06:26 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 4D7E91800081; Mon, 20 Mar 2023 11:06:25 +0100 (CET) Date: Mon, 20 Mar 2023 11:06:25 +0100 From: "Gerd Hoffmann" To: Dov Murik Cc: devel@edk2.groups.io, Ard Biesheuvel , Jiewen Yao , Jordan Justen , Erdem Aktas , James Bottomley , Min Xu , Tom Lendacky , Michael Roth , Ashish Kalra , Mario Smarduch , Tobin Feldman-Fitzthum Subject: Re: [PATCH v3 0/2] OvmfPkg: Enable measured direct boot on AMD SEV-SNP Message-ID: <20230320100625.ucpickm42jl3lffq@sirius.home.kraxel.org> References: <20230302091532.1985238-1-dovmurik@linux.ibm.com> MIME-Version: 1.0 In-Reply-To: <20230302091532.1985238-1-dovmurik@linux.ibm.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Mar 02, 2023 at 09:15:30AM +0000, Dov Murik wrote: > AMD SEV and SEV-ES support measured direct boot with > kernel/initrd/cmdline hashes injected by QEMU and verified by OVMF > during boot. > > To enable the same approach for AMD SEV-SNP, we declare the kernel > hashes page in the SNP metadata list as a new region type. When QEMU > encounters that region in the list, it will insert the hashes of > kernel/initrd/cmdline and encrypt the page (or, if the user turned off > kernel hashes, it will validate the page as a zero page). > > The first patch rearranges the pages in AmdSevX64's MEMFD so they are in > the same order both as in the main target (OvmfPkgX64), with the > exception of the SEV Launch Secret page which isn't defined in > OvmfPkgX64. > > The second patch modifies the SNP metadata structure such that on > AmdSev target the SEV Launch Secret page is explicitly defined in SNP > metadata list, and therefore it is not included in the ranges that are > pre-validated (zero pages) by the VMM; instead the VMM will insert > content into this page (the hashes table), or mark it explicitly as a > zero page if no hashes are added. > > This series is available at: > https://github.com/confidential-containers-demo/edk2/tree/snp-kernel-hashes-v3 > > A corresponding QEMU RFC series will be published soon in qemu-devel, or > use this tree: > https://github.com/confidential-containers-demo/qemu/tree/snp-kernel-hashes-v3 For the series: Acked-by: Gerd Hoffmann