Re: [Qemu-devel] [RFC 0/6] enable numa configuration before machine_init() from HMP/QMP

2017-10-25 Thread Daniel P. Berrange
On Wed, Oct 25, 2017 at 08:57:43AM +0200, Eduardo Habkost wrote: > On Mon, Oct 23, 2017 at 10:45:41AM +0200, Igor Mammedov wrote: > > On Fri, 20 Oct 2017 17:53:09 -0200 > > Eduardo Habkost wrote: > > > > > On Fri, Oct 20, 2017 at 12:21:30PM +1100, David Gibson wrote: > > > > On Thu, Oct 19, 2017

Re: [Qemu-devel] qemu-img crash when resize a qcow2 file created with preallocation=full/falloc .

2017-10-25 Thread Thomas Huth
On 24.10.2017 05:28, Changlimin wrote: > Hi, > I am glad to see that qcow2 file created with preallocation=full/falloc can > be resized. But when I test it, qemu-img crashs. > qemu-img: block/qcow2-refcount.c:530: qcow2_refcount_area: Assertion > `!(start_offset % s->cluster_size)' failed. > > T

Re: [Qemu-devel] qemu-img crash when resize a qcow2 file created with preallocation=full/falloc .

2017-10-25 Thread Changlimin
The latest version from git e822e81e350825dd94f41ee2538ff1432b812eb9 Also ubuntu 17.10 -Original Message- From: Thomas Huth [mailto:th...@redhat.com] Sent: Wednesday, October 25, 2017 3:22 PM To: changlimin 00148 (Cloud); qemu-devel@nongnu.org Cc: Qemu-block; Max Reitz Subject: Re: [Qemu-

[Qemu-devel] [Bug 1726910] Re: UI request: add a function key toolbar (f1-f12)

2017-10-25 Thread Thomas Huth
** Changed in: qemu Importance: Undecided => Wishlist -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1726910 Title: UI request: add a function key toolbar (f1-f12) Status in QEMU: New Bug des

Re: [Qemu-devel] [PATCH 4/6] Fixed IRQ problem for CAN device can_pcm3680_pci.

2017-10-25 Thread KONRAD Frederic
I usually do that with the 'Signed-off-by'. eg: Signed-off-by: A Fix the irq stuff Signed-off-by: B Not sure if this is the right way? Fred On 10/25/2017 09:40 AM, Pavel Pisa wrote: On Wednesday 25 of October 2017 08:53:07 KONRAD Frederic wrote: Can't this be merged in the previous patch?

Re: [Qemu-devel] [PATCH 5/6] Minor clean-up of can_pcm3680_pci.

2017-10-25 Thread KONRAD Frederic
The same than the previous patch. Fred On 10/25/2017 01:29 AM, p...@cmp.felk.cvut.cz wrote: From: Deniz Eren Signed-off-by: Pavel Pisa --- hw/can/can_pcm3680_pci.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/can/can_pcm3680_pci.c b/hw/can/can_pcm3680_pci.

Re: [Qemu-devel] [RFC PATCH qemu] git-submodule.sh: Do not try writing to source directory if not necessary

2017-10-25 Thread Alexey Kardashevskiy
On 25/10/17 17:57, Daniel P. Berrange wrote: > On Wed, Oct 25, 2017 at 12:45:10PM +1100, Alexey Kardashevskiy wrote: >> On 25/10/17 03:27, Daniel P. Berrange wrote: >>> On Tue, Oct 24, 2017 at 07:58:53PM +1100, Alexey Kardashevskiy wrote: The new git-submodule.sh script writes .git-submodule-s

Re: [Qemu-devel] [PATCH 4/6] Fixed IRQ problem for CAN device can_pcm3680_pci.

2017-10-25 Thread Pavel Pisa
On Wednesday 25 of October 2017 08:53:07 KONRAD Frederic wrote: > Can't this be merged in the previous patch? Yes, my intention has been to keep other authors patches fully documenting their effort. So I cleaned and keep in logical chunks mine patches and do only formating of others. But I am hap

[Qemu-devel] Block format 'raw' does not support the option 'locking' when disable image locking with option locking=off

2017-10-25 Thread Changlimin
Hi, When running Oracle RAC, one image is shared between multiple vms, so I want to disable locking with option locking=off, But Block format 'raw' does not support the option 'locking'. How to disable locking? The version is git e822e81e350825dd94f41ee2538ff1432b812eb9 The command line is -dri

Re: [Qemu-devel] [PATCH v2] throttle: fix a qemu crash problem when calling blk_delete

2017-10-25 Thread Alberto Garcia
On Tue 24 Oct 2017 05:33:51 AM CEST, sochin jiang wrote: > --- a/block/throttle-groups.c > +++ b/block/throttle-groups.c > @@ -576,7 +576,9 @@ void throttle_group_unregister_tgm(ThrottleGroupMember > *tgm) > > /* remove the current tgm from the list */ > QLIST_REMOVE(tgm, round_robin);

Re: [Qemu-devel] [Qemu devel V4 PATCH] msf2: Remove dead code reported by Coverity

2017-10-25 Thread Darren Kenny
LGTM now, thanks. Reviewed-by: Darren Kenny Thanks, Darren. On Wed, Oct 25, 2017 at 07:59:04AM +0530, Subbaraya Sundeep wrote: Fixed incorrect frame size mask, validated maximum frame size in spi_write and removed dead code. Signed-off-by: Subbaraya Sundeep --- v4: changed %d to %u

Re: [Qemu-devel] [PATCH] BCM2837 and machine raspi3

2017-10-25 Thread bzt bzt
Hi Andrew! On Tue, Oct 24, 2017 at 6:44 PM, Andrew Baumann < andrew.baum...@microsoft.com> wrote: [...] > I see. The address space size sounds like it would affect the SoC > (although is there really 40 bits of usable physical address space beyond > the core?). If it's like pi2, however, the wifi

[Qemu-devel] [Bug 1727250] Re: qemu-io-test 147 segfaults when configured with gcov

2017-10-25 Thread R.Nageswara Sastry
from dmesg: [81791.481930] qemu-system-ppc[28640]: unhandled signal 11 at 0004 nip 7fff9f82f7d4 lr 10e182fc code 30001 [81791.649081] qemu-system-ppc[28651]: unhandled signal 11 at 0004 nip 7fffbd94f7d4 lr 10e182fc code 30001 [81791.817591] qemu-sys

[Qemu-devel] [Bug 1727250] [NEW] qemu-io-test 147 segfaults when configured with gcov

2017-10-25 Thread R.Nageswara Sastry
Public bug reported: Head is at 3d7196d43bfe12efe98568cb60057e273652b99b Steps to re-produce: 1. git clone ./configure --enable-gcov --target-list=ppc64-softmmu make cd tests/qemu-iotests 2. export qemu binary, in my environment export QEMU_PROG=/home/nasastry/qemu_gcov/ppc64-softmmu/qemu-system

[Qemu-devel] [PULL 00/51] tcg queued patches

2017-10-25 Thread Richard Henderson
est' into staging (2017-10-24 16:05:57 +0100) are available in the git repository at: git://github.com/rth7680/qemu.git tags/pull-tcg-20171025 for you to fetch changes up to cc689485ee3e9dca05765326ee8fd619a6ec48f0: translate-all: exit from tb_phys_invalidate if qht_remove fails (2017-10-24

[Qemu-devel] [PULL 03/51] tcg: Propagate args to op->args in tcg.c

2017-10-25 Thread Richard Henderson
From: Richard Henderson Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tcg.c | 121 ++ 1 file changed, 58 insertions(+), 63 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 98673f2

[Qemu-devel] [PULL 07/51] tcg: Return NULL temp for TCG_CALL_DUMMY_ARG

2017-10-25 Thread Richard Henderson
From: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tcg/tcg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index fc4d1ed58b..5fcdec1fc5 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h

[Qemu-devel] [PULL 01/51] tcg: Merge opcode arguments into TCGOp

2017-10-25 Thread Richard Henderson
From: Richard Henderson Rather than have a separate buffer of 10*max_ops entries, give each opcode 10 entries. The result is actually a bit smaller and should have slightly more cache locality. Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tcg/tcg.h | 37 ++---

[Qemu-devel] [PULL 05/51] tcg: Introduce arg_temp

2017-10-25 Thread Richard Henderson
From: Richard Henderson Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tcg.h | 5 + tcg/optimize.c | 4 ++-- tcg/tcg.c | 51 +-- 3 files changed, 32 insertions(+), 28 deletions(-) d

[Qemu-devel] [PULL 08/51] tcg: Introduce temp_arg, export temp_idx

2017-10-25 Thread Richard Henderson
From: Richard Henderson At the same time, drop the TCGContext argument and use tcg_ctx instead. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tcg/tcg.h | 12 tcg/tcg.c | 19 ++- 2 files changed, 18 insertions

[Qemu-devel] [PULL 06/51] tcg: Add temp_global bit to TCGTemp

2017-10-25 Thread Richard Henderson
From: Richard Henderson This avoids needing to test the index of a temp against nb_globals. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tcg/tcg.h | 12 tcg/optimize.c | 15 --- tcg/tcg.c | 11

[Qemu-devel] [PULL 11/51] tcg: Change temp_allocate_frame arg to TCGTemp

2017-10-25 Thread Richard Henderson
From: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tcg/tcg.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 840e65c0d4..c10e73babe 100644 --- a/tcg/tcg.c +++ b/tc

[Qemu-devel] [PULL 04/51] tcg: Propagate TCGOp down to allocators

2017-10-25 Thread Richard Henderson
From: Richard Henderson Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tcg.c | 75 +++ 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 4f56077

[Qemu-devel] [PULL 02/51] tcg: Propagate args to op->args in optimizer

2017-10-25 Thread Richard Henderson
From: Richard Henderson Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/optimize.c | 430 ++--- 1 file changed, 227 insertions(+), 203 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c i

[Qemu-devel] [PULL 23/51] tcg: Add CPUState cflags_next_tb

2017-10-25 Thread Richard Henderson
We were generating code during tb_invalidate_phys_page_range, check_watchpoint, cpu_io_recompile, and (seemingly) discarding the TB, assuming that it would magically be picked up during the next iteration through the cpu_exec loop. Instead, record the desired cflags in CPUState so that we request

[Qemu-devel] [PULL 09/51] tcg: Use per-temp state data in liveness

2017-10-25 Thread Richard Henderson
From: Richard Henderson This avoids having to allocate external memory for each temporary. Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tcg/tcg.h | 6 ++ tcg/tcg.c | 225 -- 2 files changed, 122 insertions(+), 1

[Qemu-devel] [PULL 12/51] tcg: Remove unused TCG_CALL_DUMMY_TCGV

2017-10-25 Thread Richard Henderson
From: Richard Henderson Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tcg.h | 1 - 1 file changed, 1 deletion(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index 0a0bc92dd9..c50805217c 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -496,7 +496,6 @@ static i

[Qemu-devel] [PULL 19/51] tcg: Remove TCGV_EQUAL*

2017-10-25 Thread Richard Henderson
When we used structures for TCGv_*, we needed a macro in order to perform a comparison. Now that we use pointers, this is just clutter. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tcg/tcg-op.h| 6 ++ tcg/tcg.h

[Qemu-devel] [PULL 14/51] tcg: Push tcg_ctx into generator functions

2017-10-25 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tcg/tcg-op.h | 100 +++ tcg/tcg-op.c | 47 ++-- 2 files changed, 69 insertions(+), 78 deletions(-) diff --git a/

[Qemu-devel] [PULL 15/51] tcg: Push tcg_ctx into tcg_gen_callN

2017-10-25 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/exec/helper-gen.h | 12 ++-- tcg/tcg.h | 3 +-- tcg/tcg.c | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/include/exec

[Qemu-devel] [PULL 13/51] tcg: Use per-temp state data in optimize

2017-10-25 Thread Richard Henderson
From: Richard Henderson While we're touching many of the lines anyway, adjust the naming of the functions to better distinguish when "TCGArg" vs "TCGTemp" should be used. Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tcg/tcg.h | 5 + tcg/optimize.c | 423

[Qemu-devel] [PULL 32/51] target/sparc: check CF_PARALLEL instead of parallel_cpus

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Thereby decoupling the resulting translated code from the current state of the system. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/sparc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Qemu-devel] [PULL 10/51] tcg: Avoid loops against variable bounds

2017-10-25 Thread Richard Henderson
From: Richard Henderson Copy s->nb_globals or s->nb_temps to a local variable for the purposes of iteration. This should allow the compiler to use low-overhead looping constructs on some hosts. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-of

[Qemu-devel] [PULL 18/51] tcg: Remove GET_TCGV_* and MAKE_TCGV_*

2017-10-25 Thread Richard Henderson
The GET and MAKE functions weren't really specific enough. We now have a full complement of functions that convert exactly between temporaries, arguments, tcgv pointers, and indices. The target/sparc change is also a bug fix, which would have affected a host that defines TCG_TARGET_HAS_extr[lh]_i6

[Qemu-devel] [PULL 29/51] target/m68k: check CF_PARALLEL instead of parallel_cpus

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Thereby decoupling the resulting translated code from the current state of the system. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/m68k/helper.h| 1 + target/m68k/op_helper.c | 33 ---

[Qemu-devel] [PULL 24/51] tcg: Include CF_COUNT_MASK in CF_HASH_MASK

2017-10-25 Thread Richard Henderson
Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 352abc7450..0fdb72bb22 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec

[Qemu-devel] [PULL 17/51] tcg: Introduce temp_tcgv_{i32,i64,ptr}

2017-10-25 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tcg/tcg.h | 26 +- tcg/tcg.c | 74 +++ 2 files changed, 53 insertions(+), 47 deletions(-) diff --git a/tcg/tcg.h

[Qemu-devel] [PULL 21/51] tcg: Use offsets not indices for TCGv_*

2017-10-25 Thread Richard Henderson
Using the offset of a temporary, relative to TCGContext, rather than its index means that we don't use 0. That leaves offset 0 free for a NULL representation without having to leave index 0 unused. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson

[Qemu-devel] [PULL 44/51] tcg: distribute profiling counters across TCGContext's

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" This is groundwork for supporting multiple TCG contexts. To avoid scalability issues when profiling info is enabled, this patch makes the profiling info counters distributed via the following changes: 1) Consolidate profile info into its own struct, TCGProfile, which T

[Qemu-devel] [PULL 39/51] translate-all: report correct avg host TB size

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Since commit 6e3b2bfd6 ("tcg: allocate TB structs before the corresponding translated code") we are not fully utilizing code_gen_buffer for translated code, and therefore are incorrectly reporting the amount of translated code as well as the average host TB size. Address th

[Qemu-devel] [PULL 22/51] tcg: define CF_PARALLEL and use it for TB hashing along with CF_COUNT_MASK

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" This will enable us to decouple code translation from the value of parallel_cpus at any given time. It will also help us minimize TB flushes when generating code via EXCP_ATOMIC. Note that the declaration of parallel_cpus is brought to exec-all.h to be able to define there

[Qemu-devel] [PULL 20/51] qom: Introduce CPUClass.tcg_initialize

2017-10-25 Thread Richard Henderson
Move target cpu tcg initialization to common code, called from cpu_exec_realizefn. Acked-by: Andreas Färber Reviewed-by: Emilio G. Cota Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/qom/cpu.h | 8 ++-- target/sparc/cpu.h | 2 +- exec

[Qemu-devel] [PULL 48/51] tcg: introduce regions to split code_gen_buffer

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" This is groundwork for supporting multiple TCG contexts. The naive solution here is to split code_gen_buffer statically among the TCG threads; this however results in poor utilization if translation needs are different across TCG threads. What we do here is to add an extr

[Qemu-devel] [PULL 16/51] tcg: Introduce tcgv_{i32, i64, ptr}_{arg, temp}

2017-10-25 Thread Richard Henderson
Transform TCGv_* to an "argument" or a temporary. For now, an argument is simply the temporary index. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/exec/helper-gen.h | 10 ++--- include/exec/helper-head.h | 12 +++--- tcg/tcg-op.h

[Qemu-devel] [PULL 42/51] gen-icount: fold exitreq_label into TCGContext

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Groundwork for supporting multiple TCG contexts. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/exec/gen-icount.h | 7 +++ tcg/tcg.h | 2 ++ 2 files changed, 5 inse

[Qemu-devel] [PULL 26/51] target/arm: check CF_PARALLEL instead of parallel_cpus

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Thereby decoupling the resulting translated code from the current state of the system. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/arm/helper-a64.h| 4 target/arm/helper-a64.c| 38 ++

Re: [Qemu-devel] [qemu-s390x] [PATCH v1] target/s390x: change CPU type name to "s390x-cpu"

2017-10-25 Thread David Hildenbrand
On 20.10.2017 17:26, Eric Blake wrote: > On 10/20/2017 06:58 AM, David Hildenbrand wrote: >> For now, e.g. host-s390-cpu wasn't exposed to the user. cpu-add, -cpu >> and the CPU model qmp interfaces didn't care about the actual type, >> as that information was hidden. >> >> This changed with CPU ho

[Qemu-devel] [PULL 28/51] target/i386: check CF_PARALLEL instead of parallel_cpus

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Thereby decoupling the resulting translated code from the current state of the system. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/i386/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) d

[Qemu-devel] [PULL 27/51] target/hppa: check CF_PARALLEL instead of parallel_cpus

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Thereby decoupling the resulting translated code from the current state of the system. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/hppa/helper.h| 2 ++ target/hppa/op_helper.c | 32 ++

Re: [Qemu-devel] [PATCH v1] target/s390x: change CPU type name to "s390x-cpu"

2017-10-25 Thread Cornelia Huck
On Fri, 20 Oct 2017 13:58:03 +0200 David Hildenbrand wrote: > For now, e.g. host-s390-cpu wasn't exposed to the user. cpu-add, -cpu > and the CPU model qmp interfaces didn't care about the actual type, > as that information was hidden. > > This changed with CPU hotplug via device_add. Now the ty

[Qemu-devel] [Bug 1727250] Re: qemu-io-test 147 segfaults when configured with gcov

2017-10-25 Thread R.Nageswara Sastry
qemu-iotest 194 also fails in the similar stack trace. # ./check -qcow2 194 QEMU -- "/home/nasastry/qemu_gcov/ppc64-softmmu/qemu-system-ppc64" -nodefaults -machine accel=qtest QEMU_IMG -- "/home/nasastry/qemu_gcov/qemu-img" QEMU_IO -- "/home/nasastry/qemu_gcov/qemu-io" --cach

[Qemu-devel] [PULL 31/51] target/sh4: check CF_PARALLEL instead of parallel_cpus

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Thereby decoupling the resulting translated code from the current state of the system. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/sh4/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[Qemu-devel] [PULL 30/51] target/s390x: check CF_PARALLEL instead of parallel_cpus

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Thereby decoupling the resulting translated code from the current state of the system. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/s390x/helper.h | 4 +++ target/s390x/mem_helper.c | 80 +

[Qemu-devel] [PULL 25/51] tcg: convert tb->cflags reads to tb_cflags(tb)

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Convert all existing readers of tb->cflags to tb_cflags, so that we use atomic_read and therefore avoid undefined behaviour in C11. Note that the remaining setters/getters of the field are protected by tb_lock, and therefore do not need conversion. Luckily all readers acc

[Qemu-devel] [PULL 33/51] tcg: check CF_PARALLEL instead of parallel_cpus

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Thereby decoupling the resulting translated code from the current state of the system. The tb->cflags field is not passed to tcg generation functions. So we add a field to TCGContext, storing there a copy of tb->cflags. Most architectures have <= 32 registers, which resul

[Qemu-devel] [PULL 35/51] tcg: Add CF_LAST_IO + CF_USE_ICOUNT to CF_HASH_MASK

2017-10-25 Thread Richard Henderson
These flags are used by target/*/translate.c, and affect code generation. Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 0fdb72

[Qemu-devel] [PULL 34/51] cpu-exec: lookup/generate TB outside exclusive region during step_atomic

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Now that all code generation has been converted to check CF_PARALLEL, we can generate !CF_PARALLEL code without having yet set !parallel_cpus -- and therefore without having to be in the exclusive region during cpu_exec_step_atomic. While at it, merge cpu_exec_step into cp

[Qemu-devel] [PULL 37/51] translate-all: use a binary search tree to track TBs in TBContext

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" This is a prerequisite for supporting multiple TCG contexts, since we will have threads generating code in separate regions of code_gen_buffer. For this we need a new field (.size) in struct tb_tc to keep track of the size of the translated code. This field uses a size_t t

[Qemu-devel] [PULL 38/51] exec-all: rename tb_free to tb_remove

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" We don't really free anything in this function anymore; we just remove the TB from the binary search tree. Suggested-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 2 +- acc

[Qemu-devel] [PULL 36/51] tcg: Remove CF_IGNORE_ICOUNT

2017-10-25 Thread Richard Henderson
Now that we have curr_cflags, we can include CF_USE_ICOUNT early and then remove it as necessary. Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 17 + accel/tcg/cpu-exec.c | 16 +--- accel/tcg/translate-all.c | 3 --

[Qemu-devel] [PULL 43/51] tcg: introduce **tcg_ctxs to keep track of all TCGContext's

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Groundwork for supporting multiple TCG contexts. Note that having n_tcg_ctxs is unnecessary. However, it is convenient to have it, since it will simplify iterating over the array: we'll have just a for loop instead of having to iterate over a NULL-terminated array (which w

[Qemu-devel] [PULL 41/51] tcg: define tcg_init_ctx and make tcg_ctx a pointer

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Groundwork for supporting multiple TCG contexts. The core of this patch is this change to tcg/tcg.h: > -extern TCGContext tcg_ctx; > +extern TCGContext tcg_init_ctx; > +extern TCGContext *tcg_ctx; Note that for now we set *tcg_ctx to whatever TCGContext is passed to tcg_

[Qemu-devel] [PULL 40/51] tcg: take tb_ctx out of TCGContext

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Groundwork for supporting multiple TCG contexts. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/exec/tb-context.h | 2 ++ tcg/tcg.h | 2 -- accel/tcg/cpu-exec.c

[Qemu-devel] [PULL 49/51] tcg: enable multiple TCG contexts in softmmu

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" This enables parallel TCG code generation. However, we do not take advantage of it yet since tb_lock is still held during tb_gen_code. In user-mode we use a single TCG context; see the documentation added to tcg_region_init for the rationale. Note that targets do not need

[Qemu-devel] [PULL 46/51] osdep: introduce qemu_mprotect_rwx/none

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/qemu/osdep.h | 2 ++ util/osdep.c | 41 + 2 files changed, 43 insertions(+) diff --git a/include/qemu/osdep.h b/in

[Qemu-devel] [PULL 50/51] tcg: Initialize cpu_env generically

2017-10-25 Thread Richard Henderson
This is identical for each target. So, move the initialization to common code. Move the variable itself out of tcg_ctx and name it cpu_env to minimize changes within targets. This also means we can remove tcg_global_reg_new_{ptr,i32,i64}, since there are no longer global-register temps created b

[Qemu-devel] [PULL 45/51] tcg: allocate optimizer temps with tcg_malloc

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Groundwork for supporting multiple TCG contexts. While at it, also allocate temps_used directly as a bitmap of the required size, instead of using a bitmap of TCG_MAX_TEMPS via TCGTempSet. Performance-wise we lose about 1.12% in a translation-heavy workload such as bootin

[Qemu-devel] [PULL 51/51] translate-all: exit from tb_phys_invalidate if qht_remove fails

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" Two or more threads might race while invalidating the same TB. We currently do not check for this at all despite taking tb_lock, which means we would wrongly invalidate the same TB more than once. This bug has actually been hit by users: I recently saw a report on IRC, alth

[Qemu-devel] [PULL 47/51] translate-all: use qemu_protect_rwx/none helpers

2017-10-25 Thread Richard Henderson
From: "Emilio G. Cota" The helpers require the address and size to be page-aligned, so do that before calling them. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 61 ++-

[Qemu-devel] [Bug 1727259] [NEW] qemu-io-test 58 segfaults when configured with gcov

2017-10-25 Thread R.Nageswara Sastry
Public bug reported: Head is at 3d7196d43bfe12efe98568cb60057e273652b99b Steps to re-produce: 1. git clone ./configure --enable-gcov --target-list=ppc64-softmmu make cd tests/qemu-iotests 2. export qemu binary, in my environment export QEMU_PROG=/home/nasastry/qemu_gcov/ppc64-softmmu/qemu-system

Re: [Qemu-devel] [PATCH/QEMU] s390x/kvm: use cpu_model_available for guarded storage on compat machines

2017-10-25 Thread Christian Borntraeger
Ping, I plan to submit belows patch for 2.11. We can then still look into a libvirt<->qemu interface for limiting host-model depending on machine versions (or not). On 10/20/2017 04:54 PM, Christian Borntraeger wrote: > Starting a guest with > > hvm > > > > on an IBM z14 results in

[Qemu-devel] [Bug 1727259] Re: qemu-io-test 58 segfaults when configured with gcov

2017-10-25 Thread R.Nageswara Sastry
from demsg: [84831.506917] qemu-io[35971]: unhandled signal 11 at 0004 nip 7fffae20f7d4 lr 102d3ec8 code 30001 [84831.519551] qemu-io[35977]: unhandled signal 11 at 0004 nip 7fff9925f7d4 lr 102d3ec8 code 30001 [84831.634000] qemu-io[35990]: unhandle

Re: [Qemu-devel] [libfdt][PATCH v3] implement strnlen for systems that need it

2017-10-25 Thread Stefan Hajnoczi
On Mon, Oct 23, 2017 at 05:27:26PM +0100, Peter Maydell wrote: > On 23 October 2017 at 17:09, Stefan Hajnoczi wrote: > >> +/* strnlen() is not available on Mac OS < 10.7 */ > >> +# if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7) > > > > Does this cover the case where MAC_OS_X_VERSION_MAX

Re: [Qemu-devel] [PATCH/QEMU] s390x/kvm: use cpu_model_available for guarded storage on compat machines

2017-10-25 Thread David Hildenbrand
On 25.10.2017 12:18, Christian Borntraeger wrote: > Ping, I plan to submit belows patch for 2.11. We can then still look into > a libvirt<->qemu interface for limiting host-model depending on machine > versions > (or not). I think this would be sufficient for now. Having different host models, d

Re: [Qemu-devel] [PATCH v1] target/s390x: change CPU type name to "s390x-cpu"

2017-10-25 Thread Christian Borntraeger
On 10/20/2017 01:58 PM, David Hildenbrand wrote: > For now, e.g. host-s390-cpu wasn't exposed to the user. cpu-add, -cpu > and the CPU model qmp interfaces didn't care about the actual type, > as that information was hidden. > > This changed with CPU hotplug via device_add. Now the type is visible

[Qemu-devel] Why qemu log start late and qemu start guest so long while using '-mem-prealloc' option?

2017-10-25 Thread Sam
Hi all, I'm using qemu to start vm in huge page enviroment, I use CMD1 and CMD2 to test the time of start of a vm, CMD1 contains option '-mem-prealloc', CMD2 does not contain this. I found while using CMD1, the time to run this command is longer then CMD2. For words, I know this option is to wait

Re: [Qemu-devel] [PATCHv3 07/13] esp: move TYPE_ESP and SysBusESPState from esp.c to esp.h

2017-10-25 Thread Peter Maydell
On 14 October 2017 at 19:38, Mark Cave-Ayland wrote: > This enables them to be used outside of esp.c. > > Signed-off-by: Mark Cave-Ayland > CC: Paolo Bonzini Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] Why qemu log start late and qemu start guest so long while using '-mem-prealloc' option?

2017-10-25 Thread Dr. David Alan Gilbert
* Sam (batmanu...@gmail.com) wrote: > Hi all, > > I'm using qemu to start vm in huge page enviroment, I use CMD1 and CMD2 to > test the time of start of a vm, CMD1 contains option '-mem-prealloc', CMD2 > does not contain this. > > I found while using CMD1, the time to run this command is longer t

Re: [Qemu-devel] [PATCHv3 09/13] lance: move TYPE_LANCE and SysBusPCNetState from lance.c to sun4m.h

2017-10-25 Thread Peter Maydell
On 14 October 2017 at 19:38, Mark Cave-Ayland wrote: > This enables them to be used outside of lance.c. > > Signed-off-by: Mark Cave-Ayland > CC: Jason Wang > --- > hw/net/lance.c |9 - > include/hw/sparc/sun4m.h | 13 + > 2 files changed, 13 insertions(+), 9

Re: [Qemu-devel] [PATCH] pci-assign: Remove

2017-10-25 Thread Anthony PERARD
On Fri, Oct 20, 2017 at 10:25:38AM +0200, Paolo Bonzini wrote: > Legacy PCI device assignment has been removed from Linux in 4.12, > and had been deprecated 2 years ago there. We can remove it from > QEMU as well. > > The ROM loading code was shared with Xen PCI passthrough, so move > it to hw/xe

Re: [Qemu-devel] Why qemu log start late and qemu start guest so long while using '-mem-prealloc' option?

2017-10-25 Thread Sam
So if I remove '-mem-prealloc' option, the qemu will not mmap while starting guest vm? Or will mmap after some thing? Or will mmap when admin to trigger it by qemu command? 2017-10-25 18:44 GMT+08:00 Dr. David Alan Gilbert : > * Sam (batmanu...@gmail.com) wrote: > > Hi all, > > > > I'm using qemu

Re: [Qemu-devel] [PATCH 1/4] qmp: introduce 'writeconfig' command

2017-10-25 Thread Eduardo Otubo
On Mon, Oct 23, 2017 at 05:13:07PM +0200, Vadim Galitsyn wrote: > Add support for `writeconfig' command for QMP monitor. > This is a simple way to keep track of current state of VM > after series of hotplugs and/or hotunplugs of different devices. > > Signed-off-by: Vadim Galitsyn > Signed-off-by

