From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mx.groups.io with SMTP id smtpd.web11.8780.1652800938264024202 for ; Tue, 17 May 2022 08:22:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@canonical.com header.s=20210705 header.b=ISZ8IKU/; spf=pass (domain: canonical.com, ip: 185.125.188.123, mailfrom: dann.frazier@canonical.com) Received: from mail-il1-f199.google.com (mail-il1-f199.google.com [209.85.166.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 759DC3FE02 for ; Tue, 17 May 2022 15:22:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1652800934; bh=AJDr81GM88DsZyHQSFh7aztM4Z6BSHkrfQ9roDGZwhk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=ISZ8IKU/J9w9WkvPbGPJqWsiKm6CHM3DEHS+j1L3lOTnkVY8cPiFaHigMTHLywKtW Ip1vWAfW0n6giAcsqTbwAXruLPlOKiz7oq3tN/Pk1sVf7M7szckzXEUwwyoVCpjrmx PnkiPFcucMg1W6G/Bb+xwd0seZlZ/QsRApydbaDVOSdvfc4Wf3LvySDiO1dKnYCFTX xe/O0Jwap/toPoGxjZdwMOyOWJULUn5pj1TSHJp3jDRjGrMiYyOil8arwrhodN+xTn GSjifuXWQw6l6DVJWvE6PHkZy6XV7WM7PzZHy3YJiJgNw9F6QuDkKShr/P8omlarB1 /RbFDgnpS3hMA== Received: by mail-il1-f199.google.com with SMTP id j4-20020a056e02154400b002d113a19116so3409233ilu.1 for ; Tue, 17 May 2022 08:22:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=AJDr81GM88DsZyHQSFh7aztM4Z6BSHkrfQ9roDGZwhk=; b=pww/XLvUnskQENprbIJ8cARmVTOOSV4vXqTNvHzUVMVXEh+VSy8jPJ5B/iBKw1BOuK l6jpCKVAQyDhqtLmD7Qj9e+gsT7xAiT5wTq5MKSpsVZHyrDAUK6cBBbC39vjIp5fNAwo Dh4IZ597uVuhaarG06ewgdfJ3a4xYhpfDuBa9ZyTk4xD8KS4dQjcBFr/MJAkhqjiFR5U bPJLZDuokobqoJOxaknHqKFjFR/jrl6L+CuI1s2rn753mgnCjKaYiHusq36GUXgIJg7I 1EV1HM++K+EqLQ/7hWVYNhpAkC4PCHd/z1EGuE4a18FLmdZ9mo9hR/tQj+rnb+mt1xAE WDJQ== X-Gm-Message-State: AOAM532BOvvtSlPtvc2Czf5e2gd+OR7DrC9IED95b1nOryCRRorvOV0Q DcVrdp2RckCJ3t84cNruDqKpEgeNPeQEOaSRPOeWa85zxxc+h5uhwbW53Sgc3GWI09iGhGuedvK cFQkZLsS40czD/fW3HpQ6Jwl28uyuoxk= X-Received: by 2002:a02:ccc9:0:b0:32e:2fe6:b3b1 with SMTP id k9-20020a02ccc9000000b0032e2fe6b3b1mr5860282jaq.320.1652800931454; Tue, 17 May 2022 08:22:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdRsJEqd/sawSDj8upaQ0nJMQrMYJCvkl6w6/tOFDSMNujdemOtnsdX0NExciyCiS77p7qXg== X-Received: by 2002:a02:ccc9:0:b0:32e:2fe6:b3b1 with SMTP id k9-20020a02ccc9000000b0032e2fe6b3b1mr5860266jaq.320.1652800931212; Tue, 17 May 2022 08:22:11 -0700 (PDT) Received: from xps13.dannf (c-73-14-97-161.hsd1.co.comcast.net. [73.14.97.161]) by smtp.gmail.com with ESMTPSA id y17-20020a056638015100b0032e120a238csm2674031jao.165.2022.05.17.08.22.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 08:22:09 -0700 (PDT) Date: Tue, 17 May 2022 09:22:07 -0600 From: "dann frazier" To: "Yao, Jiewen" Cc: "Xu, Min M" , "devel@edk2.groups.io" , "Aktas, Erdem" , James Bottomley , Tom Lendacky Subject: Re: [PATCH] OvmfPkg/OvmfPkgX64: Use different CcProbeLib when SMM is on or off Message-ID: References: <20220517124314.1021-1-min.m.xu@intel.com> MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, May 17, 2022 at 12:47:21PM +0000, Yao, Jiewen wrote: > Question: Does this patch need catch release 202205 release? It does fix a regression since 202202, so I'd hope so :) -dann > > > > -----Original Message----- > > From: Xu, Min M > > Sent: Tuesday, May 17, 2022 8:43 PM > > To: devel@edk2.groups.io > > Cc: Xu, Min M ; dann frazier > > ; Aktas, Erdem ; > > James Bottomley ; Yao, Jiewen ; > > Tom Lendacky > > Subject: [PATCH] OvmfPkg/OvmfPkgX64: Use different CcProbeLib when SMM is > > on or off > > > > CcProbeLib is designed to check the vm guest type. The OvmfPkg/CcProbeLib > > reads the OvmfWorkArea (0x80B000) to get the vm guest type which is > > written by each guest (SEV or TDX guest). But in SMM drivers the access > > to OvmfWorkArea is illegal. PiSmmCpuDxeSmm.inf is an example. It uses > > IoLib which in OvmfPkgX64 BaseIoLibIntrinsicSev.inf is included. The > > IoLib probes if the working guest is td guest by calling CcProbe(). > > > > So CcProbeLibNull will be included when SMM_REQUIRE is set. Currently > > only TDVF uses CcProbe to check the guest type, and TDVF doesn't > > support SMM, so this fix has no side-effect. > > > > Cc: dann frazier > > Cc: Erdem Aktas > > Cc: James Bottomley > > Cc: Jiewen Yao > > Cc: Tom Lendacky > > Signed-off-by: Min Xu > > --- > > OvmfPkg/OvmfPkgX64.dsc | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc > > index 71526bba31..db7f4def7a 100644 > > --- a/OvmfPkg/OvmfPkgX64.dsc > > +++ b/OvmfPkg/OvmfPkgX64.dsc > > @@ -171,7 +171,6 @@ > > PciCapLib|OvmfPkg/Library/BasePciCapLib/BasePciCapLib.inf > > > > PciCapPciSegmentLib|OvmfPkg/Library/BasePciCapPciSegmentLib/BasePciCapP > > ciSegmentLib.inf > > PciCapPciIoLib|OvmfPkg/Library/UefiPciCapPciIoLib/UefiPciCapPciIoLib.inf > > - CcProbeLib|OvmfPkg/Library/CcProbeLib/CcProbeLib.inf > > IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicSev.inf > > > > OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/ > > OemHookStatusCodeLibNull.inf > > SerialPortLib|PcAtChipsetPkg/Library/SerialIoLib/SerialIoLib.inf > > @@ -198,6 +197,9 @@ > > > > !if $(SMM_REQUIRE) == FALSE > > LockBoxLib|OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf > > + CcProbeLib|OvmfPkg/Library/CcProbeLib/CcProbeLib.inf > > +!else > > + CcProbeLib|MdePkg/Library/CcProbeLibNull/CcProbeLibNull.inf > > !endif > > > > CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/Customize > > dDisplayLib.inf > > > > FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLi > > b.inf >