[Qemu-devel] [PATCH v7 24/73] riscv: convert to cpu_halted

2019-03-04 Thread Emilio G. Cota
Cc: Palmer Dabbelt Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: Alistair Francis Reviewed-by: Palmer Dabbelt Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Signed-off-by: Emilio G. Cota --- target/riscv/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[Qemu-devel] [PATCH v7 33/73] ppc: use cpu_reset_interrupt

2019-03-04 Thread Emilio G. Cota
From: Paolo Bonzini Cc: David Gibson Cc: qemu-...@nongnu.org Acked-by: David Gibson 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/ppc/excp_helper.c | 2 +- 1 file changed

[Qemu-devel] [PATCH v7 14/73] microblaze: convert to helper_cpu_halted_set

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/translate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index

[Qemu-devel] [PATCH v7 19/73] sh4: convert to cpu_halted

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/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c index 4f825bae5a..57cc363ccc 100644

[Qemu-devel] [PATCH v7 27/73] xtensa: convert to cpu_halted

2019-03-04 Thread Emilio G. Cota
Cc: Max Filippov Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/xtensa/cpu.c| 2 +- target/xtensa/exc_helper.c | 2 +- target/xtensa/helper.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/xtensa

[Qemu-devel] [PATCH v7 12/73] m68k: convert to helper_cpu_halted_set

2019-03-04 Thread Emilio G. Cota
Cc: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Laurent Vivier Signed-off-by: Emilio G. Cota --- target/m68k/translate.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c

[Qemu-devel] [PATCH v7 16/73] tcg-runtime: convert to cpu_halted_set

2019-03-04 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- accel/tcg/tcg-runtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/tcg-runtime.c b/accel/tcg/tcg-runtime.c index 4aa038465f..70e3c9de71 100644 --- a/accel/tcg/tcg

[Qemu-devel] [PATCH v7 07/73] cpu: make per-CPU locks an alias of the BQL in TCG rr mode

2019-03-04 Thread Emilio G. Cota
Henderson Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 2 +- cpus-common.c | 2 +- cpus.c| 90 +-- qom/cpu.c | 3 +- stubs/cpu-lock.c | 6 ++-- 5 files changed, 86 insertions(+), 17 deletions(-) diff --git a/include/qom

[Qemu-devel] [PATCH v7 23/73] mips: convert to cpu_halted

2019-03-04 Thread Emilio G. Cota
Cc: Aurelien Jarno Cc: Aleksandar Markovic Cc: James Hogan Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- hw/mips/cps.c | 2 +- hw/misc/mips_itu.c | 4 ++-- target/mips/kvm.c | 2 +- target/mips/op_helper.c | 8 target

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

2019-03-04 Thread Emilio G. Cota
This finishes the conversion to cpu_halted. Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- accel/tcg/cpu-exec.c | 2 +- cpus.c | 8 qom/cpu.c| 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH v7 13/73] alpha: convert to helper_cpu_halted_set

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

[Qemu-devel] [PATCH v7 09/73] ppc: convert to helper_cpu_halted_set

2019-03-04 Thread Emilio G. Cota
Cc: David Gibson Cc: qemu-...@nongnu.org Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Acked-by: David Gibson Signed-off-by: Emilio G. Cota --- target/ppc/translate.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc

[Qemu-devel] [PATCH v7 10/73] cris: convert to helper_cpu_halted_set

2019-03-04 Thread Emilio G. Cota
And fix the temp leak along the way. Cc: "Edgar E. Iglesias" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/cris/translate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/cris/translate.c b/t

[Qemu-devel] [PATCH v7 29/73] openrisc: convert to cpu_halted

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 --- target/openrisc/sys_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c index 05f66c455b

[Qemu-devel] [PATCH v7 50/73] mips: convert to cpu_interrupt_request

2019-03-04 Thread Emilio G. Cota
Cc: Aurelien Jarno Cc: Aleksandar Markovic Cc: James Hogan Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/mips/cpu.c | 7 --- target/mips/kvm.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index

[Qemu-devel] [PATCH v7 21/73] lm32: convert to cpu_halted

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/op_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/lm32/op_helper.c b/target/lm32/op_helper.c index 234d55e056..392634441b 100644

[Qemu-devel] [PATCH v7 04/73] cpu: make qemu_work_cond per-cpu

2019-03-04 Thread Emilio G. Cota
This eliminates the need to use the BQL to queue CPU work. While at it, give the per-cpu field a generic name ("cond") since it will soon be used for more than just queueing CPU work. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include

[Qemu-devel] [PATCH v7 11/73] hppa: convert to helper_cpu_halted_set

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