Re: [Qemu-devel] [PATCH 4/4] tests: test-hmp: print command execution result

2017-10-25 Thread Eduardo Otubo
On Mon, Oct 23, 2017 at 05:13:10PM +0200, Vadim Galitsyn wrote: > Provide HMP monitor command execution result as it would be seen > by user who established an HMP monitor session. > > Currently many commands may silently fail without any sign of that. > This patch let this info to be printed once

Re: [Qemu-devel] [PATCH 3/4] tests: test-hmp: extend with 'writeconfig' command

2017-10-25 Thread Eduardo Otubo
On Mon, Oct 23, 2017 at 05:13:09PM +0200, Vadim Galitsyn wrote: > Extend list of test cases with 'writeconfig' command. > > Signed-off-by: Vadim Galitsyn > Cc: Dr. David Alan Gilbert > Cc: qemu-devel@nongnu.org > --- > tests/test-hmp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/t

Re: [Qemu-devel] [PATCH 2/4] hmp: introduce 'writeconfig' command

2017-10-25 Thread Eduardo Otubo
On Mon, Oct 23, 2017 at 05:13:08PM +0200, Vadim Galitsyn wrote: > Add 'writeconfig' command for HMP monitor. This command is a > sibling of QMP command 'writeconfig'. > > This is a simple way to keep track of current state of VM > after series of hotplugs and/or hotunplugs of different devices. >

