several patches around Linux userland emulator

2020-04-19 Thread Nikolay Igotti
Hi, Attached 3 relatively trivial patches helping with running userland Linux emulation. Best regards, Nikolay 0001-plugins-avoid-failing-plugin-when-CPU-is-inited-seve.patch Description: Binary data 0001-linux-user-fix-page-table-trashing-when-mmap-munmap-.patch Description: Binary

[PATCH 1/3] linux-user: fix page table trashing when mmap/munmap called frequently on large regions

2020-04-20 Thread Nikolay Igotti
try to reuse VMA, when possible. Signed-off-by: Nikolay Igotti --- linux-user/mmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index e378033797..c1d6163d7a 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -650,6 +650,8 @@ int

[PATCH 2/3] linux-user: strace: better format mmap logs, support mremap

2020-04-20 Thread Nikolay Igotti
On 64-bit platforms strace entries were not properly formatted, also some addresses were printed as integers. Also mremap syscall support is added. Signed-off-by: Nikolay Igotti --- linux-user/strace.c| 31 +++ linux-user/strace.list | 2 +- 2 files changed, 28

[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

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

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 t

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 ini

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 mult

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

2020-05-12 Thread Nikolay Igotti
create(threads + i, NULL, thread_fn, arg); } start_counting(); for (i = 0; i < repeat; i++) { global += i; } end_counting(); for (i = 0; i < THREAD_NUM; i++) { pthread_join(threads[i], NULL); } return 0; } On Tue, May 12, 2020 at 3:55 A

Re: [PATCH v1 7/8] tests/tcg: add new threadcount test

2020-05-15 Thread Nikolay Igotti
Sure, use it for anything. ср, 13 мая 2020 г. в 20:32, Alex Bennée : > Based on the original testcase by Nikolay Igotti. > > Message-ID: wkhow2xg+zhv...@mail.gmail.com> > Cc: Nikolay Igotti > [Nikolay can we have your signed of by to add the testcase?] > Signe