[Qemu-devel] [PATCH v7 02/73] cpu: rename cpu->work_mutex to cpu->lock

2019-03-04 Thread Emilio G. Cota
This lock will soon protect more fields of the struct. Give it a more appropriate name. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 6 -- cpus-common.c | 14 +++--- cpus.c| 4 ++-- qom/cpu.c

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

2019-03-04 Thread Emilio G. Cota
v6: https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg07650.html All patches in the series have reviews now. Thanks everyone! I've tested all patches with `make check-qtest -j' for all targets. The series is checkpatch-clean (just some warnings about __COVERITY__). You can fetch the

[Qemu-devel] [PATCH v7 64/73] mips: 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: Aurelien Jarno Cc: Aleksandar Markovic Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/mips/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index

[Qemu-devel] [PATCH v7 01/73] cpu: convert queued work to a QSIMPLEQ

2019-03-04 Thread Emilio G. Cota
Instead of open-coding it. While at it, make sure that all accesses to the list are performed while holding the list's lock. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 6 +++--- cpus-common.c | 25

[Qemu-devel] [PATCH v7 03/73] cpu: introduce cpu_mutex_lock/unlock

2019-03-04 Thread Emilio G. Cota
ich explains why the bitmap is introduced here. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 33 +++ cpus.c | 48 +++-- stubs/cpu-lock.c| 28 ++ st

[Qemu-devel] [PATCH v7 05/73] cpu: move run_on_cpu to cpus-common

2019-03-04 Thread Emilio G. Cota
We don't pass a pointer to qemu_global_mutex anymore. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 10 -- cpus-common.c | 2 +- cpus.c| 5 - 3 files changed, 1 insertion(+), 16 deletions(-) diff

[Qemu-devel] [PATCH v7 06/73] cpu: introduce process_queued_cpu_work_locked

2019-03-04 Thread Emilio G. Cota
This completes the conversion to cpu_mutex_lock/unlock in the file. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- cpus-common.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/cpus-common.c b/cpus-common.c

[Qemu-devel] [PATCH v7 08/73] tcg-runtime: define helper_cpu_halted_set

2019-03-04 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- accel/tcg/tcg-runtime.h | 2 ++ accel/tcg/tcg-runtime.c | 7 +++ 2 files changed, 9 insertions(+) diff --git a/accel/tcg/tcg-runtime.h b/accel/tcg/tcg-runtime.h index dfe325625c..46386bb564 100644

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

2019-03-03 Thread Emilio G. Cota
On Fri, Feb 08, 2019 at 14:58:40 +, Alex Bennée wrote: > > Emilio G. Cota writes: > > > Some async jobs do not need the BQL. > > > > Reviewed-by: Richard Henderson > > Signed-off-by: Emilio G. Cota (snip) > So we now have a locking/scheduling hier

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

2019-03-03 Thread Emilio G. Cota
On Fri, Feb 08, 2019 at 11:33:32 +, Alex Bennée wrote: > > Emilio G. Cota writes: > > > It will gain some users soon. > > > > Suggested-by: Paolo Bonzini > > Reviewed-by: Richard Henderson > > Signed-off-by: Emilio G. Co

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

2019-03-02 Thread Emilio G. Cota
On Fri, Feb 08, 2019 at 11:15:27 +, Alex Bennée wrote: > > Emilio G. Cota writes: > > > Reviewed-by: Richard Henderson > > Signed-off-by: Emilio G. Cota > > --- > > target/i386/kvm.c | 54 +++ > > 1 file

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

2019-03-02 Thread Emilio G. Cota
On Fri, Feb 08, 2019 at 11:00:23 +, Alex Bennée wrote: > > Emilio G. Cota writes: > > > Reviewed-by: Richard Henderson > > Signed-off-by: Emilio G. Cota > > --- > > target/i386/cpu.c| 2 +- > > target/i386/helper.c | 4 ++-- > > t

Re: [Qemu-devel] [PATCH v3 0/3] target/arm: Reduce overhead of cpu_get_tb_cpu_state

2019-03-01 Thread Emilio G. Cota
, > instead of building them in rebuild_hflags_common. Tested-by: Emilio G. Cota You might want to add these numbers (I re-ran the benchmarks for v3) to patch 3's commit log: aarch64-linux-user SPEC06int (train set) Host: Intel(R) Core(TM) i7-4

Re: [Qemu-devel] [RFC v2 07/38] queue: add QTAILQ_REMOVE_SEVERAL

