From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (NAM04-BN3-obe.outbound.protection.outlook.com [40.92.9.28]) by mx.groups.io with SMTP id smtpd.web10.2744.1614627304537744824 for ; Mon, 01 Mar 2021 11:35:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@outlook.com header.s=selector1 header.b=dLrVlX6b; spf=pass (domain: outlook.com, ip: 40.92.9.28, mailfrom: kun.q@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kl08b0E4DxXe77AFI6fuk3FxdbZQA5sVHFlGSEuImDw6AHKJQTVGj+Eo4l3UYeVgD6cegUXke0d8z5Gsd9BFrV5E4aZquB+F447xhIMaKKsRr7RUJwRSS4gmUO9Lds43WVNCk24zjuF73nPiidRvSP01mo7JrcNiI2QvObboNMOa3DCv0ym432d4/RbyiNksANoZV8BGLBaOvgScxRvN48skEi8CvdDjayvIiwCAHmG9asdZI/KYM+5wCHH2ErIwL84FgD4VvDISXkW4dPo4O3aOkRLoKEOUbI5yIWq90oKxwIChQDGydShsoaPZPeRJU01daVAW8uJ3p7AfdTD6kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bvu9n3ZhZ9jvnB68mNZ8BevI4bt9ECk06p/HUi3h8k4=; b=Mqm6eHKOSWs9osvNsDk+okoC9+I59r25Ve5jXJoLJQ05JviJoz6cIBVLvPq52woH32lesE917eWm7SkLIuSiYH6UCSAxEnV+t7yeX45/7iHeikNF0Ka7Cc4hBrfyRU/ufroPEs+JlcqZUdy6ifVCIJ+FXyOcjNlb9PkfqQhanPcyZhRFTxJQl9uITIurec4fK3hfANYaEUB77OyCRBfjGI91ihx1sYsd/6JURw5AQPeFJbpQ6V4Wm7uR+R2YiAB/GCJKqbQoa1WHPYAy3enPO4y8+W2hwOthPkZv24TkOyKzULm7wcbc2TWnWL/ayJdEPxmo9GVRN6kB72ld0Bpbqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bvu9n3ZhZ9jvnB68mNZ8BevI4bt9ECk06p/HUi3h8k4=; b=dLrVlX6bFfiq8QhOI/5I0IKhXXH/izRk3MnRSsW8GenD7vFdIZ+KBRanzwd1ajctD9+hadmLhK1S98SX/I6hGhWMc4A8fG3664dIjL/wQal20fkk2dfi+LE5EKx0VHB9R9neOuUnBIkc0t41o/p7eHqcidtemD4rLkb6JMLDHGExv/EbO8LeMi0LJL+Y07iK8upbUH03SnXW/7g3t6Xhwjbl9V5j2XJkUMJAixbk26Pl7lnxBplhtKdiAjTcnm2gJZ28UfF59NnRXNzSo+06bNTRSZaDxuY9wKlbjy5xpDfGiP4BCzc1dz8dC1Wzap4yvMtCmkztxZ33yZfAlbVYQg== Received: from BN3NAM04FT032.eop-NAM04.prod.protection.outlook.com (10.152.92.54) by BN3NAM04HT026.eop-NAM04.prod.protection.outlook.com (10.152.92.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.20; Mon, 1 Mar 2021 19:35:03 +0000 Received: from MWHPR06MB3102.namprd06.prod.outlook.com (2a01:111:e400:7e4e::4a) by BN3NAM04FT032.mail.protection.outlook.com (2a01:111:e400:7e4e::157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.20 via Frontend Transport; Mon, 1 Mar 2021 19:35:03 +0000 Received: from MWHPR06MB3102.namprd06.prod.outlook.com ([fe80::d4ee:1260:6f53:3f7b]) by MWHPR06MB3102.namprd06.prod.outlook.com ([fe80::d4ee:1260:6f53:3f7b%7]) with mapi id 15.20.3890.028; Mon, 1 Mar 2021 19:35:03 +0000 From: "Kun Qin" To: Laszlo Ersek , "devel@edk2.groups.io" CC: Ard Biesheuvel , Jordan Justen Subject: Re: [edk2-devel] [PATCH v3 3/7] OvmfPkg: CI Build: Added new library for VariableSmmRuntimeDxe Thread-Topic: [edk2-devel] [PATCH v3 3/7] OvmfPkg: CI Build: Added new library for VariableSmmRuntimeDxe Thread-Index: AQHXDJITne63A1fhwkm8M6BDOmxRvqpvW88AgAAt4oCAAADxjA== Date: Mon, 1 Mar 2021 19:35:03 +0000 Message-ID: References: <20210226225158.1378-1-kun.q@outlook.com> ,<43d088c4-a595-2fdf-dbb9-c608112a039c@redhat.com> In-Reply-To: <43d088c4-a595-2fdf-dbb9-c608112a039c@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:FE456F56E8B3056289C35C0C4CF1FCCF21BC1F5636005B6FEFC77EA8ACB6A36F;UpperCasedChecksum:1C230DA965CE918F4204B239682EEBB6A2BBAE46B8B43841FAA7DAEB69EA3206;SizeAsReceived:7162;Count:44 x-tmn: [K0xavv4wwRpfraqGcv7fVpoxbFXpuxBs] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: ba7ac92d-4b49-4810-ffa9-08d8dce91c34 x-ms-traffictypediagnostic: BN3NAM04HT026: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vVmVeejK8tGahG9Sansnz00cdUneOvaazn8M2nmDfCJYiSjBylzc2PfVvUuti0DBIa80v4LUVL0d4Oc30t853W8uvaPzr9o9fE7mo2jyMpV+mR54a9Ygc7tw4EGoX/cWXBSjxb3B2G8ZjCS0y89gxmNRUKGEbIeLrYCo9bseNnNlh3s0ZT2v+Va9Tt/kmhNt3zBAmJWPW+TYO/7fJMYSk4rAI5vsdKe4RxT+YDFPxH+IlDAdEWrz4CpyhLjyJmwKBzbqJRG+GQJepvfwlEMy1H569DgkaHE+Tf8C1ENuxFHiGx9Liz4t+I9PeAGgZYpr9WBjdD1oH9Un8tlYeUo1yE9uUPzlrd2Dps3g53efxq7XGwcMGNDE9AMsLlvwTA9ckFiQXBQtxXwE/PalYajA6g== x-ms-exchange-antispam-messagedata: e2TjKkup0gmqhcDJKbGDgAuo2i3M+578HuezqRcSmge1zA2xm0kAEp005Q0ljL+fgYAld+G+pqBD2CJT8rAVLdb6SSXFXqWRE+I+7J1ZggNknxf/yfKuFxdoCsdtnUu5t1vuZacrO2o8T3f+/frH0w== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: BN3NAM04FT032.eop-NAM04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: ba7ac92d-4b49-4810-ffa9-08d8dce91c34 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2021 19:35:03.1441 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3NAM04HT026 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MWHPR06MB3102BBF1F01D54C795995A28F39A9MWHPR06MB3102namp_" --_000_MWHPR06MB3102BBF1F01D54C795995A28F39A9MWHPR06MB3102namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 libra= ry 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 variabl= e >> 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/VariablePoli= cyLibRuntimeDxe.inf >> +!if $(SMM_REQUIRE) =3D=3D TRUE >> + MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryL= ibNull.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/VariablePoli= cyLibRuntimeDxe.inf >> +!if $(SMM_REQUIRE) =3D=3D TRUE >> + MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryL= ibNull.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/VariablePoli= cyLibRuntimeDxe.inf >> +!if $(SMM_REQUIRE) =3D=3D TRUE >> + MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryL= ibNull.inf >> +!endif >> >> [LibraryClasses.common.UEFI_DRIVER] >> PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf >> > --_000_MWHPR06MB3102BBF1F01D54C795995A28F39A9MWHPR06MB3102namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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 ne= w library for VariableSmmRuntimeDxe

 

On 03/01/21 17:46, La= szlo 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 librar= y
>> interface is consumed by VariableSmmRuntimeDxe to better support v= ariable
>> 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 VariableSm= mRuntimeDxe)
>
> (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/DxePci= LibI440FxQ35.inf
>>    QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/Dx= eQemuFwCfgS3LibFwCfg.inf
>>    VariablePolicyLib|MdeModulePkg/Library/VariableP= olicyLib/VariablePolicyLibRuntimeDxe.inf
>> +!if $(SMM_REQUIRE) =3D=3D TRUE
>> +  MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnb= lockMemoryLibNull.inf
>> +!endif
>> 
>>  [LibraryClasses.common.UEFI_DRIVER]
>>    PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf >> diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.d= sc
>> 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/DxePci= LibI440FxQ35.inf
>>    QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/Dx= eQemuFwCfgS3LibFwCfg.inf
>>    VariablePolicyLib|MdeModulePkg/Library/VariableP= olicyLib/VariablePolicyLibRuntimeDxe.inf
>> +!if $(SMM_REQUIRE) =3D=3D TRUE
>> +  MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnb= lockMemoryLibNull.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/DxePci= LibI440FxQ35.inf
>>    QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/Dx= eQemuFwCfgS3LibFwCfg.inf
>>    VariablePolicyLib|MdeModulePkg/Library/VariableP= olicyLib/VariablePolicyLibRuntimeDxe.inf
>> +!if $(SMM_REQUIRE) =3D=3D TRUE
>> +  MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnb= lockMemoryLibNull.inf
>> +!endif
>> 
>>  [LibraryClasses.common.UEFI_DRIVER]
>>    PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf >>
>

 

--_000_MWHPR06MB3102BBF1F01D54C795995A28F39A9MWHPR06MB3102namp_--