[Qemu-devel] [PATCH 32/35] target/i386/kvm: do not acquire the BQL to call cpu_reset_interrupt

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini It's not needed anymore. Cc: Marcelo Tosatti Cc: Richard Henderson Cc: Eduardo Habkost Cc: k...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/i386/kvm.c | 4 1 file changed, 4 deletions(-) diff --git a/target/i386/kvm.c b

[Qemu-devel] [PATCH 31/35] translate-all: drop BQL assertion from cpu_interrupt

2018-09-17 Thread Emilio G. Cota
This patch explicitly drops the BQL assertion from the user-mode version; previous patches have taken care of softmmu's cpu_interrupt. Cc: Peter Crosthwaite Cc: Richard Henderson Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 1 - 1 file changed, 1 deletion(-) diff --git

[Qemu-devel] [PATCH 22/35] target/ppc: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: David Gibson Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- hw/ppc/ppc.c| 2 +- target/ppc/excp_helper.c| 3 ++- target/ppc/kvm.c| 4 ++-- target/ppc

[Qemu-devel] [PATCH 27/35] hw/sparc64: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Mark Cave-Ayland Cc: Artyom Tarasenko Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- hw/sparc64/sparc64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sparc64/sparc64.c b/hw/sparc64/sparc64.c index 408388945e..d7be7a2fb2

[Qemu-devel] [PATCH 30/35] tcg: drop BQL assertion from tcg_handle_interrupt

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Peter Crosthwaite Cc: Richard Henderson Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- accel/tcg/tcg-all.c | 1 - 1 file changed, 1 deletion(-) diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index 69ad44bd54..8b8b9ab05c 100644 --- a/accel/tcg

[Qemu-devel] [PATCH 20/35] target/nios2: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Chris Wulff Cc: Marek Vasut Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/nios2/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c index fbfaa2ce26..849eaaa392 100644

[Qemu-devel] [PATCH 14/35] whpx: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
I am not familiar with whpx, so I opted for the safe (and slow) route of performing probably many unnecessary atomic_reads. Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Emilio G. Cota --- target/i386/whpx-all.c | 42 +- 1 file changed, 25

[Qemu-devel] [PATCH 12/35] hax: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
I am not familiar with hax, so I opted for the safe (and slow) route of performing probably many unnecessary atomic_reads. Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Emilio G. Cota --- target/i386/hax-all.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions

[Qemu-devel] [PATCH 16/35] target/m68k: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Laurent Vivier Signed-off-by: Paolo Bonzini 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..4b15184a50 100644 --- a/target/m68k/cpu.c +++ b

[Qemu-devel] [PATCH 29/35] exec: drop BQL from cpu_reset_interrupt

2018-09-17 Thread Emilio G. Cota
off-by: Emilio G. Cota --- qom/cpu.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/qom/cpu.c b/qom/cpu.c index e2dfbde7c4..6afe428069 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -94,19 +94,9 @@ static void cpu_common_get_memory_mapping(CPUState *cpu, error_setg(errp, "Obtainin

[Qemu-devel] [PATCH 28/35] exec: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Peter Crosthwaite Cc: Richard Henderson Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- accel/tcg/cpu-exec.c | 6 +++--- accel/tcg/tcg-all.c | 3 +-- accel/tcg/translate-all.c | 2 +- qom/cpu.c | 6 +++--- 4 files changed, 8

[Qemu-devel] [PATCH 24/35] target/sh4: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Aurelien Jarno Signed-off-by: Paolo Bonzini 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..892a023c5c 100644

[Qemu-devel] [PATCH 15/35] target/lm32: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Michael Walle Signed-off-by: Paolo Bonzini 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..6c0178e1ea 100644 --- a/target/lm32/cpu.c +++ b

[Qemu-devel] [PATCH 26/35] target/unicore32: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Guan Xuetao Signed-off-by: Paolo Bonzini 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 25/35] target/sparc: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Mark Cave-Ayland Cc: Artyom Tarasenko Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/sparc/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 0f090ece54..cac7e18fc7 100644

[Qemu-devel] [PATCH 21/35] target/openrisc: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Stafford Horne Signed-off-by: Paolo Bonzini 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 08/35] target/arm: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Peter Maydell Cc: qemu-...@nongnu.org Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/arm/cpu.c| 2 +- target/arm/helper.c | 12 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c