2019-02-25 Thread Emilio G. Cota
On Mon, Feb 25, 2019 at 16:22:52 +, Alex Bennée wrote: > Emilio G. Cota writes: > > +/* remove @left, @right and all elements in between from @head */ > > +#define QTAILQ_REMOVE_SEVERAL(head, left, right, field) do {\ > > +if (((right)->

Re: [Qemu-devel] [PATCH v2 0/3] target/arm: Reduce overhead of cpu_get_tb_cpu_state

2019-02-21 Thread Emilio G. Cota
On Thu, Feb 21, 2019 at 22:36:25 +, Alex Bennée wrote: > Emilio G. Cota writes: > > This brings my arm-softmmu bootup+shutdown test to an early death: > > Can you retry with --enable-tcg-debug? Should have done so the first time. Here

Re: [Qemu-devel] [PATCH v2 0/3] target/arm: Reduce overhead of cpu_get_tb_cpu_state

2019-02-21 Thread Emilio G. Cota
On Tue, Feb 19, 2019 at 15:34:18 -0800, Richard Henderson wrote: > Changes since v1: > * Apparently I had started a last-minute API change, and failed to > covert all of the users, and also failed to re-test afterward. > * Retain assertions for --enable-debug-tcg. This brings my

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

2019-02-20 Thread Emilio G. Cota
On Wed, Feb 20, 2019 at 09:27:06 -0800, Richard Henderson wrote: > Thanks for the patience. Both Alex and I have now completed review, and I > think this is ready for merge. > > There are some patch conflicts with master, so if you can fix those and post a > v7, we'll get it merged right away.

Re: [Qemu-devel] [PATCH v3 0/3] softmmu demacro

2019-02-19 Thread Emilio G. Cota
On Tue, Feb 19, 2019 at 14:22:37 +, Alex Bennée wrote: > Emilio, > > Any chance you could run it through your benchmark suite? Something isn't quite right. For instance, gcc in SPEC doesn't complete; it fails after 2s with some errors about the syntax of the source being compiled. Before the

Re: [Qemu-devel] [PATCH 0/4] target/arm: Reduce overhead of cpu_get_tb_cpu_state

2019-02-14 Thread Emilio G. Cota
On Wed, Feb 13, 2019 at 20:06:48 -0800, Richard Henderson wrote: > We've talked about this before, caching state to reduce the > amount of computation that happens looking up each TB. > > I know that Peter has been concerned that we would not be able to > reliably maintain all of the places that

[Qemu-devel] [PATCH 1/2] exec-all: document that tlb_fill can trigger a TLB resize

2019-02-09 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- include/exec/exec-all.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index aa7b81aaf0..97b90cb0db 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -475,6 +475,11 @@ static inline

[Qemu-devel] [PATCH 0/2]

2019-02-09 Thread Emilio G. Cota
Fix a bug introduced with dynamic TLB sizing -- we forgot to account for possible TLB resizes during tlb_fill(). Max reported the bug and provided a reproducer here: https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg02283.html Thanks, Emilio

[Qemu-devel] [PATCH 2/2] cputlb: update TLB entry/index after tlb_fill

2019-02-09 Thread Emilio G. Cota
x Filippov Tested-by: Max Filippov Signed-off-by: Emilio G. Cota --- accel/tcg/softmmu_template.h | 8 accel/tcg/cputlb.c | 4 2 files changed, 12 insertions(+) diff --git a/accel/tcg/softmmu_template.h b/accel/tcg/softmmu_template.h index 1fdd262ea4..e970a8b378 100644 --- a

Re: [Qemu-devel] segfault on the mainline qemu-softmmu

