Thanks for the comments. Will change the code and add the comments in next 
version patch.
Thanks,
Dun

-----Original Message-----
From: Ni, Ray <ray...@intel.com> 
Sent: Wednesday, March 15, 2023 2:02 PM
To: Tan, Dun <dun....@intel.com>; devel@edk2.groups.io
Cc: Dong, Eric <eric.d...@intel.com>; Kumar, Rahul R <rahul.r.ku...@intel.com>; 
Gerd Hoffmann <kra...@redhat.com>
Subject: RE: [Patch V2 09/14] UefiCpuPkg/CpuPageTableLib: Add OUTPUT IsModified 
parameter.

> +  IA32_PAGING_ENTRY   ParentPagingEntryContent;
1. how about "OriginalParentPagingEntry"?

> +  IA32_PAGING_ENTRY   PrevLeafPagingEntryContent;
2. how about "OriginalCurrentPagingEntry"?

> 
> +  //
> +  // Check if ParentPagingEntry entry is modified.
> +  //
3. Can you add more comments to explain why checking parent entry content is 
enough?

> +  if (ParentPagingEntryContent.Uint64 != ParentPagingEntry->Uint64) {
> +    if (IsModified != NULL) {
4. Can you always pass a non-NULL IsModified to MapInLevel()?

5. By the way, it's good that this patch doesn't enhance test case to test 
IsModified return value.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101219): https://edk2.groups.io/g/devel/message/101219
Mute This Topic: https://groups.io/mt/97469484/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to