Re: [Qemu-devel] Why qemu log start late and qemu start guest so long while using '-mem-prealloc' option?

2017-10-25 Thread Dr. David Alan Gilbert
* Sam (batmanu...@gmail.com) wrote: > So if I remove '-mem-prealloc' option, the qemu will not mmap while > starting guest vm? Or will mmap after some thing? Or will mmap when admin > to trigger it by qemu command? It will mmap, but the kernel won't have allocated all of the memory, it will get al

Re: [Qemu-devel] Why qemu log start late and qemu start guest so long while using '-mem-prealloc' option?

2017-10-25 Thread Sam
Waiting time is different in different server, and different with memory and cpu usage in one server. For HP PowerEdge R720 with 15+ VM running, it's 10+ second. But If I remove '-mem-prealloc', it's 1 second. 2017-10-25 20:06 GMT+08:00 Dr. David Alan Gilbert : > * Sam (batmanu...@gmail.com) wr

[Qemu-devel] [PULL 03/11] target/arm: Move BE32 disassembler fixup

2017-10-25 Thread Richard Henderson
The Capstone disassembler has its own big-endian fixup. Doing this twice does not work, of course. Move our current fixup from target/arm/cpu.c to disas/arm.c. This makes read_memory_inner_func unused and can be removed. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson ---

