From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web12.4336.1632461314818400635 for ; Thu, 23 Sep 2021 22:28:35 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TrBlAKXL; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632461314; 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=AOMA/YTHf2ExxETlwNurVZ0vXml1wpVzfOhSyrRZQXw=; b=TrBlAKXL1k1iVDjaSTxhs1/+YxXmh0Wyb3K9LsRfLKfIWPEluFLBtlCKwRcUiQeUYwr6dS TDsZb0RnULI/Zmt93XSKI6oyWUIamlgXMKAKeJSU0ZTKKGK9Jslq+Ao/lba0OKLEHmXy87 xF/iBoeYzUBaJgua5Y9cSUdYPJ7IHLo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-407-YnVDa6nONvyNoEIav5Krrw-1; Fri, 24 Sep 2021 01:28:29 -0400 X-MC-Unique: YnVDa6nONvyNoEIav5Krrw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B624C1084684; Fri, 24 Sep 2021 05:28:27 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.134]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 28A371000358; Fri, 24 Sep 2021 05:28:27 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 62BF01800840; Fri, 24 Sep 2021 07:28:25 +0200 (CEST) Date: Fri, 24 Sep 2021 07:28:25 +0200 From: "Gerd Hoffmann" To: "Xu, Min M" Cc: Brijesh Singh , "Yao, Jiewen" , "devel@edk2.groups.io" , Ard Biesheuvel , "Justen, Jordan L" , Erdem Aktas , James Bottomley , Tom Lendacky Subject: Re: [edk2-devel] [PATCH V7 1/1] OvmfPkg: Enable TDX in ResetVector Message-ID: <20210924052825.2qljhtvweonbov5q@sirius.home.kraxel.org> References: <12721dade1f2f9905cc34271d9abec24650442ff.1632214561.git.min.m.xu@intel.com> <20210922074929.e5iwf24t6wyndgbu@sirius.home.kraxel.org> <20210923084821.yxizus3loa2p6hms@sirius.home.kraxel.org> <7c9aeb95-5c33-bd8d-4f0c-40133f4c7c3d@amd.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, > > SEV hardware does not have a concept of the metadata. To boot SEV guest we > > need to pass some information to VMM and in past those information were > > passed through SNP_BOOT_BLOCK (GUIDed structure) but Gerd recommended > > that it will be good idea if both SEV and TDX uses a common metadata approach > > to pass these information. I personally think it was a good suggestion. So, in SNP > > series I went ahead and created a generic metadata structure and hope that > > TDX will build on it. The user of the metadata structure is VMM (qemu, etc); > > while launching the guest the VMM knows whether its creating the SEV or TDX > > guest and will process the entries accordingly. > > > > As per the number of fields in the metadata is concerns, I felt 3 fields (start, size > > and type) should be good enough for all the cases. There was a question from > > Gerd to Min asking why do you need the dataoffset/rawdatasize etc and I don't > > remember seeing the answer for it. > > The discussion is in this link. https://edk2.groups.io/g/devel/message/80289 The question why TDX_BFV_RAW_DATA_OFFSET and TDX_BFV_RAW_DATA_SIZE are needed and why TDX_BFV_MEMORY_BASE + TDX_BFV_MEMORY_SIZE can't be used is still open. While being at it: The question why "config-b" with a completely different initialization code path is needed is still open too. The tdvf design guide is not helpful here. Although explains what is different in "config-a" vs. "config-b" it does not explain the background, i.e. why some features are supported by "config-b" only. And I guess these two questions are related. With "config-a" there is a fixed offset between TDX_BFV_RAW_DATA_OFFSET + TDX_BFV_MEMORY_BASE, so if you know one of them you can easily calculate the other. With "config-b" this is possibly not the case. So, can you please shed some light on this? thanks, Gerd