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.web12.38823.1656313343732820887 for ; Mon, 27 Jun 2022 00:02:23 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=abdK6/02; 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=1656313342; 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=YY64iW9xjPxjk6g+NzEV0xbRclGjJVCugjaC0pOOLD4=; b=abdK6/02sS+wF58DkOAl17QQoFsV1YQUEtX0b4axDdbXySxwSEOvlY94Wx6jYdzMrafnhq lZHS5ZtFdVOaKBIRjnw2M7n3PJg7wmfW8PKG5Yr9qhl+O+omQgyX+x9PnU69IRon2a1ZE4 450Py/8I8r7CJ7euAi0PEBREb3QEH94= 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-669-6VBtK1pdOn66UPqek7roMg-1; Mon, 27 Jun 2022 03:02:18 -0400 X-MC-Unique: 6VBtK1pdOn66UPqek7roMg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 77372811130; Mon, 27 Jun 2022 07:02:18 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 32BC51121314; Mon, 27 Jun 2022 07:02:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9F94B1800084; Mon, 27 Jun 2022 09:02:16 +0200 (CEST) Date: Mon, 27 Jun 2022 09:02:16 +0200 From: "Gerd Hoffmann" To: Min Xu Cc: devel@edk2.groups.io, Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky Subject: Re: [PATCH V2 1/8] OvmfPkg: Move TdxValidateCfv from PeilessStartupLib to PlatformInitLib Message-ID: <20220627070216.z65kzpjzy5tvybsu@sirius.home.kraxel.org> References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 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 Sun, Jun 26, 2022 at 11:05:50AM +0800, Min Xu wrote: > From: Min M Xu > > TdxValidateCfv validates the integrity of Configuration FV (CFV). It was > implemented in PeilessStartupLib which is included in IntelTdxX64. > --- a/OvmfPkg/Library/PlatformInitLib/IntelTdx.c > +++ b/OvmfPkg/Library/PlatformInitLib/IntelTdx.c > +/** > + Check the integrity of CFV data. > + > + @param[in] TdxCfvBase - A pointer to CFV header > + @param[in] TdxCfvSize - CFV data size > + > + @retval TRUE - The CFV data is valid. > + @retval FALSE - The CFV data is invalid. > + > +**/ > +BOOLEAN > +EFIAPI > +TdxValidateCfv ( > + IN UINT8 *TdxCfvBase, > + IN UINT32 TdxCfvSize > + ) Hmm, is there anything tdx-specific in this function? Looks like generic verification of varstore structure to me. take care, Gerd