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.web10.5183.1655889760693096111 for ; Wed, 22 Jun 2022 02:22:40 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Zyy5dhki; 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=1655889759; 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=J/RMBeIPYjKcvtL16Bn8uQh6am1uGhYE38Q2P4SoicU=; b=Zyy5dhkiP7Iduysu2hNce4jkiOP2LPVM6F6rzXALdJ7odHs6KmoQ4uczv8Ak4DdxCRQO9d d0rHxpCwTSnMfYxJFIgP7XqSzAp6PPsO85cCZz1DVUHj2XBE97HjZCLEzU1cOul+tYCctl BPexD3LCjABZIhtPxBEEjX+afvK3UVM= 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-449-giQsOldwP4azE3k0J9GfQQ-1; Wed, 22 Jun 2022 05:22:36 -0400 X-MC-Unique: giQsOldwP4azE3k0J9GfQQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 75B7785A582; Wed, 22 Jun 2022 09:22:35 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 41747141510C; Wed, 22 Jun 2022 09:22:35 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 049591800081; Wed, 22 Jun 2022 11:22:33 +0200 (CEST) Date: Wed, 22 Jun 2022 11:22:33 +0200 From: "Gerd Hoffmann" To: "Xu, Min M" Cc: "devel@edk2.groups.io" , "Aktas, Erdem" , James Bottomley , "Yao, Jiewen" , Tom Lendacky Subject: Re: [PATCH 3/3] OvmfPkg: Initialize NvVarStore with Configuration FV in Td guest Message-ID: <20220622092233.qnalik3mu4uishmh@sirius.home.kraxel.org> References: <20220620110124.s4sutzqnsvlmvdg5@sirius.home.kraxel.org> <20220622070127.toheatopvja6lrhd@sirius.home.kraxel.org> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 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 > > Copying over the content in PlatformInitLib makes sense too, probably best > > as separate function. > Yes, PlatformReserveEmuVariableNvStore() will be a separated function > and it returns the pointer of the allocated storage. Then this pointer > can be set to either the PCD (PlatformPei) or in PlatformInfoHob > (PeilessStartupLib). I mean copying over should be a separate function too, so it is up to the caller not the library itself to decide whenever the copying should happen or not. > > > > Also why limit this to tdx? > > > Because I am not sure if other platforms need such operation. So in > > > current stage it is limit to tdx. > > > > I think the code should copy over the varstore in case the > > SECURE_BOOT_ENABLE option is set. That is the actual use case and it > > makes sense without TDX too. > Then we need add a build-flag in *.dsc. Do you think OvmfPkgX64.dsc and IntelTdxX64.dsc are enough? The flag is already there ;) take care, Gerd