[Bug 1735049] Re: Need MTTCG support for x86 guests

2022-03-06 Thread Emilio G. Cota
OK, looks like I cannot reopen the bug, probably because the bug tracker moved to gitlab. If you care about this feature, please file a bug over there: https://gitlab.com/qemu-project/qemu/-/issues -- You received this bug notification because you are a member of qemu- devel-ml, which is

[Bug 1735049] Re: Need MTTCG support for x86 guests

2022-03-06 Thread Emilio G. Cota
Looks like support for this was not fully added; my apologies for closing this bug too early. Adding full support for strong-on-weak emulation would be simple, at least when it comes to memory ordering. The slowdown would be huge though, see Figure 12 in

Re: [PATCH v2 06/11] cputlb: ensure we save the IOTLB data in case of reset

2020-07-18 Thread Emilio G. Cota
eed a seqlock to avoid races between readers and the writing vCPU. I see that qemu_plugin_get_hwaddr does not even take a vCPU index, so this should be OK -- as long as this is called only from a mem callback, it's in the same vCPU thread and it's therefore safe. With the above comments fixed, Reviewed-by: Emilio G. Cota Thanks, Emilio

Re: [PATCH v1 08/13] plugins: expand the bb plugin to be thread safe and track per-cpu

2020-07-11 Thread Emilio G. Cota
On Thu, Jul 09, 2020 at 15:13:22 +0100, Alex Bennée wrote: > While there isn't any easy way to make the inline counts thread safe Why not? At least in 64-bit hosts TCG will emit a single write to update the 64-bit counter. > we can ensure the callback based ones are. While we are at it we can >

Re: [PATCH v1 04/13] cputlb: ensure we save the IOTLB data in case of reset

2020-07-11 Thread Emilio G. Cota
On Fri, Jul 10, 2020 at 14:03:27 -0700, Richard Henderson wrote: > On 7/9/20 7:13 AM, Alex Bennée wrote: > > Any write to a device might cause a re-arrangement of memory > > triggering a TLB flush and potential re-size of the TLB invalidating > > previous entries. This would cause users of

Re: [PATCH v1 04/13] cputlb: ensure we save the IOTLB data in case of reset

2020-07-11 Thread Emilio G. Cota
the warning: > > invalid use of qemu_plugin_get_hwaddr > > because of the failed tlb_lookup which should always succeed. To > prevent this we save the IOTLB data in case it is later needed by a > plugin doing a lookup. > > Signed-off-by: Alex Bennée Reviewed-by: Emilio

Re: [PATCH v1 02/13] docs/devel: add some notes on tcg-icount for developers

2020-07-11 Thread Emilio G. Cota
On Thu, Jul 09, 2020 at 15:13:16 +0100, Alex Bennée wrote: > This attempts to bring together my understanding of the requirements > for icount behaviour into one reference document for our developer > notes. > > Signed-off-by: Alex Bennée > Reviewed-by: Richard Henderson Rev

Re: [PATCH v1 01/13] docs/devel: convert and update MTTCG design document

2020-07-11 Thread Emilio G. Cota
On Thu, Jul 09, 2020 at 15:13:15 +0100, Alex Bennée wrote: > @@ -92,6 +107,7 @@ including: > >- debugging operations (breakpoint insertion/removal) >- some CPU helper functions > + - linux-user spawning it's first thread s/it's/its/ Reviewed-by: Emilio G

[Bug 1885827] Re: building plugin failed on Windows with mingw