2019-02-08 Thread Emilio G. Cota
On Fri, Feb 08, 2019 at 13:00:44 -0800, Max Filippov wrote: > after updating to the latest qemu mainline I get segfault with the following > backtrace when I run qemu-system-xtensa: > > Thread 3 "qemu-system-xte" received signal SIGSEGV, Segmentation fault. > [Switching to Thread 0x7fffde9d3700

Re: [Qemu-devel] [PATCH v6 03/73] cpu: introduce cpu_mutex_lock/unlock

2019-02-06 Thread Emilio G. Cota
On Wed, Feb 06, 2019 at 17:21:15 +, Alex Bennée wrote: > Emilio G. Cota writes: > > +/* > > + * Note: we index the bitmap with cpu->cpu_index + 1 so that the logic > > + * also works during early CPU initialization, when cpu->cpu_index is set > > to &

Re: [Qemu-devel] [PATCH] accel/tcg: Consider cluster index in tb_lookup__cpu_state()

2019-02-06 Thread Emilio G. Cota
On Wed, Feb 06, 2019 at 03:15:26 +, Richard Henderson wrote: > > Does anybody know why tb_lookup__cpu_state() has that odd > > double-underscore in the middle of its name? > > I'm inclined to think typo... Emilio? It's not a typo -- it's there to separate "tb lookup" and "cpu state" to

Re: [Qemu-devel] [PATCH] queue: fix QTAILQ_FOREACH_REVERSE_SAFE

2019-02-04 Thread Emilio G. Cota
t; showed up as incorrect register preferences on the very first translation > block that was compiled. > > Reported-by: Thomas Huth > Signed-off-by: Paolo Bonzini Reviewed-by: Emilio G. Cota E.

Re: [Qemu-devel] [PULL 1/1] update seabios to master snapshot

2019-02-04 Thread Emilio G. Cota
On Mon, Feb 04, 2019 at 12:20:33 +0100, Gerd Hoffmann wrote: > > How can I bisect seabios? I can't find a recipe to generate > > the .bin files included in this commit. > > "make -C roms bios" will build it, using the roms/seabios submodule. Thanks! This helped. The regression was introduced

[Qemu-devel] [PATCH] qemu-doc: remove outdated comment about full-system SMP support

2019-02-03 Thread Emilio G. Cota
in keeping the list up to date. Reported-by: David Steiner Signed-off-by: Emilio G. Cota --- qemu-doc.texi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qemu-doc.texi b/qemu-doc.texi index 83be010a0a..0c20ec6d6f 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -119,8

Re: [Qemu-devel] [PULL 1/1] update seabios to master snapshot

2019-02-01 Thread Emilio G. Cota
Hi Gerd, On Tue, Nov 06, 2018 at 12:28:29 +0100, Gerd Hoffmann wrote: > seabios 1.12 release is planned for november. > > update seabios to a master branch snapshot so it gets more testing > and to make the delta smaller when updating to -final during freeze. I just bisected a performance

Re: [Qemu-devel] [PATCH] tests: Ignore fp test outputs

2019-02-01 Thread Emilio G. Cota
On Fri, Feb 01, 2019 at 13:32:34 -0600, Eric Blake wrote: > Commit 2cade3d wired up new tests, but did not exclude the > new *.out files produced by running the tests. > > Signed-off-by: Eric Blake Reviewed-by: Emilio G. Cota E.

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

2019-01-29 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 v6 44/73] ppc: convert to cpu_interrupt_request

2019-01-29 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/excp_helper.c| 2 +- target/ppc/kvm.c| 4 ++-- target/ppc/translate_init.inc.c | 14

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

2019-01-29 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 Signed-off-by: Emilio G. Cota --- target/s390x/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/s390x/cpu.c b

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

2019-01-29 Thread Emilio G. Cota
conds time elapsed ( +- 0.13% ) That is, a 1.37% slowdown. Signed-off-by: Emilio G. Cota --- accel/tcg/cputlb.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index dad9b7796c..

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

2019-01-29 Thread Emilio G. Cota
Cc: Peter Maydell Cc: qemu-...@nongnu.org Reviewed-by: Richard Henderson 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(-) diff --git a/target/arm

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

2019-01-29 Thread Emilio G. Cota
. In this conversion we drop qemu_cpu_cond and qemu_pause_cond, and use cpu->cond instead. In qom/cpu.c we can finally remove the ugliness that results from having to hold both the BQL and the CPU lock; now we just have to grab the CPU lock. Signed-off-by: Emilio G. Cota --- include/qom/cpu.h |

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

2019-01-29 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. Signed-off-by: Emilio G. Cota --- cpus.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cpus.c b/cpus.c index aee129c0b3..0d255c2655 100644 --- a/cpus.c +++ b

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

2019-01-29 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 Signed-off-by: Emilio G. Cota --- cpus-common.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/cpus

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

2019-01-29 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 v6 62/73] cpu: introduce cpu_has_work_with_iothread_lock

2019-01-29 Thread Emilio G. Cota
It will gain some users soon. Suggested-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- include/qom/cpu.h | 36 +--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/include/qom/cpu.h b/include/qom/cpu.h index

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

2019-01-29 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 v6 61/73] cpu: call .cpu_has_work with the CPU lock held

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson 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 4a87c1fef7..96a5d0cb94 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -85,7

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

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

[Qemu-devel] [PATCH v6 64/73] mips: convert to cpu_has_work_with_iothread_lock

2019-01-29 Thread Emilio G. Cota
Soon we will call cpu_has_work without the BQL. Cc: Aurelien Jarno Cc: Aleksandar Markovic Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/mips/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index

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

2019-01-29 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 v6 66/73] riscv: convert to cpu_has_work_with_iothread_lock

2019-01-29 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 Signed-off-by: Emilio G. Cota --- target/riscv/cpu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

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

2019-01-29 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 v6 54/73] moxie: convert to cpu_interrupt_request

2019-01-29 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 8d67eb6727..bad92cfc61 100644 --- a/target/moxie

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

2019-01-29 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 v6 36/73] s390x: use cpu_reset_interrupt

2019-01-29 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 v6 00/73] per-CPU locks

2019-01-29 Thread Emilio G. Cota
v5: https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg02979.html For context, the goal of this series is to substitute the BQL for the per-CPU locks in many places, notably the execution loop in cpus.c. This leads to better scalability for MTTCG, since CPUs don't have to acquire a

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

2019-01-29 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 v6 33/73] ppc: use cpu_reset_interrupt

2019-01-29 Thread Emilio G. Cota
From: Paolo Bonzini Cc: David Gibson Cc: qemu-...@nongnu.org Acked-by: David Gibson 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/ppc/excp_helper.c | 2 +- 1 file changed

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

2019-01-29 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 v6 59/73] accel/tcg: convert to cpu_interrupt_request

2019-01-29 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 v6 50/73] mips: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Cc: Aurelien Jarno Cc: Aleksandar Markovic Cc: James Hogan Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/mips/cpu.c | 7 --- target/mips/kvm.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index

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

2019-01-29 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 v6 43/73] i386/hvf: convert to cpu_request_interrupt

2019-01-29 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 c1ff220985

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

2019-01-29 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 v6 55/73] sparc: convert to cpu_interrupt_request

2019-01-29 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 v6 48/73] lm32: convert to cpu_interrupt_request

2019-01-29 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 v6 49/73] m68k: convert to cpu_interrupt_request

2019-01-29 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 v6 41/73] i386/hax-all: convert to cpu_interrupt_request

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson 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 --- a/target/i386/hax

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

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- target/i386/kvm.c | 54 +++ 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index ca2629f0fe..3f3c670897 100644 --- a/target/i386

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

2019-01-29 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 v6 60/73] cpu: convert to interrupt_request

2019-01-29 Thread Emilio G. Cota
This finishes the conversion to interrupt_request. 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/cpu.c +++ b/qom/cpu.c @@ -275,7 +275,7 @@ static void

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

2019-01-29 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 | 4

[Qemu-devel] [PATCH v6 29/73] openrisc: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Cc: Stafford Horne Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/openrisc/sys_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c index b66a45c1e0

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

2019-01-29 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 v6 31/73] cpu: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
This finishes the conversion to cpu_halted. Signed-off-by: Emilio G. Cota --- cpus.c| 8 qom/cpu.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cpus.c b/cpus.c index c4fa3cc876..aee129c0b3 100644 --- a/cpus.c +++ b/cpus.c @@ -204,7 +204,7 @@ static bool

[Qemu-devel] [PATCH v6 23/73] mips: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Cc: Aurelien Jarno Cc: Aleksandar Markovic Cc: James Hogan Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- hw/mips/cps.c | 2 +- hw/misc/mips_itu.c | 4 ++-- target/mips/kvm.c | 2 +- target/mips/op_helper.c | 8 target

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

2019-01-29 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 3129b5c284..91790112a2 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1659,13 +1659,13 @@ static

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

2019-01-29 Thread Emilio G. Cota
Reviewed-by: Richard Henderson 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 index a37b984b61

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

2019-01-29 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 v6 21/73] lm32: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Cc: Michael Walle Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/lm32/op_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/lm32/op_helper.c b/target/lm32/op_helper.c index 234d55e056..392634441b 100644

[Qemu-devel] [PATCH v6 19/73] sh4: convert to cpu_halted

2019-01-29 Thread Emilio G. Cota
Cc: Aurelien Jarno Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/sh4/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c index 4f825bae5a..57cc363ccc 100644

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

2019-01-29 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 v6 32/73] cpu: define cpu_interrupt_request helpers

2019-01-29 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 v6 26/73] sparc: convert to cpu_halted

2019-01-29 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 v6 22/73] m68k: convert to cpu_halted

2019-01-29 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

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

2019-01-29 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 v6 25/73] s390x: convert to cpu_halted

2019-01-29 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 Signed-off-by: Emilio G. Cota --- hw/intc/s390_flic.c| 2 +- target/s390x/cpu.c | 22 +++--- target/s390x

<    1   2   3   4   5   6   7   8   9   10   >