Thanks, will reorder the patches in v4.
Regards,
Kun
From: Laszlo Ersek
Sent: Monday, March 1, 2021 11:31
To: devel@edk2.groups.io;
kun.q@outlook.com
Cc: Ard Biesheuvel;
Jordan Justen
Subject: Re: [edk2-devel] [PATCH v3 3/7] OvmfPkg: CI Build: Added new library for VariableSmmRuntimeDxe
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 <lersek@redhat.com>
>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>> Cc: Jordan Justen <jordan.l.justen@intel.com>
>>
>> Signed-off-by: Kun Qin <kun.q@outlook.com>
>> ---
>>
>> 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 <lersek@redhat.com>
>
> 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
>>
>