2020-07-08 Thread Emilio G. Cota
You should then find out why libqemu_plugin.dll.a is not working. It is possible though that your linked is calling the import library something else, for instance adding a .dll extension to it. You will have to run a few tests with your linker (I'd just use the examples from the stackoverflow

[Bug 1885827] Re: building plugin failed on Windows with mingw

2020-07-06 Thread Emilio G. Cota
You're getting close. 1. From the build directory, find the import library created, e.g. `find . -name 'libqemu_plugin.dll.a'`. If you're building x86_64-linux-user, it should be in `x86_64-linux-user/libqemu_plugin.dll.a`. 2. Go back to the `build/tests/plugin` directory. 3. Link the empty

[Bug 1885827] Re: building plugin failed on Windows with mingw

2020-07-04 Thread Emilio G. Cota
Xiaolei confirmed to me via email that adding -DBUILDING_DLL is not enough to fix the problem. I looked into this a bit further and it looks like we need an "import library" to be created when compiling the QEMU binary. This is accomplished by adding "-Wl,--out-implib,libqemu_plugin.a" to the

[Bug 1885827] Re: building plugin failed on Windows with mingw

2020-07-03 Thread Emilio G. Cota
I never built the plugin code on anything other than Linux :( All I did for Windows is to try to follow https://gcc.gnu.org/wiki/Visibility Can you please try the following patch (with no other changes)? The patch applies on top of v4.2.0. diff --git a/tests/plugin/Makefile

Re: [PATCH v2 0/2] tests/qht-bench: Adjust rate/threshold computation

2020-06-27 Thread Emilio G. Cota
expanded the comment > in do_threshold. Reviewed-by: Emilio G. Cota for the series. Thanks a lot! E.

Re: [PATCH] tests/qht-bench: Adjust rate computation and comparisons

2020-06-22 Thread Emilio G. Cota
Cc'ing Philippe, who authored the fix for this in May as I mention below. Emilio On Sun, Jun 21, 2020 at 17:28:25 -0400, Emilio G. Cota wrote: > On Sat, Jun 20, 2020 at 14:45:51 -0700, Richard Henderson wrote: > > Use <= comparisons vs the threshold, so that threshol

Re: [PATCH v2 3/6] cputlb: ensure we save the IOTLB data in case of reset

2020-06-22 Thread Emilio G. Cota
On Mon, Jun 22, 2020 at 10:02:50 +0100, Alex Bennée wrote: > Emilio G. Cota writes: > > On Wed, Jun 10, 2020 at 16:55:06 +0100, Alex Bennée wrote: (snip) > >> +#ifdef CONFIG_PLUGIN > >> + > >> +typedef struct SavedIOTLB { > >> +struct rcu_hea

Re: [PATCH] tests/qht-bench: Adjust rate computation and comparisons

2020-06-21 Thread Emilio G. Cota
On Sat, Jun 20, 2020 at 14:45:51 -0700, Richard Henderson wrote: > Use <= comparisons vs the threshold, so that threshold UINT64_MAX > is always true, corresponding to rate 1.0 being unity. Simplify > do_threshold scaling to 2**64, with a special case for 1.0. > > Cc: Emilio

Re: [PATCH v2 3/6] cputlb: ensure we save the IOTLB data in case of reset

2020-06-21 Thread Emilio G. Cota
On Wed, Jun 10, 2020 at 16:55:06 +0100, Alex Bennée wrote: > Any write to a device might cause a re-arrangement of memory > triggering a TLB flush and potential re-size of the TLB invalidating > previous entries. This would cause users of qemu_plugin_get_hwaddr() > to see the warning: > >

Re: [PATCH v1 7/9] plugins: add API to return a name for a IO device

2020-06-09 Thread Emilio G. Cota
On Tue, Jun 09, 2020 at 12:09:54 +0100, Alex Bennée wrote: > How about a g_intern_string() as a non-freeable const char that can also > be treated as canonical? I like it. Didn't know about g_intern_string (I see it's implemented as an append-only hash table protected by a lock). Cheers,

Re: [PATCH v1 7/9] plugins: add API to return a name for a IO device

2020-06-08 Thread Emilio G. Cota
On Mon, Jun 08, 2020 at 09:06:17 +0100, Alex Bennée wrote: > Emilio G. Cota writes: > > I'd rather use asprintf(3) and strdup(3) here, so that plugins don't > > have to worry about glib, and on the QEMU side we don't have to worry > > about plugins calling free() instead of

Re: [PATCH v2 13/13] tests: Disable select tests under TSan, which hit TSan issue.

2020-06-07 Thread Emilio G. Cota
> the test-char, test-qga, and test-qdev-global-props. > > Signed-off-by: Robert Foley Reviewed-by: Emilio G. Cota Thanks, Emilio

Re: [PATCH v1 7/9] plugins: add API to return a name for a IO device

2020-06-07 Thread Emilio G. Cota
On Tue, Jun 02, 2020 at 16:46:22 +0100, Alex Bennée wrote: > This may well end up being anonymous but it should always be unique. > > Signed-off-by: Alex Bennée > --- > include/qemu/qemu-plugin.h | 5 + > plugins/api.c | 18 ++ > 2 files changed, 23

Re: [PATCH v1 11/12] util: Added tsan annotate for thread name.

2020-05-31 Thread Emilio G. Cota
On Fri, May 29, 2020 at 09:23:41 -0400, Robert Foley wrote: > This allows us to see the name of the thread in tsan > warning reports such as this: > > Thread T7 'CPU 1/TCG' (tid=24317, running) created by main thread at: > > Signed-off-by: Robert Foley Reviewed-by: Emili

Re: [PATCH] scripts/clean-includes: Mark 'qemu/qemu-plugin.h' as special header

2020-05-24 Thread Emilio G. Cota
quot;qemu/qemu-plugin.h" as a special header that doesn't need > to be cleaned for "qemu/osdep.h". > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Emilio G. Cota Thanks, Emilio

[PATCH] qemu-plugin.h: add missing include to define size_t

2020-05-24 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- include/qemu/qemu-plugin.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 89ed579f55..bab8b0d4b3 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -12,6 +12,7

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 stand

Re: [PATCH 10/19] include/qemu: Added tsan.h for annotations.

2020-05-23 Thread Emilio G. Cota
On Sat, May 23, 2020 at 13:20:15 -0400, Emilio G. Cota wrote: > On Fri, May 22, 2020 at 12:07:46 -0400, Robert Foley wrote: > > These annotations will allow us to give tsan > > additional hints. For example, we can inform > > tsan about reads/writes to ignore to silenc

Re: [PATCH 00/19] Add Thread Sanitizer support to QEMU

2020-05-23 Thread Emilio G. Cota
On Fri, May 22, 2020 at 12:07:36 -0400, Robert Foley wrote: > This patch series continues the work done by Emilio Cota and others to add > Thread Sanitizer (TSan) support to QEMU. > > The starting point for this work was Emilio's branch here: > https://github.com/cota/qemu/commits/tsan >

Re: [PATCH 15/19] qht: Fix tsan warnings.

2020-05-23 Thread Emilio G. Cota
On Fri, May 22, 2020 at 12:07:51 -0400, Robert Foley wrote: > For example: > WARNING: ThreadSanitizer: data race (pid=23406) > Atomic read of size 4 at 0x7b13e3c8 by thread T7: > #0 __tsan_atomic32_load (qemu-system-aarch64+0x39a36c) > #1 qht_do_lookup util/qht.c:495:17

Re: [PATCH 19/19] docs: Added details on TSan to testing.rst

2020-05-23 Thread Emilio G. Cota
On Fri, May 22, 2020 at 12:07:55 -0400, Robert Foley wrote: > This includes details on how to build and test with TSan > both inside a docker and outside. > > Signed-off-by: Robert Foley Reviewed-by: Emilio G. Cota E.

Re: [PATCH 17/19] util: Added tsan annotate for thread name.

2020-05-23 Thread Emilio G. Cota
On Fri, May 22, 2020 at 12:07:53 -0400, Robert Foley wrote: > This allows us to see the name of the thread in tsan > warning reports such as this: > > Thread T7 'CPU 1/TCG' (tid=24317, running) created by main thread at: > > Signed-off-by: Robert Foley Reviewed-

Re: [PATCH 14/19] util/async: Fixed tsan warnings

2020-05-23 Thread Emilio G. Cota
On Fri, May 22, 2020 at 12:07:50 -0400, Robert Foley wrote: > For example: > Atomic write of size 8 at 0x7b4800113c28 by main thread (mutexes: write > M30): > #0 __tsan_atomic64_exchange (qemu-system-aarch64+0x386f85) > #1 aio_bh_poll util/async.c:146:5 (qemu-system-aarch64+0xcd1f61) >

Re: [PATCH 13/19] accel/tcg: Fixed tsan warnings.

2020-05-23 Thread Emilio G. Cota
On Fri, May 22, 2020 at 12:07:49 -0400, Robert Foley wrote: > For example: > WARNING: ThreadSanitizer: data race (pid=35425) > Write of size 4 at 0x7bbc00ac by main thread (mutexes: write M875): > #0 cpu_reset_interrupt hw/core/cpu.c:107:28 (qemu-system-aarch64+0x843790) > #1

Re: [PATCH 12/19] configure: added tsan support for blacklist.

2020-05-23 Thread Emilio G. Cota
On Fri, May 22, 2020 at 12:07:48 -0400, Robert Foley wrote: > Initially put several files into blacklist that were > causing the most problems, namely bitops.c and bitmap.c. > > Signed-off-by: Robert Foley > --- > configure | 3 ++- > tests/tsan/blacklist.tsan | 5 + > 2

Re: [PATCH 11/19] accel/tcg: Fixed tsan warnings related to parallel_cpus

2020-05-23 Thread Emilio G. Cota
#2 qemu_thread_start util/qemu-thread-posix.c:519:9 > (qemu-system-aarch64+0xd431e0) > > Location is global 'parallel_cpus' of size 1 at 0x557cd83aee28 > (qemu-system-aarch64+0x01fb3e28) > > Cc: Richard Henderson > Cc: Paolo Bonzini > Signed-off-by: Robert Foley Reviewed-by: Emilio G. Cota E.

Re: [PATCH 10/19] include/qemu: Added tsan.h for annotations.

2020-05-23 Thread Emilio G. Cota
thread > naming shows up in tsan warning results. > > Signed-off-by: Robert Foley Reviewed-by: Emilio G. Cota E.

Re: [PATCH 18/19] target/arm: Fix tsan warning in cpu.c

2020-05-23 Thread Emilio G. Cota
On Fri, May 22, 2020 at 23:36:18 +0100, Peter Maydell wrote: > So is this: > (a) a TSan false positive, because we've analysed the use > of this struct field and know it's not a race because > [details], but which we're choosing to silence in this way > (b) an actual race for which the

Re: [PATCH v8 74/74] cputlb: queue async flush jobs without the BQL

2020-05-19 Thread Emilio G. Cota
On Mon, May 18, 2020 at 09:46:36 -0400, Robert Foley wrote: > We re-ran the numbers with the latest re-based series. > > We used an aarch64 ubuntu VM image with a host CPU: > Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz, 2 CPUs, 10 cores/CPU, > 20 Threads/CPU. 40 cores total. > > For the bare

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 0/3] plugins: Move declarations around and rename 'hwaddr' argument