[Qemu-devel] [PULL 09/11] ppc: Support Capstone in disas_set_info

2017-10-25 Thread Richard Henderson
Cc: qemu-...@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- disas.c | 4 target/ppc/translate_init.c | 6 ++ 2 files changed, 10 insertions(+) diff --git a/disas.c b/disas.c index 8d9bd4901c..e52e776a60 100644 --- a/disas.c +++ b

[Qemu-devel] [PULL 06/11] disas: Support the Capstone disassembler library

2017-10-25 Thread Richard Henderson
If configured, prefer this over our rather dated copy of the GPLv2-only binutils. This will be especially apparent with the proposed vector extensions to TCG, as disas/i386.c does not handle AVX. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Hender

[Qemu-devel] [PULL 00/11] Disassembler patches

2017-10-25 Thread Richard Henderson
at: git://github.com/rth7680/qemu.git tags/pull-dis-20171025 for you to fetch changes up to 383b90bc6a15f4b18ec34f9c0287b26f9a89fcb8: disas: Add capstone as submodule (2017-10-25 11:55:21 +0200) Capstone di

[Qemu-devel] [PULL 02/11] target/ppc: Convert to disas_set_info hook

2017-10-25 Thread Richard Henderson
Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- disas.c | 33 - monitor.c | 5 - target/ppc/translate.c | 5 + target/ppc/tra

