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.web08.6081.1632476070605750975 for ; Fri, 24 Sep 2021 02:34:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AlBf794L; 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=1632476068; 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=MvW7K6rO0/Xzk+RIqINi3RcLVASPn/Q09ls8TMYV+sY=; b=AlBf794Lg+xXzrYT9cxtQqEoJudI2uT9/ck3D+DkofiFEMsFjLc8LTi1rL0PoMVSXc1naL RzCA0oPLx21Ct6deD0yROKo+1Sft0gX8jOcmScp+E6nVnInAl7czDEf/cgK8OQcuPMqjci tv0+8G4U5bn+pexAmlien1fyeF86wkc= 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-35-D4FnhCeXNJKrsZ16xGhVdg-1; Fri, 24 Sep 2021 05:34:25 -0400 X-MC-Unique: D4FnhCeXNJKrsZ16xGhVdg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0BB0484A5E1; Fri, 24 Sep 2021 09:34:24 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.134]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 49E145BB1B; Fri, 24 Sep 2021 09:34:23 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id DE513180063A; Fri, 24 Sep 2021 11:34:20 +0200 (CEST) Date: Fri, 24 Sep 2021 11:34:20 +0200 From: "Gerd Hoffmann" To: devel@edk2.groups.io, jiewen.yao@intel.com Cc: "Xu, Min M" , "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: <20210924093420.xu7kmfnygy4lx7um@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> <20210924045416.3vb7qxcetgtdggbs@sirius.home.kraxel.org> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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, > > > 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. > I don't think TDX need this. The page table should be covered by CODE already. I think you are wrong here, the patch has this ... +_OvmfPageTable: + DD 0 + DD 0 + DQ OVMF_PAGE_TABLE_BASE + DQ OVMF_PAGE_TABLE_SIZE + DD TDX_METADATA_SECTION_TYPE_TEMP_MEM + DD 0 ... and a few simliar entries. > > > I really cannot see the benefit to merge into one table. > > > > Keep reset vector small? > > Have common parser structs and code? > > I think it is opposite. This proposal makes reset vector larger, if we > need define more structure to satisfy TDX, but it is not needed by > SEV. The sev and tdx specific entries will be there anyway, no matter whenever we place them into one or two separate tables. Shared items like the page table memory will be there only once when we use a unified table, but twice with two separate tables. take care, Gerd