2020-05-10 Thread Emilio G. Cota
; "exec/cpu: Poison 'hwaddr' type in user-mode emulation" > > Philippe Mathieu-Daudé (3): > qemu/plugin: Trivial code movement > qemu/plugin: Move !CONFIG_PLUGIN stubs altogether > qemu/qemu-plugin: Make qemu_plugin_hwaddr_is_io() hwaddr argument > const

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

Re: [PATCH v3] tests/qht-bench: Fix Clang 'implicit-int-float-conversion' warning

2020-05-06 Thread Emilio G. Cota
ld = rate * nextafter(0x1p64, 0.0); Reviewed-by: Emilio G. Cota Please consider mentioning 25f74087c69 in the commit log -- it clearly describes the problem. Thanks, Emilio

Re: [PATCH v8 00/74] per-CPU locks

2020-03-26 Thread Emilio G. Cota
(Apologies if I missed some Cc's; I was not Cc'ed in patch 0 so I'm blindly crafting a reply.) On Thu, Mar 26, 2020 at 15:30:43 -0400, Robert Foley wrote: > This is a continuation of the series created by Emilio Cota. > We are picking up this patch set with the goal to apply > any fixes or

Re: [PATCH v2 17/19] tcg: save vaddr temp for plugin usage

2020-02-22 Thread Emilio G. Cota
itly copy vaddr > before the op to ensure it is live my the time we do the > instrumentation. s/my the time/by the time/ Reviewed-by: Emilio G. Cota E.

Re: [PATCH] testing: don't nest build for fp-test

2020-01-08 Thread Emilio G. Cota
parent build hasn't got the bits we need. > > Signed-off-by: Alex Bennée Reviewed-by: Emilio G. Cota E.

[PATCH] plugins/core: add missing break in cb_to_tcg_flags

2020-01-04 Thread Emilio G. Cota
Reported-by: Robert Henry Signed-off-by: Emilio G. Cota --- plugins/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/core.c b/plugins/core.c index 9e1b9e7a91..ed863011ba 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -286,6 +286,7 @@ static inline uint32_t cb_to_tcg_flags

Re: [Qemu-devel] [PATCH v5 00/15] demacro softmmu (plus tests/coverage)

2019-05-10 Thread Emilio G. Cota
On Fri, May 10, 2019 at 11:36:33 +0100, Alex Bennée wrote: > Ping Emilio/Mark > > Would you be able to re-run your tests to check there are no other > regressions? I can then get the PR prepared for merging ;-) I'll try to run some tests next week, but I am not sure I'll have time to do so. If I

