[PATCH v9 12/74] m68k: convert to helper_cpu_halted_set

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Laurent Vivier Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/m68k/translate.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/t

[PATCH v9 09/74] ppc: convert to helper_cpu_halted_set

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: qemu-...@nongnu.org Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Acked-by: David Gibson Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/ppc/translate.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) di

[PATCH v9 19/74] ppc: convert to cpu_halted

2020-05-21 Thread Robert Foley
f not already held) from cpu_has_work. Cc: qemu-...@nongnu.org Reviewed-by: Richard Henderson Acked-by: David Gibson Signed-off-by: Emilio G. Cota [RF: hw/ppc/spapr_hcall.c, spapr_rtas.c more conversions] Signed-off-by: Robert Foley --- hw/ppc/e500.c | 4 ++-- hw/ppc/ppc.c

[PATCH v9 17/74] hw/semihosting: convert to cpu_halted_set

2020-05-21 Thread Robert Foley
Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- hw/semihosting/console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/semihosting/console.c b/hw/semihosting/console.c index 6346bd7f50..f70085f3c1 100644 --- a/hw/semihosting/console.c +++ b/hw/semihosting

[PATCH v9 14/74] microblaze: convert to helper_cpu_halted_set

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: "Edgar E. Iglesias" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/microblaze/translate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

[PATCH v9 20/74] sh4: convert to cpu_halted

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: Aurelien Jarno Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/sh4/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sh4/op_helper.c b/

[PATCH v9 13/74] alpha: convert to helper_cpu_halted_set

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/alpha/translate.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/alpha/translate.c b/target/alpha/t

[PATCH v9 21/74] i386: convert to cpu_halted

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: Eduardo Habkost Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota [RF: Converted new code in i386/hax-all.c to cpu_halted] Signed-off-by: Robert Foley --- target/i386/cpu.c | 2 +- target/i386/cpu.h

[PATCH v9 24/74] mips: convert to cpu_halted

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota [RF: Converted code in target/mips/kvm.c to cpu_halted.] Signed-off-by: Robert Foley --- hw/mips/cps.c| 2 +- hw/misc/mips_itu.c | 4 ++-- target/mips/cp

[PATCH v9 15/74] cpu: define cpu_halted helpers

2020-05-21 Thread Robert Foley
From: "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 Signed-o

[PATCH v9 18/74] arm: convert to cpu_halted

2020-05-21 Thread Robert Foley
From: "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 Signed-off-by: Robert Foley --- hw/arm/omap1.c| 4 ++-- hw/arm/pxa2xx_gpio.c | 2

[PATCH v9 26/74] s390x: convert to cpu_halted

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" 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 Signed-off-by: Robert Foley --- hw/intc/s390_flic.c| 2

[PATCH v9 23/74] m68k: convert to cpu_halted

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Reviewed-by: Laurent Vivier Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/m68k/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/m68k/op_

[PATCH v9 30/74] openrisc: convert to cpu_halted

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: Stafford Horne Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/openrisc/sys_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/openrisc/sys_

[PATCH v9 22/74] lm32: convert to cpu_halted

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: Michael Walle Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/lm32/op_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/lm32/op_helper.

[PATCH v9 31/74] cpu-exec: convert to cpu_halted

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- accel/tcg/cpu-exec.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/accel/tcg/cpu-exec.c b

[PATCH v9 34/74] ppc: use cpu_reset_interrupt

2020-05-21 Thread Robert Foley
From: Paolo Bonzini 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 Signed-off-by: Robert Foley --- target/ppc/excp_helper.c | 2 +- 1

[PATCH v9 25/74] riscv: convert to cpu_halted

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: Sagar Karandikar Cc: Bastian Koppelmann Reviewed-by: Palmer Dabbelt Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/riscv/op_helper.c | 2 +- 1 file changed, 1 inser

[PATCH v9 27/74] sparc: convert to cpu_halted

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: Fabien Chouteau Cc: Artyom Tarasenko Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Mark Cave-Ayland Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- hw/sparc/leon3.c | 2 +- hw/sparc/sun4m.c | 8

[PATCH v9 32/74] cpu: convert to cpu_halted

2020-05-21 Thread Robert Foley
From: "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 Signed-off-by: Robert Foley --- accel/tcg/cpu-exec.c | 2 +- cpus.c | 4 ++-- hw/core/cpu.c