[Qemu-devel] [PATCH 19/35] target/moxie: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Anthony Green Signed-off-by: Paolo Bonzini 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..f25144242b 100644 --- a/target/moxie/cpu.c

[Qemu-devel] [PATCH 13/35] hvf: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
I am not familiar with hvf, so I opted for the safe (and slow) route of performing probably many unnecessary atomic_reads. Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Emilio G. Cota --- target/i386/hvf/hvf.c| 7 --- target/i386/hvf/x86hvf.c | 22 +++--- 2

[Qemu-devel] [PATCH 17/35] target/microblaze: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: "Edgar E. Iglesias" Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/microblaze/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 9b546a2c18..c9cff79

[Qemu-devel] [PATCH 02/35] target/i386: use cpu_reset_interrupt

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini It will be changed to an atomic operation soon. Cc: Richard Henderson Cc: Eduardo Habkost Cc: Marcelo Tosatti Cc: k...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/i386/hax-all.c| 4 ++-- target/i386/hvf/x86hvf.c | 8

[Qemu-devel] [PATCH 34/35] exec: push BQL down to cpu->do_interrupt

2018-09-17 Thread Emilio G. Cota
Bonzini Signed-off-by: Emilio G. Cota --- accel/tcg/cpu-exec.c | 2 -- target/arm/helper.c| 28 ++-- target/ppc/excp_helper.c | 8 +++- target/s390x/excp_helper.c | 14 +- target/sh4/helper.c| 14 +- target/xtens

[Qemu-devel] [PATCH 35/35] exec: push BQL down to cpu->cpu_exec_interrupt

2018-09-17 Thread Emilio G. Cota
Walle Cc: Peter Crosthwaite Cc: Peter Maydell Cc: qemu-...@nongnu.org Cc: qemu-...@nongnu.org Cc: qemu-s3...@nongnu.org Cc: Richard Henderson Cc: Stafford Horne Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- docs/devel/multi-thread-tcg.txt | 7 +-- accel/tcg/cpu-exec.c

[Qemu-devel] [PATCH 11/35] target/i386: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Marcelo Tosatti Cc: k...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/i386/cpu.c| 7 --- target/i386/helper.c | 4 ++-- target/i386/kvm.c| 44

[Qemu-devel] [PATCH 10/35] target/hppa: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Richard Henderson Signed-off-by: Paolo Bonzini 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..fe10c1a86a 100644 --- a/target/hppa/cpu.c

[Qemu-devel] [PATCH 01/35] tcg: access cpu->icount_decr.u16.high with atomics

2018-09-17 Thread Emilio G. Cota
Consistently access u16.high with atomics to avoid undefined behaviour in MTTCG. Note that icount_decr.u16.low is only used in icount mode, so regular accesses to it are OK. Cc: Peter Crosthwaite Cc: Richard Henderson Signed-off-by: Emilio G. Cota --- accel/tcg/tcg-all.c | 2 +- accel

[Qemu-devel] [PATCH 06/35] exec: use cpu_reset_interrupt

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini It will be changed to an atomic operation soon. Cc: Peter Crosthwaite Cc: Richard Henderson Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- accel/tcg/cpu-exec.c | 6 +++--- exec.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions

[Qemu-devel] [PATCH 00/35] exec: drop BQL from interrupt handling

2018-09-17 Thread Emilio G. Cota
This series comes originally from a series of patches that Paolo sent to me a long time ago. I have kept most of his S-o-b tags, but I have done the forward port of the patches to the current QEMU code base, so please blame all possible bugs on me, not him. The goal of this series is to push the

[Qemu-devel] [PATCH 09/35] target/cris: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: "Edgar E. Iglesias" Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/cris/cpu.c| 3 ++- target/cris/helper.c | 8 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/target/cris/cpu.c b/target/cris/cpu.c index

[Qemu-devel] [PATCH 04/35] target/ppc: use cpu_reset_interrupt

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini It will be changed to an atomic operation soon. Cc: David Gibson Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/ppc/excp_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target

[Qemu-devel] [PATCH 18/35] target/mips: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Aurelien Jarno Cc: Aleksandar Markovic Cc: James Hogan Signed-off-by: Paolo Bonzini 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

[Qemu-devel] [PATCH 03/35] target/openrisc: use cpu_reset_interrupt

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini It will be changed to an atomic operation soon. Cc: Stafford Horne 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 a/target/openrisc/sys_helper.c b/target