[Qemu-devel] [PATCH v2 for-4.0] hardfloat: fix float32/64 fused multiply-add

2019-03-22 Thread Emilio G. Cota
MFlops - after: 178.49 MFlops 178.88 MFlops 178.66 MFlops Signed-off-by: Kito Cheng Signed-off-by: Emilio G. Cota --- fpu/softfloat.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 4610738ab1..2ba36ec370 100644 --- a/fpu

Re: [Qemu-devel] [PATCH] hardfloat: fix float32/64 fused multiply-add

2019-03-22 Thread Emilio G. Cota
On Sat, Mar 23, 2019 at 01:39:26 +0800, Kito Cheng wrote: > hardfloat fused multiply-add might fallback to softfloat mode in some > situation, but it might already changed the value of input operands, > so we must restore those value before fallback. > > This bug is catched by running gcc

Re: [Qemu-devel] 'make check' error

2019-03-09 Thread Emilio G. Cota
On Sat, Mar 09, 2019 at 13:53:32 +0800, Li Qiang wrote: > Hi all, > > Today I ‘git clone’ && configure && make && make check > > And get following error, > > fp-test.c:50:10: fatal error: fail.h: No such file or directory > #include "fail.h" > ^~~~ > > I look at the commit: >

Re: [Qemu-devel] x86 segment limits enforcement with TCG

