Re: [edk2-devel] [PATCH 0/6] Fix race condition and add event protocol

2019-06-13 Thread Liming Gao
n Brogan > ; Michael Turner > ; Bret Barkelew ; > Kinney, Michael D ; > Dong, Eric ; Laszlo Ersek ; Andrew > Fish (af...@apple.com) > Subject: RE: [edk2-devel] [PATCH 0/6] Fix race condition and add event > protocol > > I think there is a bigger problem with the idle ev

Re: [edk2-devel] [PATCH 0/6] Fix race condition and add event protocol

2019-05-24 Thread Felix Polyudov
y; Eric Dong; Laszlo Ersek Subject: [edk2-devel] [PATCH 0/6] Fix race condition and add event protocol There is a race condition in CoreWaitForEvent function: If an interrupt happens between CheckEvent and gIdleLoopEvent, there would be a event pending during cpu sleep. So it is required

Re: [edk2-devel] [PATCH 0/6] Fix race condition and add event protocol

2019-05-24 Thread Laszlo Ersek
On 05/24/19 07:04, Gao, Zhichao wrote: > There is a race condition in CoreWaitForEvent function: > If an interrupt happens between CheckEvent and gIdleLoopEvent, > there would be a event pending during cpu sleep. > So it is required to check the gEventPending with the interrupt > disabled. >

Re: [edk2-devel] [PATCH 0/6] Fix race condition and add event protocol

2019-05-24 Thread Gao, Zhichao
Sorry I didn't add the BZ link. https://bugzilla.tianocore.org/show_bug.cgi?id=1400 "If an interrupt happens between CheckEvent and gIdleLoopEvent, there would be a event pending during cpu sleep." Here is the wait for event flow: Result = CheckEvent (interrupt happens here, and set the

Re: [edk2-devel] [PATCH 0/6] Fix race condition and add event protocol

2019-05-23 Thread Ni, Ray
Zhichao, Did your detailed patch commit message describe the consequence of the race condition? (I haven't checked.) If no, could you please describe in detail about the consequence? Thanks, Ray > -Original Message- > From: Gao, Zhichao > Sent: Friday, May 24, 2019 1:05 PM > To:

[edk2-devel] [PATCH 0/6] Fix race condition and add event protocol

2019-05-23 Thread Gao, Zhichao
There is a race condition in CoreWaitForEvent function: If an interrupt happens between CheckEvent and gIdleLoopEvent, there would be a event pending during cpu sleep. So it is required to check the gEventPending with the interrupt disabled. Implement a gEfiCpu2ProtocolGuid to fix that. The