[PATCH v9 33/74] cpu: define cpu_interrupt_request helpers

2020-05-21 Thread Robert Foley
sition; once that is complete, cpu_interrupt_request will be simple again. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- hw/core/cpu.c | 27 +-- include/hw/core/cpu.h | 37

[PATCH v9 28/74] xtensa: convert to cpu_halted

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: Max Filippov Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/xtensa/cpu.c| 2 +- target/xtensa/exc_helper.c | 2 +- target/xtensa/helper.c | 2 +- 3 files

[PATCH v9 38/74] openrisc: use cpu_reset_interrupt

2020-05-21 Thread Robert Foley
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 Signed-off-by: Robert Foley --- target/openrisc/sys_helper.c | 2 +- 1 file changed, 1 insertion

[PATCH v9 35/74] exec: use cpu_reset_interrupt

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 5162f0d12f..37e039de06 100644 --- a/ex

[PATCH v9 36/74] i386: use cpu_reset_interrupt

2020-05-21 Thread Robert Foley
From: Paolo Bonzini Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/i386/hax-all.c| 4 ++-- target/i386/hvf/x86hvf.c | 8 target/i386/kvm.c| 14

[PATCH v9 47/74] cris: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: "Edgar E. Iglesias" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/cris/cpu.c| 2 +- target/cris/helper.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deleti

[PATCH v9 29/74] gdbstub: convert to cpu_halted

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- gdbstub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 6950fd243f..b25796b33d 10

[PATCH v9 39/74] arm: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "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 Signed-off-by: Robert Foley --- target/arm/cpu.c | 6 +++--- target/arm/helper.c | 16 +++- target/arm/mach

[PATCH v9 37/74] s390x: use cpu_reset_interrupt

2020-05-21 Thread Robert Foley
From: Paolo Bonzini 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 Signed-off-by: Robert Foley --- target/s390x/excp_helper.c | 2 +- 1

[PATCH v9 59/74] microblaze: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: "Edgar E. Iglesias" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/microblaze/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/micro

[PATCH v9 40/74] i386: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/i386/cpu.c| 2 +- target/i386/helper.c | 4 ++-- target/i386/svm_helper.c | 4 ++-- 3 files changed, 5 insertions(+), 5

[PATCH v9 43/74] i386/whpx-all: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/i386/whpx-all.c | 41 - 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/target/i386/whpx-all.c b/target

[PATCH v9 60/74] accel/tcg: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- accel/tcg/cpu-exec.c | 15 --- accel/tcg/tcg-all.c | 12 +--- accel/tcg/translate-all.c | 2 +- 3 files c

[PATCH v9 41/74] i386/kvm: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/i386/kvm.c | 58 --- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/t

[PATCH v9 45/74] ppc: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: qemu-...@nongnu.org Reviewed-by: Richard Henderson Acked-by: David Gibson Signed-off-by: Emilio G. Cota [RF: Minor adjustment for new code in hvf_inject_interrupts] Signed-off-by: Robert Foley --- hw/ppc/ppc.c| 2 +- target/i386/hv

[PATCH v9 42/74] i386/hax-all: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota [RF: Converted new code to cpu_interrupt_request] Signed-off-by: Robert Foley --- target/i386/hax-all.c | 34 +++--- 1 file changed, 19 inserti

[PATCH v9 46/74] sh4: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: Aurelien Jarno Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/sh4/cpu.c| 2 +- target/sh4/helper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/

[PATCH v9 64/74] ppc: convert to cpu_has_work_with_iothread_lock

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Soon we will call cpu_has_work without the BQL. Cc: qemu-...@nongnu.org Reviewed-by: Richard Henderson Acked-by: David Gibson Signed-off-by: Emilio G. Cota [RF: Converted new code related to POWER10] Signed-off-by: Robert Foley --- target/ppc/translate_

[PATCH v9 52/74] nios: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: Chris Wulff Cc: Marek Vasut Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/nios2/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/nios2/cpu.

[PATCH v9 44/74] i386/hvf: convert to cpu_request_interrupt

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/i386/hvf/hvf.c| 8 +--- target/i386/hvf/x86hvf.c | 26 +++--- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/t