2019-03-06 Thread Emilio G. Cota
On Thu, Feb 28, 2019 at 10:05:02 -0800, Richard Henderson wrote: > On 2/28/19 9:18 AM, Stephen Checkoway wrote: > > I wonder if it would make sense to maintain a small cache of TLBs. The > > majority of cases are likely to involving setting segment registers to one > > of a handful of segments

Re: [Qemu-devel] [PATCH v7 00/73] per-CPU locks

2019-03-06 Thread Emilio G. Cota
On Wed, Mar 06, 2019 at 11:40:57 -0800, Richard Henderson wrote: > Peter reported to me a hang on the x86_64 > bios-tables-test with an arm32 host. I have been able to replicate this. (snip) I reproduced this on a power7 machine (gcc110). However, after a few git checkout->build cycles I was not

Re: [Qemu-devel] [PULL 00/73] tcg: per-cpu locks

2019-03-05 Thread Emilio G. Cota
On Tue, Mar 05, 2019 at 16:01:45 +, Peter Maydell wrote: > On Tue, 5 Mar 2019 at 15:01, Richard Henderson > wrote: > > > > This is Emilio's v7, unchanged, so I'm not re-posting the 73 patches. > > > > I also didn't want to add Signed-off-by to 73 patches, so I verified > > that there was

[Qemu-devel] [PATCH v7 44/73] ppc: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Cc: David Gibson Cc: qemu-...@nongnu.org Reviewed-by: Richard Henderson Acked-by: David Gibson Signed-off-by: Emilio G. Cota --- hw/ppc/ppc.c| 2 +- target/ppc/kvm.c| 4 ++-- target/ppc/translate_init.inc.c | 14 +++--- 3 files changed, 10

[Qemu-devel] [PATCH v7 65/73] s390x: convert to cpu_has_work_with_iothread_lock

2019-03-04 Thread Emilio G. Cota
Soon we will call cpu_has_work without the BQL. Cc: Cornelia Huck Cc: David Hildenbrand Cc: qemu-s3...@nongnu.org Reviewed-by: Richard Henderson Reviewed-by: Cornelia Huck Signed-off-by: Emilio G. Cota --- target/s390x/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PATCH v7 57/73] unicore32: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Cc: Guan Xuetao Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/unicore32/cpu.c | 2 +- target/unicore32/softmmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/unicore32/cpu.c b/target/unicore32/cpu.c index

[Qemu-devel] [PATCH v7 46/73] cris: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Cc: "Edgar E. Iglesias" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/cris/cpu.c| 2 +- target/cris/helper.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/cris/cpu.c b/target/cris/cpu.c index

[Qemu-devel] [PATCH v7 54/73] moxie: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Cc: Anthony Green Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/moxie/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/moxie/cpu.c b/target/moxie/cpu.c index 46434e65ba..72206a03ee 100644 --- a/target/moxie

