[edk2-devel] [PATCH] UefiCpuPkg: add volatile qualifier to page table related variable

2024-02-21 Thread Zhou Jianfeng
Add volatile qualifier to page table related variable to prevent compiler from optimizing away the variables which may lead to unexpected result. Signed-off-by: Zhou Jianfeng Cc: Ray Ni Cc: Laszlo Ersek Cc: Rahul Kumar Cc: Gerd Hoffmann --- UefiCpuPkg/Library/CpuPageTableLib

[edk2-devel] [PATCH] UefiCpuPkg: Fix IN OUT parameters marked as IN

2024-02-21 Thread Zhou Jianfeng
Some IN OUT parameters in CpuPageTableMap.c were mistakenly marked as IN. "IN" replaced with "IN OUT" in the following interfaces: PageTableLibSetPte4K(): Pte4K PageTableLibSetPleB(): PleB PageTableLibSetPle(): Ple PageTableLibSetPnle(): Pnle Signed-off-by: Zhou Jian

Re: [edk2-devel] [PATCH] UefiCpuPkg: add volatile qualifier to page table related variable

2024-02-23 Thread Zhou, Jianfeng
rmance is acceptable. > IN OUT volatile IA32_PAGE_NON_LEAF_ENTRY *Pnle > and similar. Then the existent assignment expressions > Pnle->Uint64 = LocalPnle.Uint64; > don't have to be changed. agree that such improvement would have the same effect, and the code would be a little more gra

[edk2-devel] [PATCH v2] UefiCpuPkg/CpuPageTableLib: Fix IN OUT parameters marked as IN

2024-02-23 Thread Zhou Jianfeng
Some IN OUT parameters in CpuPageTableMap.c were mistakenly marked as IN. "IN" replaced with "IN OUT" in the following interfaces: PageTableLibSetPte4K(): Pte4K PageTableLibSetPleB(): PleB PageTableLibSetPle(): Ple PageTableLibSetPnle(): Pnle Reviewed-by: Ray Ni Signed-o

[edk2-devel] [PATCH] UefiCpuPkg/CpuPageTableLib: qualify page table accesses as volatile

2024-02-23 Thread Zhou Jianfeng
Add volatile qualifier to page table related variable to prevent compiler from optimizing away the variables which may lead to unexpected result. Signed-off-by: Zhou Jianfeng Cc: Ray Ni Cc: Laszlo Ersek Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Pedro Falcato Cc: Zhang Di Cc: Tan Dun

Re: [edk2-devel] [PATCH] UefiCpuPkg/CpuPageTableLib: qualify page table accesses as volatile

2024-02-25 Thread Zhou, Jianfeng
eax, 0x1 or [rcx], eax Thanks & Regards, Zhou Jianfeng -Original Message- From: Michael Brown Sent: Friday, February 23, 2024 7:59 PM To: devel@edk2.groups.io; Zhou, Jianfeng Cc: Ni, Ray ; Laszlo Ersek ; Kumar, Rahul R ; Gerd Hoffmann ; Pedro Falcato ; Zhang, Di ; Tan,

[edk2-devel] [PATCH] UefiCpuPkg/CpuPageTableLib: qualify page table accesses as volatile

2024-03-01 Thread Zhou Jianfeng
Add volatile qualifier to page table related variable to prevent compiler from optimizing away the variables which may lead to unexpected result. Signed-off-by: Zhou Jianfeng Cc: Ray Ni Cc: Laszlo Ersek Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Pedro Falcato Cc: Zhang Di Cc: Tan Dun Cc