Re: [Qemu-devel] [PATCH v4] monitor: let cur_mon be per-thread

2018-07-19 Thread Markus Armbruster
Peter Xu writes: > On Thu, Jul 19, 2018 at 02:14:56PM +0200, Markus Armbruster wrote: [...] >> Here's my try: >> >> monitor: Fix unsafe sharing of @cur_mon among threads >> >> @cur_mon is null unless the main thread is running monitor code, either >> HMP code within monitor_read(),

Re: [Qemu-devel] [PATCH v4] monitor: let cur_mon be per-thread

2018-07-19 Thread Peter Xu
On Thu, Jul 19, 2018 at 02:14:56PM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > On Thu, Jul 19, 2018 at 11:05:34AM +0200, Markus Armbruster wrote: > >> Peter Xu writes: > >> > >> > On Thu, Jul 19, 2018 at 09:20:34AM +0200, Markus Armbruster wrote: > >> >> Peter Xu writes: > >> >>

Re: [Qemu-devel] [PATCH v4] monitor: let cur_mon be per-thread

2018-07-19 Thread Markus Armbruster
Peter Xu writes: > On Thu, Jul 19, 2018 at 11:05:34AM +0200, Markus Armbruster wrote: >> Peter Xu writes: >> >> > On Thu, Jul 19, 2018 at 09:20:34AM +0200, Markus Armbruster wrote: >> >> Peter Xu writes: >> >> >> >> > On Wed, Jul 18, 2018 at 05:38:11PM +0200, Markus Armbruster wrote: >> >> >>

Re: [Qemu-devel] [PATCH v4] monitor: let cur_mon be per-thread

2018-07-19 Thread Peter Xu
On Thu, Jul 19, 2018 at 11:05:34AM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > On Thu, Jul 19, 2018 at 09:20:34AM +0200, Markus Armbruster wrote: > >> Peter Xu writes: > >> > >> > On Wed, Jul 18, 2018 at 05:38:11PM +0200, Markus Armbruster wrote: > >> >> Peter Xu writes: > >> >>

Re: [Qemu-devel] [PATCH v4] monitor: let cur_mon be per-thread

2018-07-19 Thread Markus Armbruster
Peter Xu writes: > On Thu, Jul 19, 2018 at 09:20:34AM +0200, Markus Armbruster wrote: >> Peter Xu writes: >> >> > On Wed, Jul 18, 2018 at 05:38:11PM +0200, Markus Armbruster wrote: >> >> Peter Xu writes: >> >> >> >> > After the Out-Of-Band work, the monitor iothread may be accessing the >> >>

Re: [Qemu-devel] [PATCH v4] monitor: let cur_mon be per-thread

2018-07-19 Thread Peter Xu
On Thu, Jul 19, 2018 at 09:20:34AM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > On Wed, Jul 18, 2018 at 05:38:11PM +0200, Markus Armbruster wrote: > >> Peter Xu writes: > >> > >> > After the Out-Of-Band work, the monitor iothread may be accessing the > >> > cur_mon as well (via moni

Re: [Qemu-devel] [PATCH v4] monitor: let cur_mon be per-thread

2018-07-19 Thread Markus Armbruster
Peter Xu writes: > On Wed, Jul 18, 2018 at 05:38:11PM +0200, Markus Armbruster wrote: >> Peter Xu writes: >> >> > After the Out-Of-Band work, the monitor iothread may be accessing the >> > cur_mon as well (via monitor_qmp_dispatch_one()). Let's convert the >> > cur_mon variable to be a per-thr

Re: [Qemu-devel] [PATCH v4] monitor: let cur_mon be per-thread

2018-07-18 Thread Peter Xu
On Wed, Jul 18, 2018 at 05:38:11PM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > After the Out-Of-Band work, the monitor iothread may be accessing the > > cur_mon as well (via monitor_qmp_dispatch_one()). Let's convert the > > cur_mon variable to be a per-thread variable to make sure

Re: [Qemu-devel] [PATCH v4] monitor: let cur_mon be per-thread

2018-07-18 Thread Markus Armbruster
Peter Xu writes: > After the Out-Of-Band work, the monitor iothread may be accessing the > cur_mon as well (via monitor_qmp_dispatch_one()). Let's convert the > cur_mon variable to be a per-thread variable to make sure there won't be > a race between threads when accessing the variable. Hmm...

Re: [Qemu-devel] [PATCH v4] monitor: let cur_mon be per-thread

2018-06-20 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. N/A. Internal error while reading log file --- Email generated automatically by Patchew [http://patchew.org/]. Please send your feedback to patchew-de...@redhat.com

[Qemu-devel] [PATCH v4] monitor: let cur_mon be per-thread

2018-06-20 Thread Peter Xu
After the Out-Of-Band work, the monitor iothread may be accessing the cur_mon as well (via monitor_qmp_dispatch_one()). Let's convert the cur_mon variable to be a per-thread variable to make sure there won't be a race between threads when accessing the variable. Note that thread variables are not