[Qemu-devel] [PATCH v7 49/73] m68k: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Cc: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Laurent Vivier Signed-off-by: Emilio G. Cota --- target/m68k/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index 582e3a73b3..99a7eb4340 100644 --- a/target/m68k

[Qemu-devel] [PATCH v7 52/73] s390x: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Cc: Cornelia Huck Cc: Christian Borntraeger Cc: David Hildenbrand Cc: qemu-s3...@nongnu.org Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Cornelia Huck Signed-off-by: Emilio G. Cota --- hw/intc/s390_flic.c | 2 +- target/s390x/cpu.c | 2 +- 2 files changed, 2

[Qemu-devel] [PATCH v7 59/73] accel/tcg: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- accel/tcg/cpu-exec.c | 15 --- accel/tcg/tcg-all.c | 12 +--- accel/tcg/translate-all.c | 2 +- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/accel/tcg

[Qemu-devel] [PATCH v7 60/73] cpu: convert to interrupt_request

2019-03-04 Thread Emilio G. Cota
This finishes the conversion to interrupt_request. Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- qom/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qom/cpu.c b/qom/cpu.c index 00add81a7f..f2695be9b2 100644 --- a/qom

[Qemu-devel] [PATCH v7 71/73] cpus-common: release BQL earlier in run_on_cpu

2019-03-04 Thread Emilio G. Cota
After completing the conversion to per-CPU locks, there is no need to release the BQL after having called cpu_kick. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- cpus-common.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions

[Qemu-devel] [PATCH v7 45/73] sh4: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Cc: Aurelien Jarno Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/sh4/cpu.c| 2 +- target/sh4/helper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index b9f393b7c7..58ea212f53

[Qemu-devel] [PATCH v7 67/73] sparc: convert to cpu_has_work_with_iothread_lock

2019-03-04 Thread Emilio G. Cota
Soon we will call cpu_has_work without the BQL. Cc: Mark Cave-Ayland Cc: Artyom Tarasenko Reviewed-by: Richard Henderson Acked-by: Mark Cave-Ayland Signed-off-by: Emilio G. Cota --- target/sparc/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/sparc/cpu.c

[Qemu-devel] [PATCH v7 48/73] lm32: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Cc: Michael Walle Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/lm32/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/lm32/cpu.c b/target/lm32/cpu.c index b7499cb627..1508bb6199 100644 --- a/target/lm32/cpu.c

[Qemu-devel] [PATCH v7 40/73] i386/kvm: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/i386/kvm.c | 58 --- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index f2e187e40f..44a9e3d243

[Qemu-devel] [PATCH v7 51/73] nios: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Cc: Chris Wulff Cc: Marek Vasut Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/nios2/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c index fbfaa2ce26..49a75414d3 100644

[Qemu-devel] [PATCH v7 63/73] ppc: convert to cpu_has_work_with_iothread_lock

2019-03-04 Thread Emilio G. Cota
Soon we will call cpu_has_work without the BQL. Cc: David Gibson Cc: qemu-...@nongnu.org Reviewed-by: Richard Henderson Acked-by: David Gibson Signed-off-by: Emilio G. Cota --- target/ppc/translate_init.inc.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH v7 35/73] i386: use cpu_reset_interrupt

2019-03-04 Thread Emilio G. Cota
From: Paolo Bonzini Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/i386/hax-all.c| 4 ++-- target/i386/hvf/x86hvf.c | 8 target/i386/kvm.c| 14 +++--- target/i386/seg_helper.c | 13

[Qemu-devel] [PATCH v7 62/73] cpu: introduce cpu_has_work_with_iothread_lock

2019-03-04 Thread Emilio G. Cota
It will gain some users soon. Suggested-by: Paolo Bonzini Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 37 ++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/include/qom/cpu.h b

[Qemu-devel] [PATCH v7 58/73] microblaze: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Cc: "Edgar E. Iglesias" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/microblaze/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 5596cd5485..0cdd7fe

[Qemu-devel] [PATCH v7 39/73] i386: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/i386/cpu.c| 2 +- target/i386/helper.c | 4 ++-- target/i386/svm_helper.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c

[Qemu-devel] [PATCH v7 34/73] exec: use cpu_reset_interrupt