[Qemu-devel] [PATCH 05/35] target/s390x: use cpu_reset_interrupt

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini It will be changed to an atomic operation soon. Cc: Cornelia Huck Cc: Richard Henderson Cc: Alexander Graf Cc: David Hildenbrand Cc: qemu-s3...@nongnu.org Signed-off-by: Paolo Bonzini Signed-off-by: Emilio G. Cota --- target/s390x/excp_helper.c | 2 +- 1 file changed

[Qemu-devel] [PATCH 07/35] target/alpha: access cpu->interrupt_request with atomics

2018-09-17 Thread Emilio G. Cota
From: Paolo Bonzini Cc: Richard Henderson Signed-off-by: Paolo Bonzini 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 b08078e7fc..76001e66f1 100644 --- a/target

[Qemu-devel] [PATCH v3 1/3] softfloat: remove float64_trunc_to_int

2018-09-13 Thread Emilio G. Cota
It has not had users since f83311e476 ("target-m68k: use floatx80 internally", 2017-06-21). Note that no other bit-width has floatX_trunc_to_int. Signed-off-by: Emilio G. Cota --- include/fpu/softfloat.h | 1 - fpu/softfloat.c | 7 --- 2 files changed, 8 deletions(-)

[Qemu-devel] [PATCH v3 3/3] tests/fp/fp-test: add floating point tests

2018-09-13 Thread Emilio G. Cota
inputs - *_to_int16/uint16 conversions - scalbn for fixed point - muladd variants - min/max - exp2 - log2 - float*_compare (except float16_compare) Signed-off-by: Emilio G. Cota --- configure | 2 + tests/fp/platform.h| 41 ++ tests/fp/fp-test.c | 992

[Qemu-devel] [PATCH v3 2/3] gitmodules: add berkeley's softfloat + testfloat version 3

2018-09-13 Thread Emilio G. Cota
These are BSD-licensed so we can add them as submodules. Signed-off-by: Emilio G. Cota --- .gitmodules | 6 ++ tests/fp/berkeley-softfloat-3 | 1 + tests/fp/berkeley-testfloat-3 | 1 + 3 files changed, 8 insertions(+) create mode 16 tests/fp/berkeley-softfloat-3

[Qemu-devel] [PATCH v3 0/3] softfloat tests based on berkeley's testfloat

2018-09-13 Thread Emilio G. Cota
v2: https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg00927.html Changes: - Add a patch to remove an unused FP primitive (patch 1). This patch can be applied before patches 2 and 3. The gcov numbers quoted in patch 3 assume that patch 1 has been applied. - Rewrite fp-test.c from

Re: [Qemu-devel] [PATCH v2 12/12] qht-bench: add -p flag to precompute hash values

2018-09-11 Thread Emilio G. Cota
On Tue, Sep 11, 2018 at 17:46:41 -0700, Richard Henderson wrote: > On 09/10/2018 11:58 AM, Emilio G. Cota wrote: > > @@ -289,7 +297,9 @@ static void htable_init(void) > > /* avoid allocating memory later by allocating all the keys now */ > > keys = g_mal

Re: [Qemu-devel] [PATCH v2 02/12] util: add atomic64

2018-09-11 Thread Emilio G. Cota
On Tue, Sep 11, 2018 at 05:43:38 -0700, Richard Henderson wrote: > On 09/10/2018 04:27 PM, Emilio G. Cota wrote: > > +#define GEN_READ(name, type)\ > > +type name(

[Qemu-devel] [PATCH v3 09/13] target/i386: move cpu_tmp2_i32 to DisasContext

2018-09-11 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 347 1 file changed, 174 insertions(+), 173 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index c51f61ca2c..ec68f7dba1 100644 --- a/target/i386/translate.c +++ b

[Qemu-devel] [PATCH v3 11/13] target/i386: move cpu_tmp1_i64 to DisasContext

2018-09-11 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 160 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index cd880cc2a8..61a98ef872 100644 --- a/target/i386/translate.c +++ b

[Qemu-devel] [PATCH v3 03/13] target/i386: move cpu_T0 to DisasContext

2018-09-11 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 1174 --- 1 file changed, 594 insertions(+), 580 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index c6b1baab9d..73fd7e5b9a 100644 --- a/target/i386/translate.c +++ b

