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.web08.4161.1632459264904714181 for ; Thu, 23 Sep 2021 21:54:25 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CsM4bIEj; 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=1632459264; 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=zkPu56+0irJKAv2ZT7/yqr6rvSr6KA4gTspf5AdAb2s=; b=CsM4bIEj3vtCRefAPCBvDo79Q+gq+E+2FYkBOLftPotFL6+XNIfqliZQ3KrQ9LdAXJGpdZ pexcGlkTY91cL/GSWVQcqKoG1vTStDrUqu8jENrf8Zb7sQ0jfQbXyUu8wY9BcsWWm7vKOq FUT0JsSc9ImDftZtKhh9mpeI662izEE= 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-211-zI2aGordOAiav6nzLhbh3g-1; Fri, 24 Sep 2021 00:54:20 -0400 X-MC-Unique: zI2aGordOAiav6nzLhbh3g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E5785801B3D; Fri, 24 Sep 2021 04:54:18 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.134]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 58EA65D740; Fri, 24 Sep 2021 04:54:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A2C5D1800840; Fri, 24 Sep 2021 06:54:16 +0200 (CEST) Date: Fri, 24 Sep 2021 06:54:16 +0200 From: "Gerd Hoffmann" To: "Yao, Jiewen" Cc: "Xu, Min M" , "devel@edk2.groups.io" , "brijesh.singh@amd.com" , 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: <20210924045416.3vb7qxcetgtdggbs@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.79 on 10.5.11.15 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 On Thu, Sep 23, 2021 at 01:38:52PM +0000, Yao, Jiewen wrote: > Good point, Min. > > If https://github.com/AMDESE/ovmf/blob/snp-v8/OvmfPkg/ResetVector/X64/OvmfMetadata.asm is the proposal, then I have more comment: > > Type: OVMF_SECTION_TYPE_CODE, OVMF_SECTION_TYPE_VARS are NOT used for SEV. I am not sure why they are there. tdx needs them (for measurement). It's not a tdx-specific concept, possibly sev-snp wants use that too in the future. > Type: OVMF_SECTION_TYPE_CPUID should be SEV specific. TDX does not need CPUID page. A cpuid page can be used without sev too. > Type: OVMF_SECTION_TYPE_SEC_MEM also seems for SEV. TDX does not need this special memory, such as Page table. It is already covered by code. These are "needs pre-validation / pre-acceptance" regions. TDX surely needs that too. > Type: OVMF_SECTION_TYPE_SNP_SECRETS / OVMF_SECTION_TYPE_SNP_SEC_MEM is SEV specific. Yes. > The SEV table is totally different with TDX metadata table. I can't see a fundamental difference. In both cases the VMM needs to know the firmware memory layout for (a) attestation, and (b) pre-validating/pre-acceptance of memory, and (c) some hardware-specific ranges such as snp secrets page. > I really cannot see the benefit to merge into one table. Keep reset vector small? Have common parser structs and code? take care, Gerd