Re: [edk2-devel] [PATCH v3 3/6] UefiCpuPkg: Implements SmmCpuSyncLib library instance

2023-12-14 Thread Wu, Jiaxin
, Rahul R > > Subject: RE: [edk2-devel] [PATCH v3 3/6] UefiCpuPkg: Implements > SmmCpuSyncLib library instance > > BTW, for SmmCpuSyncGetArrivedCpuCount (): > > we can't check the CpuCount (Original is named as Counter Sem) is locked or > not, then decide return from the *

Re: [edk2-devel] [PATCH v3 3/6] UefiCpuPkg: Implements SmmCpuSyncLib library instance

2023-12-14 Thread Wu, Jiaxin
; -Original Message- > From: Wu, Jiaxin > Sent: Thursday, December 14, 2023 11:35 PM > To: devel@edk2.groups.io; ler...@redhat.com > Cc: Dong, Eric ; Ni, Ray ; Zeng, Star > ; Gerd Hoffmann ; Kumar, Rahul R > > Subject: RE: [edk2-devel] [PATCH v3 3/6] UefiCpuPkg:

Re: [edk2-devel] [PATCH v3 3/6] UefiCpuPkg: Implements SmmCpuSyncLib library instance

2023-12-14 Thread Wu, Jiaxin
BTW, for SmmCpuSyncGetArrivedCpuCount (): we can't check the CpuCount (Original is named as Counter Sem) is locked or not, then decide return from the *Context->CpuCount or locked value for the arrived CPU in SMI. Just like: if (*Context->CpuCount == MAX_UINT32) {--> does not meet t

Re: [edk2-devel] [PATCH v3 3/6] UefiCpuPkg: Implements SmmCpuSyncLib library instance

2023-12-14 Thread Wu, Jiaxin
> > The code will be changed to: > > > > if ((INT32)InternalWaitForSemaphore (Context->CpuCount) < 0) { > > return RETURN_ABORTED; > > } > > I find this quite ugly. In the "semaphore post" operation, we already > have code that prevents incrementing if the semaphore is "locked". Can > we p

Re: [edk2-devel] [PATCH v3 3/6] UefiCpuPkg: Implements SmmCpuSyncLib library instance

2023-12-14 Thread Laszlo Ersek
On 12/14/23 12:11, Wu, Jiaxin wrote: > Hi Laszlo, > > Really appreciate your comments! I checked one by one and feedback as below, > thank you & Ray again & again for patch refinement > > >> >> (1) If / when you update the documentation in patch#2, please update >> this one as well. >> > >

Re: [edk2-devel] [PATCH v3 3/6] UefiCpuPkg: Implements SmmCpuSyncLib library instance

2023-12-14 Thread Wu, Jiaxin
Hi Laszlo, Really appreciate your comments! I checked one by one and feedback as below, thank you & Ray again & again for patch refinement > > (1) If / when you update the documentation in patch#2, please update > this one as well. > Yes, I will do the alignment. > (2) Please sort the #

Re: [edk2-devel] [PATCH v3 3/6] UefiCpuPkg: Implements SmmCpuSyncLib library instance

2023-12-13 Thread Laszlo Ersek
On 12/6/23 11:01, Wu, Jiaxin wrote: > Implements SmmCpuSyncLib Library instance. The instance refers the > existing SMM CPU driver (PiSmmCpuDxeSmm) sync implementation > and behavior: > 1.Abstract Counter and Run semaphores into SmmCpuSyncCtx. > 2.Abstract CPU arrival count operation to > SmmCpuSyn

[edk2-devel] [PATCH v3 3/6] UefiCpuPkg: Implements SmmCpuSyncLib library instance

2023-12-06 Thread Wu, Jiaxin
Implements SmmCpuSyncLib Library instance. The instance refers the existing SMM CPU driver (PiSmmCpuDxeSmm) sync implementation and behavior: 1.Abstract Counter and Run semaphores into SmmCpuSyncCtx. 2.Abstract CPU arrival count operation to SmmCpuSyncGetArrivedCpuCount(), SmmCpuSyncCheckInCpu(), S