[Qemu-devel] [PATCH v3 12/13] target/i386: move x86_64_hregs to DisasContext

2018-09-11 Thread Emilio G. Cota
And convert it to a bool to use an existing hole in the struct. Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 307 1 file changed, 154 insertions(+), 153 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index

[Qemu-devel] [PATCH v3 05/13] target/i386: move cpu_tmp0 to DisasContext

2018-09-11 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 282 1 file changed, 144 insertions(+), 138 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index bd27e65344..873231fb44 100644 --- a/target/i386/translate.c +++ b

[Qemu-devel] [PATCH v3 02/13] target/i386: move cpu_A0 to DisasContext

2018-09-11 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 472 1 file changed, 236 insertions(+), 236 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index e9f512472e..c6b1baab9d 100644 --- a/target/i386/translate.c +++ b

[Qemu-devel] [PATCH v3 13/13] configure: enable mttcg for i386 and x86_64

2018-09-11 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index 58862d2ae8..f715252c9f 100755 --- a/configure +++ b/configure @@ -7025,12 +7025,14 @@ TARGET_ABI_DIR="" case "$target_n

[Qemu-devel] [PATCH v3 06/13] target/i386: move cpu_tmp4 to DisasContext

2018-09-11 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 78 - 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index 873231fb44..0ad6ffc4af 100644 --- a/target/i386/translate.c +++ b

[Qemu-devel] [PATCH v3 08/13] target/i386: move cpu_ptr1 to DisasContext

2018-09-11 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 52 - 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index 9531dafebe..c51f61ca2c 100644 --- a/target/i386/translate.c +++ b

[Qemu-devel] [PATCH v3 07/13] target/i386: move cpu_ptr0 to DisasContext

2018-09-11 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 101 +--- 1 file changed, 52 insertions(+), 49 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index 0ad6ffc4af..9531dafebe 100644 --- a/target/i386/translate.c +++ b

[Qemu-devel] [PATCH v3 01/13] target/i386: move cpu_cc_srcT to DisasContext

2018-09-11 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index 1f9d1d9b24..e9f512472e 100644 --- a/target/i386/translate.c +++ b/target/i386

[Qemu-devel] [PATCH v3 00/13] i386 + x86_64 mttcg

2018-09-11 Thread Emilio G. Cota
v2: https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg01122.html Changes since v2: - Add rth's R-b tag to the last patch - Drop v2's first 10 patches, since Paolo already picked those up - Move TCG temps + x86_64_hregs to DisasContext + While at it, drop the cpu_ prefix from the TCG

[Qemu-devel] [PATCH v3 10/13] target/i386: move cpu_tmp3_i32 to DisasContext

2018-09-11 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 64 - 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index ec68f7dba1..cd880cc2a8 100644 --- a/target/i386/translate.c +++ b

[Qemu-devel] [PATCH v3 04/13] target/i386: move cpu_T1 to DisasContext

2018-09-11 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 341 1 file changed, 170 insertions(+), 171 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index 73fd7e5b9a..bd27e65344 100644 --- a/target/i386/translate.c +++ b

Re: [Qemu-devel] [PATCH 5/6] target/i386/translate: use thread-local storage in !user-mode

2018-09-11 Thread Emilio G. Cota
On Tue, Sep 11, 2018 at 13:24:03 +0200, Paolo Bonzini wrote: > On 10/09/2018 14:30, Emilio G. Cota wrote: > >> I'm confused - as we can have multi-threaded user space don't the same > >> requirements apply? > > In user-mode, code generation is serialized by mmap_lock.

[Qemu-devel] [PATCH v2 10/12] cpus: access .qemu_icount_bias with atomic64

2018-09-10 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- cpus.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/cpus.c b/cpus.c index f045416c94..5a16a0186c 100644 --- a/cpus.c +++ b/cpus.c @@ -277,7 +277,8 @@ static int64_t cpu_get_icount_raw_locked(void) static int64_t

[Qemu-devel] [PATCH v2 08/12] cpus: always call seqlock_write in cpu_update_icount

2018-09-10 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- cpus.c | 4 1 file changed, 4 deletions(-) diff --git a/cpus.c b/cpus.c index ebc13bac2d..38dabb138d 100644 --- a/cpus.c +++ b/cpus.c @@ -250,16 +250,12 @@ void cpu_update_icount(CPUState *cpu) int64_t executed = cpu_get_icount_executed(cpu); cpu