2019-03-04 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 518064530b..5ed64e274b 100644 --- a/exec.c +++ b/exec.c @@ -779,7 +779,7 @@ static int cpu_common_post_load

[Qemu-devel] [PATCH v7 69/73] cpu: rename all_cpu_threads_idle to qemu_tcg_rr_all_cpu_threads_idle

2019-03-04 Thread Emilio G. Cota
This function is only called from TCG rr mode, so add a prefix to mark this as well as an assertion. Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- cpus.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cpus.c b/cpus.c

[Qemu-devel] [PATCH v7 70/73] cpu: protect CPU state with cpu->lock instead of the BQL

2019-03-04 Thread Emilio G. Cota
off-by: Emilio G. Cota --- include/qom/cpu.h | 20 ++-- cpus.c| 281 ++ qom/cpu.c | 29 + 3 files changed, 225 insertions(+), 105 deletions(-) diff --git a/include/qom/cpu.h b/include/qom/cpu.h index fc768bbe00..44e6e83ecd 100

[Qemu-devel] [PATCH v7 32/73] cpu: define cpu_interrupt_request helpers

2019-03-04 Thread Emilio G. Cota
s complete, cpu_interrupt_request will be simple again. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 37 + qom/cpu.c | 27 +-- 2 files changed, 58 insertions(+), 6 deletions(-)

[Qemu-devel] [PATCH v7 43/73] i386/hvf: convert to cpu_request_interrupt

2019-03-04 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/i386/hvf/hvf.c| 8 +--- target/i386/hvf/x86hvf.c | 26 +++--- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 7dc1d721ff

[Qemu-devel] [PATCH v7 72/73] cpu: add async_run_on_cpu_no_bql

2019-03-04 Thread Emilio G. Cota
Some async jobs do not need the BQL. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 14 ++ cpus-common.c | 39 ++- 2 files changed, 48 insertions(+), 5 deletions(-) diff --git

[Qemu-devel] [PATCH v7 56/73] openrisc: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Cc: Stafford Horne Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- hw/openrisc/cputimer.c | 2 +- target/openrisc/cpu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/openrisc/cputimer.c b/hw/openrisc/cputimer.c index

[Qemu-devel] [PATCH v7 18/73] ppc: convert to cpu_halted

2019-03-04 Thread Emilio G. Cota
id Gibson Cc: qemu-...@nongnu.org Reviewed-by: Richard Henderson Acked-by: David Gibson Signed-off-by: Emilio G. Cota --- target/ppc/helper_regs.h| 2 +- hw/ppc/e500.c | 4 ++-- hw/ppc/ppc.c| 10 +- hw/ppc/ppce500_spin.c | 6 -

[Qemu-devel] [PATCH v7 38/73] arm: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Cc: Peter Maydell Cc: qemu-...@nongnu.org Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/arm/cpu.c | 6 +++--- target/arm/helper.c | 16 +++- target/arm/machine.c | 2 +- 3 files changed, 11 insertions(+), 13 deletions

[Qemu-devel] [PATCH v7 47/73] hppa: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/hppa/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 00bf444620..1ab4e62850 100644 --- a/target/hppa/cpu.c +++ b/target/hppa

[Qemu-devel] [PATCH v7 73/73] cputlb: queue async flush jobs without the BQL

2019-03-04 Thread Emilio G. Cota
conds time elapsed ( +- 0.13% ) That is, a 1.37% slowdown. Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Tested-by: Alex Bennée Signed-off-by: Emilio G. Cota --- accel/tcg/cputlb.c | 10 +- 1 file changed, 5 insertions(+), 5 deletion

[Qemu-devel] [PATCH v7 26/73] sparc: convert to cpu_halted

2019-03-04 Thread Emilio G. Cota
Cc: Fabien Chouteau Cc: Mark Cave-Ayland Cc: Artyom Tarasenko Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Mark Cave-Ayland Signed-off-by: Emilio G. Cota --- hw/sparc/leon3.c | 2 +- hw/sparc/sun4m.c | 8 hw/sparc64/sparc64.c | 4 ++-- target

[Qemu-devel] [PATCH v7 68/73] xtensa: convert to cpu_has_work_with_iothread_lock

2019-03-04 Thread Emilio G. Cota
Soon we will call cpu_has_work without the BQL. Cc: Max Filippov Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/xtensa/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index d4ca35e6cc..5f3b4a70b0

