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.133.124]) by mx.groups.io with SMTP id smtpd.web12.5949.1634194601197114906 for ; Wed, 13 Oct 2021 23:56:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=N+fvGB+d; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634194600; 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=mJfurctPQAUvoiUk69ZqqbARDrvkBjTcosfLTr30Eeg=; b=N+fvGB+duAGGLZXaHmeQSG9XUwr3zHgRiizmEX6pkNVcaK6gprg6zlBpoUA1rA2pA1/ql+ e3szRsm8JCcPYrRZLTABTy/BMbQ38WImt6gfg9hNTUUP1LTypSXPooOf7beRjXbDd0L/7o +ORVNEz0gNECsHnD95SGI0RHtmvfK5A= 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-154-PjxVrmGzMu-BJTiPktG4uQ-1; Thu, 14 Oct 2021 02:56:39 -0400 X-MC-Unique: PjxVrmGzMu-BJTiPktG4uQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9B3C61922962; Thu, 14 Oct 2021 06:56:37 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3375B19D9F; Thu, 14 Oct 2021 06:56:37 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0E5D018007AC; Thu, 14 Oct 2021 08:56:35 +0200 (CEST) Date: Thu, 14 Oct 2021 08:56:34 +0200 From: "Gerd Hoffmann" To: "Xu, Min M" Cc: "devel@edk2.groups.io" , Brijesh Singh , Erdem Aktas , James Bottomley , "Yao, Jiewen" , Tom Lendacky , "Dong, Eric" , "Ni, Ray" , "Kumar, Rahul1" Subject: Re: [edk2-devel] [PATCH V2 13/28] UefiCpuPkg: Enable Tdx support in MpInitLib Message-ID: <20211014065634.bq5hnx7dklwfuw2z@sirius.home.kraxel.org> References: <80403cd301cc6f0e88bc1c10e11ec262c1093cbf.1633401643.git.min.m.xu@intel.com> <20211012103139.4xkxi6p6jlkjo2wo@sirius.home.kraxel.org> <20211014060438.yugrowggdtyohlkz@sirius.home.kraxel.org> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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, Oct 14, 2021 at 06:31:30AM +0000, Xu, Min M wrote: > On October 14, 2021 2:05 PM, Gerd Hoffmann wrote: > > On Thu, Oct 14, 2021 at 12:27:13AM +0000, Xu, Min M wrote: > > > On October 12, 2021 6:32 PM, Gerd Hoffman wrote: > > > > Hi, > > > > > > > > > + do { > > > > > + AsmCpuid (0, &LargestEax, &Ebx, &Ecx, &Edx); > > > > > > > > Again: this should use PCD. > > > ConfidentialComputing PCD is set in PlatformPei. So any check of this PCD > > should be after PlatformPei. > > > > Can we move that to the SEC phase? > PCD cannot be set in SEC phase. Hmm, ok. Can we have a helper function for that in TdxLib for sec and pei then, so this check doesn't need to be cut+pasted to various places? thanks, Gerd