Re: [PATCH 1/2] qemu: agent: sync once if qemu has serial port event

2020-03-12 Thread Michal Privoznik
On 3/11/20 12:12 PM, Nikolay Shirokovskiy wrote: On 11.03.2020 12:38, Michal Privoznik wrote: On 3/5/20 3:47 PM, Nikolay Shirokovskiy wrote: Sync was introduced in [1] to check for ga presence. This check is racy but in the era before serial events are available there was not better solution

Re: [PATCH 1/2] qemu: agent: sync once if qemu has serial port event

2020-03-11 Thread Nikolay Shirokovskiy
On 11.03.2020 12:38, Michal Privoznik wrote: > On 3/5/20 3:47 PM, Nikolay Shirokovskiy wrote: >> Sync was introduced in [1] to check for ga presence. This >> check is racy but in the era before serial events are available >> there was not better solution I guess. > > Can you elaborate more on t

Re: [PATCH 1/2] qemu: agent: sync once if qemu has serial port event

2020-03-11 Thread Michal Privoznik
On 3/5/20 3:47 PM, Nikolay Shirokovskiy wrote: Sync was introduced in [1] to check for ga presence. This check is racy but in the era before serial events are available there was not better solution I guess. Can you elaborate more on the raciness? There should never be more than one thread tal

[PATCH 1/2] qemu: agent: sync once if qemu has serial port event

2020-03-05 Thread Nikolay Shirokovskiy
Sync was introduced in [1] to check for ga presence. This check is racy but in the era before serial events are available there was not better solution I guess. In case we have the events the sync function is different. It allows us to flush stateless ga channel from remnants of previous communica