[Qemu-devel] [PATCH v7 53/73] alpha: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/alpha/cpu.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 1fd95d6c0f..cebd459251 100644 --- a/target/alpha/cpu.c +++ b

[Qemu-devel] [PATCH v7 42/73] i386/whpx-all: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/i386/whpx-all.c | 41 - 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/target/i386/whpx-all.c b/target/i386/whpx-all.c index 9673bdc219..0d8cfa3a19 100644

[Qemu-devel] [PATCH v7 28/73] gdbstub: convert to cpu_halted

2019-03-04 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- gdbstub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index bc774ae992..569b504552 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1664,13 +1664,13 @@ static

[Qemu-devel] [PATCH v7 55/73] sparc: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Cc: Mark Cave-Ayland Cc: Artyom Tarasenko Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Mark Cave-Ayland Signed-off-by: Emilio G. Cota --- hw/sparc64/sparc64.c | 4 ++-- target/sparc/cpu.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH v7 36/73] s390x: use cpu_reset_interrupt

2019-03-04 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Cornelia Huck Cc: David Hildenbrand Cc: qemu-s3...@nongnu.org Reviewed-by: David Hildenbrand Reviewed-by: Richard Henderson Reviewed-by: Cornelia Huck Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/s390x

[Qemu-devel] [PATCH v7 41/73] i386/hax-all: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/i386/hax-all.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c index 518c6ff103..18da1808c6 100644

[Qemu-devel] [PATCH v7 37/73] openrisc: use cpu_reset_interrupt

2019-03-04 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Stafford Horne Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/openrisc/sys_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH v7 20/73] i386: convert to cpu_halted

2019-03-04 Thread Emilio G. Cota
Cc: Eduardo Habkost Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/i386/cpu.h | 2 +- target/i386/cpu.c | 2 +- target/i386/hax-all.c | 4 ++-- target/i386/helper.c | 4 ++-- target/i386/hvf/hvf.c | 4

[Qemu-devel] [PATCH v7 25/73] s390x: convert to cpu_halted

2019-03-04 Thread Emilio G. Cota
Cc: Cornelia Huck Cc: Christian Borntraeger Cc: David Hildenbrand Cc: qemu-s3...@nongnu.org Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Cornelia Huck Signed-off-by: Emilio G. Cota --- hw/intc/s390_flic.c| 2 +- target/s390x/cpu.c | 22

[Qemu-devel] [PATCH v7 61/73] cpu: call .cpu_has_work with the CPU lock held

2019-03-04 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/qom/cpu.h b/include/qom/cpu.h index c92a8c544a..651e1ab4d8 100644 --- a/include/qom/cpu.h +++ b

[Qemu-devel] [PATCH v7 30/73] cpu-exec: convert to cpu_halted

2019-03-04 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- accel/tcg/cpu-exec.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 45ef41ebb2..78dca325ba 100644

[Qemu-devel] [PATCH v7 17/73] arm: convert to cpu_halted

2019-03-04 Thread Emilio G. Cota
Cc: Andrzej Zaborowski Cc: Peter Maydell Cc: qemu-...@nongnu.org Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- hw/arm/omap1.c| 4 ++-- hw/arm/pxa2xx_gpio.c | 2 +- hw/arm/pxa2xx_pic.c | 2 +- target/arm/arm-powerctl.c | 6

[Qemu-devel] [PATCH v7 66/73] riscv: convert to cpu_has_work_with_iothread_lock

2019-03-04 Thread Emilio G. Cota
Soon we will call cpu_has_work without the BQL. Cc: Palmer Dabbelt Cc: Sagar Karandikar Cc: Bastian Koppelmann Reviewed-by: Palmer Dabbelt Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Signed-off-by: Emilio G. Cota --- target/riscv/cpu.c | 5 - 1 file changed, 4

[Qemu-devel] [PATCH v7 15/73] cpu: define cpu_halted helpers

2019-03-04 Thread Emilio G. Cota
cpu->halted will soon be protected by cpu->lock. We will use these helpers to ease the transition, since right now cpu->halted has many direct callers. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 24 ++

[Qemu-devel] [PATCH v7 22/73] m68k: convert to cpu_halted

2019-03-04 Thread Emilio G. Cota
Cc: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Laurent Vivier Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/m68k/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index

  1   2   3   4   5   6   7   8   9   10   >