[PATCH v9 49/74] lm32: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: Michael Walle Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/lm32/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/lm32/cpu.c b/target/lm32/c

[PATCH v9 65/74] mips: convert to cpu_has_work_with_iothread_lock

2020-05-21 Thread Robert Foley
From: "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 Signed-off-by: Robert Foley --- target/mips/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletio

[PATCH v9 48/74] hppa: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- 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

[PATCH v9 55/74] moxie: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: Anthony Green Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/moxie/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/moxie/cpu.c b/target/m

[PATCH v9 54/74] alpha: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/alpha/cpu.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/alpha/cpu.c b/target/alpha/c

[PATCH v9 68/74] sparc: convert to cpu_has_work_with_iothread_lock

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Soon we will call cpu_has_work without the BQL. Cc: Artyom Tarasenko Reviewed-by: Richard Henderson Acked-by: Mark Cave-Ayland Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/sparc/cpu.c | 4 +++- 1 file changed, 3 insertions(+),

[PATCH v9 50/74] m68k: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Reviewed-by: Laurent Vivier Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- 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

[PATCH v9 56/74] sparc: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: Artyom Tarasenko Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Mark Cave-Ayland Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- hw/sparc64/sparc64.c | 4 ++-- target/sparc/cpu.c | 2 +- 2 files changed, 3 insert

[PATCH v9 70/74] cpu: rename all_cpu_threads_idle to qemu_tcg_rr_all_cpu_threads_idle

2020-05-21 Thread Robert Foley
From: "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 Signed-off-by: Robert Foley --- cpus.c | 10 ++ 1 file

[PATCH v9 57/74] openrisc: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: Stafford Horne Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- hw/openrisc/cputimer.c | 2 +- target/openrisc/cpu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff

[PATCH v9 51/74] mips: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: Aurelien Jarno Cc: Aleksandar Markovic Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/mips/cpu.c | 7 --- target/mips/kvm.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/t

[PATCH v9 71/74] cpu: protect CPU state with cpu->lock instead of the BQL

2020-05-21 Thread Robert Foley
keup. Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota [RF: Adjusted assert and changed to use timed_wait] Signed-off-by: Robert Foley --- cpus.c| 288 +++--- hw/core/cpu.c | 29 + include/hw/core/

[PATCH v9 53/74] s390x: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" 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 Signed-off-by: Robert Foley --- hw/intc/s390_flic.c | 2 +- target/s

[PATCH v9 61/74] cpu: convert to interrupt_request

2020-05-21 Thread Robert Foley
From: "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 Signed-off-by: Robert Foley --- hw/core/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v9 63/74] cpu: introduce cpu_has_work_with_iothread_lock

2020-05-21 Thread Robert Foley
From: "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 Signed-off-by: Robert Foley --- include/hw/core/cpu.h | 37 ++--- 1 file c

[PATCH v9 58/74] unicore32: convert to cpu_interrupt_request

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Cc: Guan Xuetao Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/unicore32/cpu.c | 2 +- target/unicore32/softmmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) di

[PATCH v9 62/74] cpu: call .cpu_has_work with the CPU lock held

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- include/hw/core/cpu.h | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/

[PATCH v9 67/74] riscv: convert to cpu_has_work_with_iothread_lock

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Soon we will call cpu_has_work without the BQL. Cc: Sagar Karandikar Cc: Bastian Koppelmann Reviewed-by: Palmer Dabbelt Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/r

[PATCH v9 69/74] xtensa: convert to cpu_has_work_with_iothread_lock

2020-05-21 Thread Robert Foley
From: "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 Signed-off-by: Robert Foley --- target/xtensa/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tar

[PATCH v9 66/74] s390x: convert to cpu_has_work_with_iothread_lock

2020-05-21 Thread Robert Foley
From: "Emilio G. Cota" Soon we will call cpu_has_work without the BQL. Cc: David Hildenbrand Cc: qemu-s3...@nongnu.org Reviewed-by: Richard Henderson Reviewed-by: Cornelia Huck Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/s390x/cpu.c | 4 +++- 1 file

[PATCH v9 72/74] cpus-common: release BQL earlier in run_on_cpu

2020-05-21 Thread Robert Foley
From: "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 Signed-off-by: Robert Foley --- cpus-com

[PATCH v9 73/74] cpu: add async_run_on_cpu_no_bql

