From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.groups.io with SMTP id smtpd.web12.2597.1614627072343527300 for ; Mon, 01 Mar 2021 11:31:12 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GpOU5344; spf=pass (domain: redhat.com, ip: 63.128.21.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614627071; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ES1pLF91Y0hmxbSwG+NVl4HhssP0Oy1Bo/kgVc/BYIk=; b=GpOU5344v1BXMeYIdRDiNK8oIsHMhVCumyBL01oP4ZSf5TzKRE1W1ZDhXAHwRyBTDJPL1f LrOaOHGNiYrT9UYQSIc8aFijEELbnktTWM/7Go3+GqAPubwUN9fA25VpWBgx3MPmev3Ri6 S3FY4lr68cgn8X0IkomKAkkEbzBiX4s= 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-182-q2eowRB_Oc24WeHQxdkiuw-1; Mon, 01 Mar 2021 14:31:07 -0500 X-MC-Unique: q2eowRB_Oc24WeHQxdkiuw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4173C186DD22; Mon, 1 Mar 2021 19:31:06 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-71.ams2.redhat.com [10.36.112.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED02860C13; Mon, 1 Mar 2021 19:31:04 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v3 3/7] OvmfPkg: CI Build: Added new library for VariableSmmRuntimeDxe From: "Laszlo Ersek" To: devel@edk2.groups.io, kun.q@outlook.com Cc: Ard Biesheuvel , Jordan Justen References: <20210226225158.1378-1-kun.q@outlook.com> Message-ID: <43d088c4-a595-2fdf-dbb9-c608112a039c@redhat.com> Date: Mon, 1 Mar 2021 20:31:03 +0100 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 03/01/21 17:46, Laszlo Ersek wrote: > On 02/26/21 23:51, Kun Qin wrote: >> This change added NULL MmUnblockMemoryLib instance in dsc files of >> OvmfPkg to pass CI build. When SMM_REQUIRE flag is set, the library >> interface is consumed by VariableSmmRuntimeDxe to better support variable >> runtime cache feature. >> >> Cc: Laszlo Ersek >> Cc: Ard Biesheuvel >> Cc: Jordan Justen >> >> Signed-off-by: Kun Qin >> --- >> >> Notes: >> v3: >> - Newly added in v3. [Hao] >> >> OvmfPkg/OvmfPkgIa32.dsc | 3 +++ >> OvmfPkg/OvmfPkgIa32X64.dsc | 3 +++ >> OvmfPkg/OvmfPkgX64.dsc | 3 +++ >> 3 files changed, 9 insertions(+) > > (1) Please change the subject line as follows: > > OvmfPkg: resolve MmUnblockMemoryLib (mainly for VariableSmmRuntimeDxe) > > (70 characters). (2) This patch should be ordered between the MdePkg and the MdeModulePkg patches. Otherwise, with only patches #1 and #2 applied (i.e., mid-series), OvmfPkg platforms will not build. That's not great in case something has to be bisected. So the idea is to introduce the lib class and instance first, then add the lib class resolution to OvmfPkg second (before the lib class is consumed by any module built for OvmfPkg), and then add the new dependency to VariableSmmRuntimeDxe as third step. Thanks Laszlo > > With that update: > > Reviewed-by: Laszlo Ersek > > Thanks > Laszlo > >> >> diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc >> index 1b8d34052b01..1eaf3e99c6c5 100644 >> --- a/OvmfPkg/OvmfPkgIa32.dsc >> +++ b/OvmfPkg/OvmfPkgIa32.dsc >> @@ -347,6 +347,9 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] >> PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf >> QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/DxeQemuFwCfgS3LibFwCfg.inf >> VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf >> +!if $(SMM_REQUIRE) == TRUE >> + MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf >> +!endif >> >> [LibraryClasses.common.UEFI_DRIVER] >> PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf >> diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc >> index 9c1aee87e783..4a5a43014725 100644 >> --- a/OvmfPkg/OvmfPkgIa32X64.dsc >> +++ b/OvmfPkg/OvmfPkgIa32X64.dsc >> @@ -351,6 +351,9 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] >> PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf >> QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/DxeQemuFwCfgS3LibFwCfg.inf >> VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf >> +!if $(SMM_REQUIRE) == TRUE >> + MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf >> +!endif >> >> [LibraryClasses.common.UEFI_DRIVER] >> PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf >> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc >> index fabb8b2f29e4..d4d601b44476 100644 >> --- a/OvmfPkg/OvmfPkgX64.dsc >> +++ b/OvmfPkg/OvmfPkgX64.dsc >> @@ -353,6 +353,9 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] >> PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf >> QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/DxeQemuFwCfgS3LibFwCfg.inf >> VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf >> +!if $(SMM_REQUIRE) == TRUE >> + MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf >> +!endif >> >> [LibraryClasses.common.UEFI_DRIVER] >> PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf >> >