[Qemu-devel] [PATCH v2 04/12] qsp: use atomic64 accessors

2018-09-10 Thread Emilio G. Cota
Throughput: 10.89 Mops/s Signed-off-by: Emilio G. Cota --- util/qsp.c | 49 - 1 file changed, 8 insertions(+), 41 deletions(-) diff --git a/util/qsp.c b/util/qsp.c index b0c2575d10..c16af03f6a 100644 --- a/util/qsp.c +++ b/util/qsp.c

[Qemu-devel] [PATCH v2 03/12] tests: add atomic64-bench

2018-09-10 Thread Emilio G. Cota
- With CONFIG_ATOMIC64: $ tests/atomic64-bench -n 1 Throughput: 310.40 Mops/s - Without: $ tests/atomic64-bench -n 1 Throughput: 149.08 Mops/s Signed-off-by: Emilio G. Cota --- tests/atomic64-bench.c | 171 + tests/Makefile.include

[Qemu-devel] [PATCH v2 00/12] i386 + x86_64 mttcg

2018-09-10 Thread Emilio G. Cota
v1: https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg00237.html Changes since v1: - Add Alex's R-b tags - Introduce atomic64 to just use a spinlock when doing atomic_set/read on i64's and u64's if !CONFIG_ATOMIC64, just like the kernel does. + Add a benchmark for these types of

[Qemu-devel] [PATCH v2 06/12] atomic: fix comment s/x64_64/x86_64/

2018-09-10 Thread Emilio G. Cota
Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qemu/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h index c34c2f78c4..f6993a8fb1 100644 --- a/include/qemu/atomic.h +++ b/include/qemu/atomic.h @@ -98,7

[Qemu-devel] [PATCH v2 02/12] util: add atomic64

2018-09-10 Thread Emilio G. Cota
This introduces read/set accessors for int64_t and uint64_t. Signed-off-by: Emilio G. Cota --- include/qemu/atomic.h | 34 ++ util/atomic64.c | 83 +++ util/cacheinfo.c | 3 ++ util/Makefile.objs| 1 + 4 files changed, 121

[Qemu-devel] [PATCH v2 01/12] cacheinfo: add i/d cache_linesize_log

2018-09-10 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- include/qemu/osdep.h | 2 ++ util/cacheinfo.c | 5 + 2 files changed, 7 insertions(+) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index a91068df0e..a746a5e531 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -570,6 +570,8

[Qemu-devel] [PATCH v2 12/12] configure: enable mttcg for i386 and x86_64

2018-09-10 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index 58862d2ae8..f715252c9f 100755 --- a/configure +++ b/configure @@ -7025,12 +7025,14 @@ TARGET_ABI_DIR="" case "$target_name" in i

[Qemu-devel] [PATCH v2 11/12] target/i386/translate: use thread-local storage in !user-mode

2018-09-10 Thread Emilio G. Cota
Needed for MTTCG. Note that in user-mode, code generation is serialized by mmap_lock, so making these variables per-thread would just waste TLS space. Acked-by: Alex Bennée Signed-off-by: Emilio G. Cota --- target/i386/translate.c | 24 1 file changed, 16 insertions

[Qemu-devel] [PATCH v2 09/12] cpus: access .qemu_icount with atomic64

2018-09-10 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- cpus.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpus.c b/cpus.c index 38dabb138d..f045416c94 100644 --- a/cpus.c +++ b/cpus.c @@ -252,8 +252,8 @@ void cpu_update_icount(CPUState *cpu) seqlock_write_lock

[Qemu-devel] [PATCH v2 07/12] cpus: initialize timers_state.vm_clock_lock

2018-09-10 Thread Emilio G. Cota
We forgot to initialize the spinlock introduced in 94377115b2 ("cpus: protect TimerState writes with a spinlock", 2018-08-23). Fix it. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- cpus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cpus.c b/cpus.c index

[Qemu-devel] [PATCH v2 05/12] test-rcu-list: access n_reclaims and n_nodes_removed with atomic64

2018-09-10 Thread Emilio G. Cota
To avoid undefined behaviour. Note that these "atomics" are atomic in the "access once" sense. The variables are updated by a single thread at a time, so no "full" atomics are necessary. Signed-off-by: Emilio G. Cota --- tests/test-rcu-list.c | 20 ++