2020-05-21 Thread Robert Foley
From: "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 Signed-off-by: Robert Foley --- cpus-common.c | 39 ++- include/hw/core/cpu.h | 14 +++

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

2020-05-21 Thread Robert Foley
hes ( +- 0.09% ) 7.389068145 seconds 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 [Updated the speedup chart results for re-based series.] Signed-off-by: Robert Foley ---

Re: [PATCH v7 03/12] tests/vm: pass args through to BaseVM's __init__

2020-05-22 Thread Robert Foley
On Wed, 20 May 2020 at 17:49, Alex Bennée wrote: > > > Robert Foley writes: > > A brief rationale wouldn't go amiss in the commit message. e.g. "We will > shortly need to pass more parameters to the class so lets just pass args > rather than growing the parameter

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

2020-05-22 Thread Robert Foley
ck translate-all: call qemu_spin_destroy for PageDesc thread: add tsan annotations to QemuSpin Lingfeng Yang (1): configure: add --enable-tsan flag + fiber annotations for coroutine-ucontext Robert Foley (11): tests/docker: Added docker build support for TSan. include/qemu: Added tsan

[PATCH 03/19] thread: add qemu_spin_destroy

2020-05-22 Thread Robert Foley
From: "Emilio G. Cota" It will be used for TSAN annotations. Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- include/qemu/thread.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/qemu/thread.h b/include/qemu/thread.h index d22848138e..e50a073889 10

[PATCH 04/19] cputlb: destroy CPUTLB with tlb_destroy

2020-05-22 Thread Robert Foley
From: "Emilio G. Cota" I was after adding qemu_spin_destroy calls, but while at it I noticed that we are leaking some memory. Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- accel/tcg/cputlb.c | 15 +++ exec.c | 1 + include/exec/

[PATCH 01/19] configure: add --enable-tsan flag + fiber annotations for coroutine-ucontext

2020-05-22 Thread Robert Foley
+-9 --disable-werror' configure flags. Signed-off-by: Lingfeng Yang Signed-off-by: Emilio G. Cota [cota: minor modifications + configure changes] Signed-off-by: Robert Foley [RF: minor changes to clean up checkpatch warnings/errors] --- configure | 39 util/

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

2020-05-22 Thread Robert Foley
7cd83aee28 (qemu-system-aarch64+0x01fb3e28) Cc: Richard Henderson Cc: Paolo Bonzini Signed-off-by: Robert Foley --- accel/tcg/cpu-exec.c| 4 ++-- cpus.c | 2 +- include/exec/exec-all.h | 2 +- linux-user/syscall.c| 4 ++-- 4 files changed, 6 insertions(+), 6 deletion

[PATCH 06/19] tcg: call qemu_spin_destroy for tb->jmp_lock

2020-05-22 Thread Robert Foley
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley [RF: Minor changes to fix some checkpatch errors] --- accel/tcg/translate-all.c | 10 +- include/tcg/tcg.h | 3 ++- tcg/tcg.c | 19 --- 3 files c

[PATCH 08/19] thread: add tsan annotations to QemuSpin

2020-05-22 Thread Robert Foley
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- include/qemu/thread.h | 39 --- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/include/qemu/thread.h b/include/qemu/thread.h index e50a073889..

[PATCH 02/19] cpu: convert queued work to a QSIMPLEQ

2020-05-22 Thread Robert Foley
From: "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 Signed-off-by: Robert Foley ---

[PATCH 07/19] translate-all: call qemu_spin_destroy for PageDesc

2020-05-22 Thread Robert Foley
From: "Emilio G. Cota" The radix tree is append-only, but we can fail to insert a PageDesc if the insertion races with another thread. Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- accel/tcg/translate-all.c | 9 + 1 file changed, 9 insertions(+) diff --g

[PATCH 09/19] tests/docker: Added docker build support for TSan.

2020-05-22 Thread Robert Foley
TSAN suppresion file to disable certain cases of TSAN warnings. Cc: Fam Zheng Cc: Philippe Mathieu-Daudé Signed-off-by: Robert Foley --- tests/docker/Makefile.include | 2 + tests/docker/common.rc | 19 +++ tests/docker/dockerfiles/ubuntu2004.docker | 65

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

