Re: [PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-05-24 Thread Emilio G. Cota
Hi Alex, On Tue, May 12, 2020 at 21:11:46 +0100, Alex Bennée wrote: > > Emilio G. Cota writes: > > > On Mon, May 11, 2020 at 18:53:19 +0300, Nikolay Igotti wrote: > >> Attached to the mail counter.c when running with attached test.c compiled > >> to Linux standalone binary shows failing assert,

Re: [PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-05-12 Thread Alex Bennée
Emilio G. Cota writes: > On Mon, May 11, 2020 at 18:53:19 +0300, Nikolay Igotti wrote: >> Attached to the mail counter.c when running with attached test.c compiled >> to Linux standalone binary shows failing assert, unless the patch is >> applied. > > I didn't get the attachment. Can you paste

Re: [PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-05-12 Thread Alex Bennée
Nikolay Igotti writes: > --- counter.c > > #include > #include > #include > #include > #include > #include > > #include > > #include > > QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; > > // Files with descriptors after this one are intercepted for instruction > count

Re: [PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-05-12 Thread Nikolay Igotti
--- counter.c #include #include #include #include #include #include #include #include QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; // Files with descriptors after this one are intercepted for instruction counting marks. #define CATCH_BASE 0xcafebabe static uint64_

Re: [PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-05-11 Thread Emilio G. Cota
On Mon, May 11, 2020 at 18:53:19 +0300, Nikolay Igotti wrote: > Attached to the mail counter.c when running with attached test.c compiled > to Linux standalone binary shows failing assert, unless the patch is > applied. I didn't get the attachment. Can you paste the code at the end of your reply?

Re: [PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-05-11 Thread Nikolay Igotti
Attached to the mail counter.c when running with attached test.c compiled to Linux standalone binary shows failing assert, unless the patch is applied. вс, 10 мая 2020 г. в 02:00, Emilio G. Cota : > On Mon, Apr 20, 2020 at 13:04:51 +0300, Nikolay Igotti wrote: > > In linux-user multithreaded scen

Re: [PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-05-09 Thread Emilio G. Cota
On Mon, Apr 20, 2020 at 13:04:51 +0300, Nikolay Igotti wrote: > In linux-user multithreaded scenarious CPU could be inited many times with > the same id, > so avoid assertions on already present hashtable entry. > > Signed-off-by: Nikolay Igotti > --- > plugins/core.c | 5 + > 1 file changed

Re: [PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-04-20 Thread Nikolay Igotti
Sure, attached plugin and testcase where it fails. On Mon, Apr 20, 2020 at 6:08 PM Alex Bennée wrote: > > Peter Maydell writes: > > > On Mon, 20 Apr 2020 at 10:16, Nikolay Igotti wrote: > >> > >> In linux-user multithreaded scenarious CPU could be inited many times > with the same id, > >> >

Re: [PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-04-20 Thread Alex Bennée
Peter Maydell writes: > On Mon, 20 Apr 2020 at 10:16, Nikolay Igotti wrote: >> >> In linux-user multithreaded scenarious CPU could be inited many times with >> the same id, >> >> so avoid assertions on already present hashtable entry. >> >> >> Signed-off-by: Nikolay Igotti > > Wouldn't it be

Re: [PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-04-20 Thread Peter Maydell
On Mon, 20 Apr 2020 at 11:18, Nikolay Igotti wrote: > > Maybe, I've tried least intrusive change as not entirely familiar with plugin > login in QEMU. Me neither, but having the hashtable continuing to contain stale information about a CPU that's gone away seems like it might cause problems some

Re: [PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-04-20 Thread Nikolay Igotti
Maybe, I've tried least intrusive change as not entirely familiar with plugin login in QEMU. On Mon, Apr 20, 2020 at 1:11 PM Peter Maydell wrote: > On Mon, 20 Apr 2020 at 10:16, Nikolay Igotti wrote: > > > > In linux-user multithreaded scenarious CPU could be inited many times > with the same i

Re: [PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-04-20 Thread Peter Maydell
On Mon, 20 Apr 2020 at 10:16, Nikolay Igotti wrote: > > In linux-user multithreaded scenarious CPU could be inited many times with > the same id, > > so avoid assertions on already present hashtable entry. > > > Signed-off-by: Nikolay Igotti Wouldn't it be better to make sure we remove the entr

Re: [PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-04-20 Thread Nikolay Igotti
OK, maybe this version will work better (gmail web interface may be not the best one for sending patches): In linux-user multithreaded scenarious CPU could be inited many times with the same id, so avoid assertions on already present hashtable entry. Signed-off-by: Nikolay Igotti --- plugi

Re: [PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-04-20 Thread Laurent Vivier
Nikolay, the patch seems corrupted by your mailer. CC: Alex and Emilio as this code is theirs. Thanks, Laurent Le 20/04/2020 à 11:15, Nikolay Igotti a écrit : > In linux-user multithreaded scenarious CPU could be inited many times > with the same id, > > so avoid assertions on already present

[PATCH 3/3] plugins: avoid failing plugin when CPU is inited several times

2020-04-20 Thread Nikolay Igotti
In linux-user multithreaded scenarious CPU could be inited many times with the same id, so avoid assertions on already present hashtable entry. Signed-off-by: Nikolay Igotti --- plugins/core.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/core.c b/plugins/