[Qemu-devel] [PULL 04/11] target/arm: Don't set INSN_ARM_BE32 for CONFIG_USER_ONLY

2017-10-25 Thread Richard Henderson
This matches translator behaviour in arm_lduw_code. Fixes: https://bugs.launchpad.net/qemu/+bug/1724485 Signed-off-by: Richard Henderson --- target/arm/cpu.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 82dad0b721..a92d86f

[Qemu-devel] [PULL 11/11] disas: Add capstone as submodule

2017-10-25 Thread Richard Henderson
Do not require the submodule, but use it if present. Allow the command-line to override system or git submodule either way. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- Makefile| 15 +++ .gitmodules | 3 +++ capsto

[Qemu-devel] [PULL 01/11] target/i386: Convert to disas_set_info hook

2017-10-25 Thread Richard Henderson
Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- disas.c | 22 ++ monitor.c | 21 - target/i386/cpu.c | 12 target/i386/tr

[Qemu-devel] [PULL 08/11] arm: Support Capstone in disas_set_info

2017-10-25 Thread Richard Henderson
Tested-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- disas.c | 3 +++ target/arm/cpu.c | 21 ++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/di

[Qemu-devel] [PULL 07/11] i386: Support Capstone in disas_set_info

2017-10-25 Thread Richard Henderson
Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- disas.c | 4 target/i386/cpu.c | 7 +++ 2 files changed, 11 insertions(+) diff --git a/disas.c b/disas.c index e392a2926e..63dc573e9f 100644 -

[Qemu-devel] [PULL 05/11] disas: Remove unused flags arguments

2017-10-25 Thread Richard Henderson
Now that every target is using the disas_set_info hook, the flags argument is unused. Remove it. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/disas/disas.h | 4 ++-- include/exec/log.h

[Qemu-devel] [PULL 10/11] disas: Remove monitor_disas_is_physical

2017-10-25 Thread Richard Henderson
Even though there is only one monitor, and thus no race on this global data object, there is also no point in having it. We can just as well record the decision in the read_memory_function that we select. Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Be

Re: [Qemu-devel] Why qemu log start late and qemu start guest so long while using '-mem-prealloc' option?

2017-10-25 Thread Dr. David Alan Gilbert
* Sam (batmanu...@gmail.com) wrote: > Waiting time is different in different server, and different with memory > and cpu usage in one server. > > For HP PowerEdge R720 with 15+ VM running, it's 10+ second. Yes, that doesn't surprise me for a 40GB VM with pre-alloc (depending your total free memor

  1   2   >