2020-05-22 Thread Robert Foley
These annotations will allow us to give tsan additional hints. For example, we can inform tsan about reads/writes to ignore to silence certain classes of warnings. We can also annotate threads so that the proper thread naming shows up in tsan warning results. Signed-off-by: Robert Foley

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

2020-05-22 Thread Robert Foley
util/qemu-thread-posix.c:519:9 (qemu-system-aarch64+0xcde280) Cc: Stefan Hajnoczi Cc: Fam Zheng Signed-off-by: Robert Foley --- util/async.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/util/async.c b/util/async.c index 1319eee3bc..51e306bf0c 100644 --- a/util

[PATCH 16/19] util: fixed tsan warnings in thread_pool.c

2020-05-22 Thread Robert Foley
+0xd4f98e) Signed-off-by: Robert Foley --- util/thread-pool.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util/thread-pool.c b/util/thread-pool.c index d763cea505..2403669827 100644 --- a/util/thread-pool.c +++ b/util/thread-pool.c @@ -21,6 +21,7 @@ #include "tr

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

2020-05-22 Thread Robert Foley
:407:14 (qemu-system-aarch64+0x4ad77c) Cc: Richard Henderson Cc: Paolo Bonzini Signed-off-by: Robert Foley --- accel/tcg/tcg-all.c | 4 ++-- accel/tcg/tcg-runtime.c | 7 ++- accel/tcg/translate-all.c | 6 +- hw/core/cpu.c | 2 +- 4 files changed, 14 insertions(+), 5

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

2020-05-22 Thread Robert Foley
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 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 tests/tsan

[PATCH 05/19] qht: call qemu_spin_destroy for head buckets