[Qemu-devel] [PATCH v2 12/12] qht-bench: add -p flag to precompute hash values

2018-09-10 Thread Emilio G. Cota
50.87 MT/s Signed-off-by: Emilio G. Cota --- tests/qht-bench.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/tests/qht-bench.c b/tests/qht-bench.c index f492b3a20a..2089e2bed1 100644 --- a/tests/qht-bench.c +++ b/tests/qht-bench.c @@ -53,6 +53,7

[Qemu-devel] [PATCH v2 05/12] test-qht: test deletion of the last entry in a bucket

2018-09-10 Thread Emilio G. Cota
This improves coverage by one (!) LoC in qht.c, bringing the coverage rate up from 90.00% to 90.28%. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- tests/test-qht.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/test-qht.c b/tests/test-qht.c

[Qemu-devel] [PATCH v2 07/12] qht: drop ht argument from qht iterators

2018-09-10 Thread Emilio G. Cota
Accessing the HT from an iterator results almost always in a deadlock. Given that only one qht-internal function uses this argument, drop it from the interface. Suggested-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qemu/qht.h| 5 ++--- accel/tcg/translate-all.c | 6

[Qemu-devel] [PATCH v2 06/12] test-qht: speed up + test qht_resize

2018-09-10 Thread Emilio G. Cota
. seqlock retry, trylock fail). - Without gcov: Before: 1.987s After: 0.528s The speedup is almost the same as with gcov, although the "before" run is a lot faster. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- tests/test-qht.c | 4 1 file changed, 4 insertions(+)

[Qemu-devel] [PATCH v2 04/12] test-qht: test removal of non-existent entries

2018-09-10 Thread Emilio G. Cota
This improves qht.c code coverage from 89.44% to 90.00%. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- tests/test-qht.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/tests/test-qht.c b/tests/test-qht.c index 283fb3db39..05b1d6807a

[Qemu-devel] [PATCH v2 11/12] qht: constify arguments to some internal functions

2018-09-10 Thread Emilio G. Cota
These functions do not modify their @ht or @bucket arguments. Constify those arguments. Signed-off-by: Emilio G. Cota --- util/qht.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/util/qht.c b/util/qht.c index 4378775d68..aa51be3c52 100644 --- a/util/qht.c

[Qemu-devel] [PATCH v2 10/12] qht: constify qht_statistics_init

2018-09-10 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- include/qemu/qht.h | 2 +- util/qht.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/qemu/qht.h b/include/qemu/qht.h index 2e2d6bca93..758c7ac6c8 100644 --- a/include/qemu/qht.h +++ b/include/qemu/qht.h @@ -211,7

[Qemu-devel] [PATCH v2 09/12] qht: constify qht_lookup

2018-09-10 Thread Emilio G. Cota
seqlock_read_begin takes a const param since c04649eeea ("seqlock: constify seqlock_read_begin", 2018-08-23), so we can constify the entire lookup. Signed-off-by: Emilio G. Cota --- include/qemu/qht.h | 4 ++-- util/qht.c | 16 2 files changed, 10 inserti

[Qemu-devel] [PATCH v2 08/12] qht: fix comment in qht_bucket_remove_entry

2018-09-10 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- util/qht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qht.c b/util/qht.c index 50ed7a2102..3564a7e20f 100644 --- a/util/qht.c +++ b/util/qht.c @@ -671,7 +671,7 @@ qht_entry_move(struct qht_bucket *to, int i, struct qht_bucket *from

[Qemu-devel] [PATCH v2 00/12] qht improvements for 3.1

2018-09-10 Thread Emilio G. Cota
v1: https://github.com/cota/qemu/tree/qht-for-3.1-v2 Changes since v1: - Added Alex's R-b tags to patches 1-6 - Added a patch to drop *ht from qht_iter and qht_iter_remove, as suggested by Alex. - Added some constification patches - Added a flag to qht-bench to precompute the hashes, which

[Qemu-devel] [PATCH v2 03/12] test-qht: test qht_iter_remove

2018-09-10 Thread Emilio G. Cota
Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- tests/test-qht.c | 50 ++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/tests/test-qht.c b/tests/test-qht.c index dda6a067be..283fb3db39 100644 --- a/tests/test-qht.c +++ b

[Qemu-devel] [PATCH v2 02/12] qht: add qht_iter_remove

2018-09-10 Thread Emilio G. Cota
be racy, since between the iteration and the removals other threads might insert additional elements. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/qemu/qht.h | 19 util/qht.c | 74 +- 2 files changed, 85 insertions

[Qemu-devel] [PATCH v2 01/12] qht: remove unused map param from qht_remove__locked

2018-09-10 Thread Emilio G. Cota
Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- util/qht.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/util/qht.c b/util/qht.c index 1e3a072e25..28d9273371 100644 --- a/util/qht.c +++ b/util/qht.c @@ -692,8 +692,7 @@ static inline void

Re: [Qemu-devel] [PATCH v2 0/2] softfloat tests based on berkeley's testfloat

2018-09-10 Thread Emilio G. Cota
On Mon, Sep 10, 2018 at 16:41:21 +0100, Alex Bennée wrote: > > Emilio G. Cota writes: > > > On Mon, Sep 10, 2018 at 12:26:58 +0100, Alex Bennée wrote: > >> > >> Emilio G. Cota writes: > >> > >> > A few fixes since yesterday's v1: > >

Re: [Qemu-devel] [PATCH 1/6] qsp: drop atomics when using the seqlock

2018-09-10 Thread Emilio G. Cota
On Mon, Sep 10, 2018 at 01:32:15 +0200, Paolo Bonzini wrote: > On 03/09/2018 19:18, Emilio G. Cota wrote: > > Using atomics here is a mistake since they're not guaranteed > > to compile. > > But isn't it technically a C11 data race if you don't use atomics? Yes, it'

Re: [Qemu-devel] [PATCH v2 0/2] softfloat tests based on berkeley's testfloat

2018-09-10 Thread Emilio G. Cota
On Mon, Sep 10, 2018 at 12:26:58 +0100, Alex Bennée wrote: > > Emilio G. Cota writes: > > > A few fixes since yesterday's v1: > > https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg00884.html > > > > - Convert copy_qemu_to_soft80 to qemu_to_soft80, jus

Re: [Qemu-devel] [PATCH v2 2/2] tests: add floating point tests

2018-09-10 Thread Emilio G. Cota
On Mon, Sep 10, 2018 at 12:00:56 +0100, Alex Bennée wrote: > Emilio G. Cota writes: > > diff --git a/tests/Makefile.include b/tests/Makefile.include > > index 87c81d1dcc..363f133101 100644 > > --- a/tests/Makefile.include > > +++ b/tests/Makefile.include > > @@

Re: [Qemu-devel] [PATCH 5/6] target/i386/translate: use thread-local storage in !user-mode

2018-09-10 Thread Emilio G. Cota
On Mon, Sep 10, 2018 at 10:17:53 +0100, Alex Bennée wrote: > > Emilio G. Cota writes: > > > Needed for MTTCG. > > > > Signed-off-by: Emilio G. Cota > > --- > > target/i386/translate.c | 24 > > 1 file changed, 16 ins

[Qemu-devel] [PATCH v2 0/2] softfloat tests based on berkeley's testfloat

2018-09-08 Thread Emilio G. Cota
A few fixes since yesterday's v1: https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg00884.html - Convert copy_qemu_to_soft80 to qemu_to_soft80, just like the other conversion functions - Set fp-test as the program name as reported by itself - Fix Makefile to include .d files so that

[Qemu-devel] [PATCH v2 2/2] tests: add floating point tests

2018-09-08 Thread Emilio G. Cota
(this flag was added to softfloat v3). Signed-off-by: Emilio G. Cota --- configure |2 + tests/fp/platform.h| 41 ++ tests/fp/fp-test.c | 1052 tests/fp/wrap.inc.c| 600 +++ tests/Makefile.include |3

[Qemu-devel] [PATCH v2 1/2] gitmodules: add berkeley's softfloat + testfloat version 3

2018-09-08 Thread Emilio G. Cota
These are BSD-licensed so we can add them as submodules. Signed-off-by: Emilio G. Cota --- .gitmodules | 6 ++ tests/fp/berkeley-softfloat-3 | 1 + tests/fp/berkeley-testfloat-3 | 1 + 3 files changed, 8 insertions(+) create mode 16 tests/fp/berkeley-softfloat-3

Re: [Qemu-devel] [PATCH 0/2] softfloat tests based on berkeley's testfloat

2018-09-08 Thread Emilio G. Cota
On Fri, Sep 07, 2018 at 18:07:29 -0400, Emilio G. Cota wrote: > You can pull this tree from: > https://github.com/cota/qemu/tree/fp-test I just sent a v2; please review that one instead. Thanks, Emilio

[Qemu-devel] [PATCH 0/2] softfloat tests based on berkeley's testfloat

2018-09-07 Thread Emilio G. Cota
Alex was not too pleased with my previous fp-test incarnation; it only tested some 32 and 64 primitives, and it relied on test files by IBM that had no particular license (so we could not redistribute them, and IBM might pull them off the web any time). This attempt leverages berkeley's softfloat

[Qemu-devel] [PATCH 2/2] tests: add floating point tests

2018-09-07 Thread Emilio G. Cota
code are simple style changes, although a few hacks have been added because our implementation does not provide exactly the same features as softfloat. I've noted these hacks with XXX comments. Signed-off-by: Emilio G. Cota --- configure |2 + tests/fp/platform.h| 41

[Qemu-devel] [PATCH 1/2] gitmodules: add berkeley's softfloat + testfloat version 3

2018-09-07 Thread Emilio G. Cota
These are BSD-licensed so we can add them as submodules. Signed-off-by: Emilio G. Cota --- .gitmodules | 6 ++ tests/fp/berkeley-softfloat-3 | 1 + tests/fp/berkeley-testfloat-3 | 1 + 3 files changed, 8 insertions(+) create mode 16 tests/fp/berkeley-softfloat-3

Re: [Qemu-devel] [PATCH 2/6] qht: add qht_iter_remove

2018-09-07 Thread Emilio G. Cota
On Fri, Sep 07, 2018 at 15:51:12 +0100, Alex Bennée wrote: > > Emilio G. Cota writes: > > > This currently has no users, but the use case is so common that I > > think we must support it. > > > > Note that without the appended we cannot safely remove a set o

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

2018-09-05 Thread Emilio G. Cota
Patches are now on the list to enable MTTCG for i386 and x86_64 guests. See v2 here: https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg00237.html I'm hoping these patches will be in the next QEMU release. Regarding your last question: > For instance, has support for strong-on-weak memory

[Qemu-devel] [Bug 1529173] Re: Absolutely slow Windows XP SP3 installation

2018-09-05 Thread Emilio G. Cota
For integer workloads such as installing an OS you should expect TCG to be about 12x slower than KVM on average. That is on current master; note that TCG has gotten faster in the last couple of years. See a performance comparison from v2.7.0 to v2.11.0 for SPEC06 here: https://imgur.com/a/5P5zj

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

2018-09-05 Thread Emilio G. Cota
** Changed in: qemu Status: New => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1735049 Title: Need MTTCG support for x86 guests Status in QEMU: In Progress Bug

[Qemu-devel] [Bug 1529173] Re: Absolutely slow Windows XP SP3 installation

2018-09-05 Thread Emilio G. Cota
** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1529173 Title: Absolutely slow Windows XP SP3 installation Status in QEMU: Invalid Bug

Re: [Qemu-devel] [PATCH v2 0/3] target/riscv: use tcg_lookup_and_goto_ptr

2018-09-04 Thread Emilio G. Cota
On Tue, Sep 04, 2018 at 16:42:32 -0700, Alistair Francis wrote: > On Tue, Sep 4, 2018 at 4:39 PM, Emilio G. Cota wrote: > > On Tue, Sep 04, 2018 at 13:18:28 -0700, Alistair Francis wrote: > >> On Fri, Aug 31, 2018 at 3:22 PM, Emilio G. Cota wrote: > >> > On Fri,

Re: [Qemu-devel] [PATCH v2 0/3] target/riscv: use tcg_lookup_and_goto_ptr

2018-09-04 Thread Emilio G. Cota
On Tue, Sep 04, 2018 at 13:18:28 -0700, Alistair Francis wrote: > On Fri, Aug 31, 2018 at 3:22 PM, Emilio G. Cota wrote: > > On Fri, Aug 10, 2018 at 13:39:38 -0400, Emilio G. Cota wrote: > >> Changes wrt v1: changed patch 3 as suggested by Richard. Also > >> added h

<    4   5   6   7   8   9   10   11   12   13   >