2020-05-22 Thread Robert Foley
From: "Emilio G. Cota" Signed-off-by: Robert Foley --- util/qht.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/qht.c b/util/qht.c index aa51be3c52..67e5d5b916 100644 --- a/util/qht.c +++ b/util/qht.c @@ -348,6 +348,7 @@ static inline void qht_chain_destroy(const struct

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

2020-05-22 Thread Robert Foley
qemu_memalign util/oslib-posix.c:205:27 (qemu-system-aarch64+0xd5943e) #3 qht_insert__locked util/qht.c:583:9 (qemu-system-aarch64+0xd837c5) Signed-off-by: Robert Foley --- util/qht.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/qht.c b/util/qht.c index 67e5d5b916..739a53ced0 100644

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

2020-05-22 Thread Robert Foley
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 --- util/qemu-thread-posix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/qemu-thread

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

2020-05-22 Thread Robert Foley
This includes details on how to build and test with TSan both inside a docker and outside. Signed-off-by: Robert Foley --- docs/devel/testing.rst | 72 ++ 1 file changed, 72 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index

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

2020-05-22 Thread Robert Foley
: Richard Henderson Signed-off-by: Robert Foley --- target/arm/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 32bec156f2..cdb90582ee 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -75,7 +75,7 @@ static bool arm_cpu_has_work

Re: [PATCH v7 07/12] tests/vm: Add ability to select QEMU from current build.

2020-05-22 Thread Robert Foley
Hi, These changes all seem like a good idea. I will add them in the next version of the patch. Thanks & Regards, -Rob On Fri, 22 May 2020 at 10:40, Alex Bennée wrote: > > > Robert Foley writes: > > > Added a new special variable QEMU_LOCAL=1, which > > will indi

Re: [PATCH v7 09/12] tests/vm: Added a new script for ubuntu.aarch64.

2020-05-22 Thread Robert Foley
On Fri, 22 May 2020 at 11:34, Alex Bennée wrote: > > > Robert Foley writes: > > > > + > > +# efi-aarch64 probe > > +# Check for efi files needed by aarch64 VMs. > > +# By default we will use the efi included w

Re: [PATCH v7 10/12] tests/vm: Added a new script for centos.aarch64.

2020-05-22 Thread Robert Foley
On Fri, 22 May 2020 at 11:59, Alex Bennée wrote: > > > Robert Foley writes: > > > centos.aarch64 creates a CentOS 8 image. > > Also added a new kickstart script used to build the centos.aarch64 image. > > > > Signed-off-by: Robert Foley > > Reviewed-by:

Re: [PATCH v7 12/12] tests/vm: Add workaround to consume console

2020-05-22 Thread Robert Foley
On Fri, 22 May 2020 at 12:31, Alex Bennée wrote: > > > Robert Foley writes: > > I think you need to look at adding: > > [sendemail] > cccmd = scripts/get_maintainer.pl --nogit-fallback > > to your .git/config to ensure maintainers get pinged when you touch &

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

2020-05-22 Thread Robert Foley
On Fri, 22 May 2020 at 13:44, Peter Maydell wrote: > > On Fri, 22 May 2020 at 17:15, Robert Foley wrote: > > > > For example: > > WARNING: ThreadSanitizer: data race (pid=11134) > > Atomic write of size 4 at 0x7bbce0ac by main thread (mutexes

Re: [PATCH 01/19] configure: add --enable-tsan flag + fiber annotations for coroutine-ucontext

2020-05-26 Thread Robert Foley
On Sat, 23 May 2020 at 12:55, Philippe Mathieu-Daudé wrote: > > Hi Robert, > > On 5/22/20 6:07 PM, Robert Foley wrote: > > From: Lingfeng Yang > > > > We tried running QEMU under tsan in 2016, but tsan's lack of support for > > longjmp-based fibers was

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

2020-05-26 Thread Robert Foley
On Sat, 23 May 2020 at 13:18, Emilio G. Cota wrote: > > 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 cho

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

2020-05-26 Thread Robert Foley
On Sat, 23 May 2020 at 13:27, Emilio G. Cota wrote: > > 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

Re: [PATCH 02/19] cpu: convert queued work to a QSIMPLEQ

2020-05-26 Thread Robert Foley
On Sun, 24 May 2020 at 06:21, Philippe Mathieu-Daudé wrote: > > On 5/22/20 6:07 PM, Robert Foley wrote: > > From: "Emilio G. Cota" > > > > Instead of open-coding it. > > Please use a full sentence (repeating the patch subject): > > "Convert

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

2020-05-26 Thread Robert Foley
On Sat, 23 May 2020 at 16:06, Emilio G. Cota wrote: > > 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): > >

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

2020-05-26 Thread Robert Foley
On Sat, 23 May 2020 at 17:36, Emilio G. Cota wrote: > > 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 po

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

2020-05-26 Thread Robert Foley
On Sat, 23 May 2020 at 16:12, Emilio G. Cota wrote: > > On Fri, May 22, 2020 at 12:07:50 -0400, Robert Foley wrote: > > > QSIMPLEQ_INSERT_TAIL(&ctx->bh_slice_list, &slice, next); > > > > while ((s = QSIMPLEQ_FIRST(&ctx->bh_slice_list))) { &g

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

2020-05-26 Thread Robert Foley
Hi Stefan, On Tue, 26 May 2020 at 06:32, Stefan Hajnoczi wrote: > > On Fri, May 22, 2020 at 12:07:50PM -0400, Robert Foley wrote: > > For example: > > Atomic write of size 8 at 0x7b4800113c28 by main thread (mutexes: write > > M30): > > #0 __tsan_atomic64_

[PATCH v1 00/12] Add Thread Sanitizer support to QEMU

2020-05-29 Thread Robert Foley
ckets tcg: call qemu_spin_destroy for tb->jmp_lock translate-all: call qemu_spin_destroy for PageDesc thread: add tsan annotations to QemuSpin Lingfeng Yang (1): configure: add --enable-tsan flag + fiber annotations for coroutine-ucontext Robert Foley (4): tests/docker: Added dock

[PATCH v1 02/12] cpu: convert queued work to a QSIMPLEQ

2020-05-29 Thread Robert Foley
Signed-off-by: Robert Foley --- cpus-common.c | 25 - cpus.c| 14 -- hw/core/cpu.c | 1 + include/hw/core/cpu.h | 6 +++--- 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/cpus-common.c b/cpus-common.c index 55d5df8

[PATCH v1 04/12] cputlb: destroy CPUTLB with tlb_destroy

2020-05-29 Thread Robert Foley
From: "Emilio G. Cota" I was after adding qemu_spin_destroy calls, but while at it I noticed that we are leaking some memory. Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- accel/tcg/cputlb.c | 15 +++ exec.c | 1 + include/exec/

<    4   5   6   7   8   9   10   11   >