Re: [Qemu-devel] Disable image locking for snapshot drive?

2017-07-19 Thread Fam Zheng
On Tue, 07/18 16:19, Andrew Baumann wrote: > > From: Eric Blake [mailto:ebl...@redhat.com] > > Sent: Tuesday, 18 July 2017 8:07 > > On 07/17/2017 07:33 PM, John Snow wrote: > > > On 07/17/2017 07:30 PM, Andrew Baumann via Qemu-devel wrote: > > >> I'm running a recent Linux build of qemu on Windows

[Qemu-devel] [PATCH v8 3/3] migration: add bitmap for received page

2017-07-19 Thread Alexey Perevalov
This patch adds ability to track down already received pages, it's necessary for calculation vCPU block time in postcopy migration feature, maybe for restore after postcopy migration failure. Also it's necessary to solve shared memory issue in postcopy livemigration. Information about received page

[Qemu-devel] [PATCH v8 0/3] Add bitmap for received pages in postcopy migration

2017-07-19 Thread Alexey Perevalov
This is 8th version of [PATCH v1 0/2] Add bitmap for copied pages in postcopy migration cover message from there This is a separate patch set, it derived from https://www.mail-archive.com/qemu-devel@nongnu.org/msg456004.html There are several possible use cases: 1. solve issue with postcopy live

[Qemu-devel] [PATCH v8 2/3] migration: introduce qemu_ufd_copy_ioctl helper

2017-07-19 Thread Alexey Perevalov
Just for placing auxilary operations inside helper, auxilary operations like: track received pages, notify about copying operation in futher patches. Reviewed-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Signed-off-by: Alexey Perevalov --- migration/postcopy-ram

[Qemu-devel] [PATCH v8 1/3] migration: postcopy_place_page factoring out

2017-07-19 Thread Alexey Perevalov
Need to mark copied pages as closer as possible to the place where it tracks down. That will be necessary in futher patch. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Alexey Perevalov --- migration/postcopy-ram.c | 13 +++-- migr

Re: [Qemu-devel] [SeaBIOS] [RFC PATCH 0/2] Allow RedHat PCI bridges reserve more buses than necessary during init

2017-07-19 Thread Gerd Hoffmann
On Wed, 2017-07-19 at 16:20 +0300, Aleksandr Bezzubikov wrote: > Now PCI bridges (and PCIE root port too) get a bus range number in > system init, > basing on currently plugged devices. That's why when one wants to > hotplug another bridge, > it needs his child bus, which the parent is unable to pr

Re: [Qemu-devel] [PATCH v2] hmp: allow cpu index for "info lapic"

2017-07-19 Thread wang.yi59
>On Wed, Jul 19, 2017 at 08:17:49PM +0100, Dr. David Alan Gilbert wrote: >> * Eduardo Habkost (address@hidden) wrote: >> > On Wed, Jul 19, 2017 at 10:17:36AM -0500, Eric Blake wrote: >> > > On 07/19/2017 10:07 AM, Daniel P. Berrange wrote: >> > > >> It doesn't. Perhaps we should add that as a

Re: [Qemu-devel] [FIX PATCH v1] spapr: Fix QEMU abort during memory unplug

2017-07-19 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 1500523879-23860-1-git-send-email-bhar...@linux.vnet.ibm.com Subject: [Qemu-devel] [FIX PATCH v1] spapr: Fix QEMU

Re: [Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-19 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 1500522569-10760-1-git-send-email-jianjay.z...@huawei.com Subject: [Qemu-devel] [PATCH] migration: optimize the do

[Qemu-devel] [FIX PATCH v1] spapr: Fix QEMU abort during memory unplug

2017-07-19 Thread Bharata B Rao
Commit 0cffce56 (hw/ppc/spapr.c: adding pending_dimm_unplugs to sPAPRMachineState) introduced a new way to track pending LMBs of DIMM device that is marked for removal. Since this commit we can hit the assert in spapr_pending_dimm_unplugs_add() in the following situation: - DIMM device removal fai

Re: [Qemu-devel] [PATCH v3 00/43] tcg: support for multiple TCG contexts

2017-07-19 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 1500520169-23367-1-git-send-email-c...@braap.org Subject: [Qemu-devel] [PATCH v3 00/43] tcg: support for multiple

[Qemu-devel] [PATCH] migration: optimize the downtime

2017-07-19 Thread Jay Zhou
Qemu_savevm_state_cleanup() takes about 300ms in my ram migration tests with a 8U24G vm(20G is really occupied), the main cost comes from KVM_SET_USER_MEMORY_REGION ioctl when mem.memory_size = 0 in kvm_set_user_memory_region(). In kmod, the main cost is kvm_zap_obsolete_pages(), which traverses th

[Qemu-devel] [PATCH v3 33/43] tcg: define tcg_init_ctx and make tcg_ctx a pointer

2017-07-19 Thread 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_context_init -- in this c

Re: [Qemu-devel] [FIX PATCH] spapr: Fix QEMU abort during memory unplug

2017-07-19 Thread David Gibson
On Wed, Jul 19, 2017 at 02:24:09PM +0530, Bharata B Rao wrote: > Commit 0cffce56 (hw/ppc/spapr.c: adding pending_dimm_unplugs to > sPAPRMachineState) introduced a new way to track pending LMBs of DIMM > device that is marked for removal. Since this commit we can hit the > assert in spapr_pending_di

[Qemu-devel] [PATCH v3 27/43] translate-all: use a binary search tree to track TBs in TBContext

2017-07-19 Thread 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 to avoid adding a hole to

[Qemu-devel] [PATCH v3 43/43] tcg: enable multiple TCG contexts in softmmu

2017-07-19 Thread 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 any conversion: targets

[Qemu-devel] [PATCH v3 35/43] tcg: dynamically allocate optimizer temps

2017-07-19 Thread 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 having a bitmap of TCG_MAX_TEMPS via TCGTempSet. Performance-wise we lose about 2% in a translation-heavy workload such as booting+shutting down debian-arm:

[Qemu-devel] [PATCH v3 30/43] tci: move tci_regs to tcg_qemu_tb_exec's stack

2017-07-19 Thread Emilio G. Cota
Groundwork for supporting multiple TCG contexts. Compile-tested for all targets on an x86_64 host. Suggested-by: Richard Henderson Acked-by: Richard Henderson Signed-off-by: Emilio G. Cota --- tcg/tci.c | 552 +++--- 1 file changed, 279

[Qemu-devel] [PATCH v3 41/43] tcg: define TCG_HIGHWATER

2017-07-19 Thread Emilio G. Cota
Will come in handy very soon. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- tcg/tcg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 0ddd0dc..cb4ecbd 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -115,6

[Qemu-devel] [PATCH v3 17/43] target/s390x: check CF_PARALLEL instead of parallel_cpus

2017-07-19 Thread Emilio G. Cota
Thereby decoupling the resulting translated code from the current state of the system. Signed-off-by: Emilio G. Cota --- target/s390x/helper.h | 4 +++ target/s390x/mem_helper.c | 80 +-- target/s390x/translate.c | 26 --- 3 files cha

[Qemu-devel] [PATCH v3 42/43] tcg: introduce regions to split code_gen_buffer

2017-07-19 Thread 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 extra layer of indirection, a

[Qemu-devel] [PATCH v3 37/43] tcg: distribute profiling counters across TCGContext's

2017-07-19 Thread 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 TCGContext also includes.

[Qemu-devel] [PATCH v3 12/43] tcg: convert tb->cflags reads to tb_cflags(tb)

2017-07-19 Thread 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 access the field via 'tb->cf

[Qemu-devel] [PATCH v3 11/43] tcg: define CF_PARALLEL and use it for TB hashing

2017-07-19 Thread 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 the "curr_cflags" inline

[Qemu-devel] [PATCH v3 38/43] util: move qemu_real_host_page_size/mask to osdep.h

2017-07-19 Thread Emilio G. Cota
These only depend on the host and therefore belong in the common osdep, not in a target-dependent object. While at it, query the host during an init constructor, which guarantees the page size will be well-defined throughout the execution of the program. Suggested-by: Richard Henderson Reviewed-

[Qemu-devel] [PATCH v3 40/43] translate-all: use qemu_protect_rwx/none helpers

2017-07-19 Thread Emilio G. Cota
The helpers require the address and size to be page-aligned, so do that before calling them. Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 61 ++- 1 file changed, 13 insertions(+), 48 deletions(-) diff --git a/accel/tcg/translate-all.c

[Qemu-devel] [PATCH v3 34/43] gen-icount: fold exitreq_label into TCGContext

2017-07-19 Thread Emilio G. Cota
Groundwork for supporting multiple TCG contexts. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- include/exec/gen-icount.h | 7 +++ tcg/tcg.h | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/exec/gen-ic

[Qemu-devel] [PATCH v3 31/43] tcg: take tb_ctx out of TCGContext

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

[Qemu-devel] [PATCH v3 39/43] osdep: introduce qemu_mprotect_rwx/none

2017-07-19 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- include/qemu/osdep.h | 2 ++ util/osdep.c | 41 + 2 files changed, 43 insertions(+) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 0cba871..2c7d7db 100644 --- a/include/qemu/osdep.h +++ b/include/q

[Qemu-devel] [PATCH v3 23/43] exec-all: introduce TB_PAGE_ADDR_FMT

2017-07-19 Thread Emilio G. Cota
And fix the following warning when DEBUG_TB_INVALIDATE is enabled in translate-all.c: CC mipsn32-linux-user/accel/tcg/translate-all.o /data/src/qemu/accel/tcg/translate-all.c: In function ‘tb_alloc_page’: /data/src/qemu/accel/tcg/translate-all.c:1201:16: error: format ‘%lx’ expects argumen

[Qemu-devel] [PATCH v3 26/43] exec-all: extract tb->tc_* into a separate struct tc_tb

2017-07-19 Thread Emilio G. Cota
In preparation for adding tc.size to be able to keep track of TB's using the binary search tree implementation from glib. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- include/exec/exec-all.h | 20 ++-- accel/tcg/cpu-exec.c | 6 +++--- accel/tcg/transl

[Qemu-devel] [PATCH v3 09/43] tcg: consolidate TB lookups in tb_lookup__cpu_state

2017-07-19 Thread Emilio G. Cota
This avoids duplicating code. cpu_exec_step will also use the new common function once we integrate parallel_cpus into tb->cflags. Note that in this commit we also fix a race, described by Richard Henderson during review. Think of this scenario with threads A and B: (A) Lookup succeeds for TB

[Qemu-devel] [PATCH v3 25/43] translate-all: define and use DEBUG_TB_CHECK_GATE

2017-07-19 Thread Emilio G. Cota
This prevents bit rot by ensuring the debug code is compiled when building a user-mode target. Unfortunately the helpers are user-mode-only so we cannot fully get rid of the ifdef checks. Add a comment to explain this. Suggested-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Emil

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

2017-07-19 Thread 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 would require n+1 elems) o

[Qemu-devel] [PATCH v3 28/43] exec-all: rename tb_free to tb_remove

2017-07-19 Thread 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 --- include/exec/exec-all.h | 2 +- accel/tcg/cpu-exec.c | 2 +- accel/tcg/translate-all.c |

[Qemu-devel] [PATCH v3 29/43] translate-all: report correct avg host TB size

2017-07-19 Thread 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 this by: - Making the cons

[Qemu-devel] [PATCH v3 18/43] target/sh4: check CF_PARALLEL instead of parallel_cpus

2017-07-19 Thread Emilio G. Cota
Thereby decoupling the resulting translated code from the current state of the system. Signed-off-by: Emilio G. Cota --- target/sh4/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 9fcaefd..52fabb3 100644 --- a/

[Qemu-devel] [PATCH v3 21/43] cpu-exec: lookup/generate TB outside exclusive region during step_atomic

2017-07-19 Thread 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 cpu_exec_step_atomic. Revi

[Qemu-devel] [PATCH v3 03/43] exec-all: fix typos in TranslationBlock's documentation

2017-07-19 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- include/exec/exec-all.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 87b1b74..69c1b36 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-a

[Qemu-devel] [PATCH v3 20/43] tcg: check CF_PARALLEL instead of parallel_cpus

2017-07-19 Thread 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 bit to TCGContext, storing there whether CF_PARALLEL is set before translating every TB. Most architectures have <= 32 registers, whic

[Qemu-devel] [PATCH v3 24/43] translate-all: define and use DEBUG_TB_INVALIDATE_GATE

2017-07-19 Thread Emilio G. Cota
This gets rid of an ifdef check while ensuring that the debug code is compiled, which prevents bit rot. Suggested-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff

[Qemu-devel] [PATCH v3 14/43] target/hppa: check CF_PARALLEL instead of parallel_cpus

2017-07-19 Thread 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 --- target/hppa/helper.h| 2 ++ target/hppa/op_helper.c | 32 target/hppa/translate.c | 12 ++-- 3 fi

[Qemu-devel] [PATCH v3 13/43] target/arm: check CF_PARALLEL instead of parallel_cpus

2017-07-19 Thread 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 --- target/arm/helper-a64.h| 4 target/arm/helper-a64.c| 38 -- target/arm/op_helper.c | 7 -

[Qemu-devel] [PATCH v3 22/43] translate-all: define and use DEBUG_TB_FLUSH_GATE

2017-07-19 Thread Emilio G. Cota
This gets rid of some ifdef checks while ensuring that the debug code is compiled, which prevents bit rot. Suggested-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletio

[Qemu-devel] [PATCH v3 10/43] exec-all: bring tb->invalid into tb->cflags

2017-07-19 Thread Emilio G. Cota
This gets rid of a hole in struct TranslationBlock. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- include/exec/exec-all.h | 3 +-- include/exec/tb-lookup.h | 2 +- accel/tcg/cpu-exec.c | 4 ++-- accel/tcg/translate-all.c | 3 +-- 4 files changed, 5 insertions(+), 7 de

[Qemu-devel] [PATCH v3 02/43] tcg: fix corruption of code_time profiling counter upon tb_flush

2017-07-19 Thread Emilio G. Cota
Whenever there is an overflow in code_gen_buffer (e.g. we run out of space in it and have to flush it), the code_time profiling counter ends up with an invalid value (that is, code_time -= profile_getclock(), without later on getting += profile_getclock() due to the goto). Fix it by using the ti v

[Qemu-devel] [PATCH v3 16/43] target/m68k: check CF_PARALLEL instead of parallel_cpus

2017-07-19 Thread Emilio G. Cota
Thereby decoupling the resulting translated code from the current state of the system. Signed-off-by: Emilio G. Cota --- target/m68k/helper.h| 1 + target/m68k/op_helper.c | 33 - target/m68k/translate.c | 12 ++-- 3 files changed, 31 insertions(+), 1

[Qemu-devel] [PATCH v3 19/43] target/sparc: check CF_PARALLEL instead of parallel_cpus

2017-07-19 Thread 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 --- target/sparc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.

[Qemu-devel] [PATCH v3 01/43] cputlb: bring back tlb_flush_count under !TLB_DEBUG

2017-07-19 Thread Emilio G. Cota
Commit f0aff0f124 ("cputlb: add assert_cpu_is_self checks") buried the increment of tlb_flush_count under TLB_DEBUG. This results in "info jit" always (mis)reporting 0 TLB flushes when !TLB_DEBUG. Besides, under MTTCG tlb_flush_count is updated by several threads, so in order not to lose counts we

[Qemu-devel] [PATCH v3 15/43] target/i386: check CF_PARALLEL instead of parallel_cpus

2017-07-19 Thread 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 --- target/i386/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate

[Qemu-devel] [PATCH v3 08/43] tcg: remove addr argument from lookup_tb_ptr

2017-07-19 Thread Emilio G. Cota
It is unlikely that we will ever want to call this helper passing an argument other than the current PC. So just remove the argument, and use the pc we already get from cpu_get_tb_cpu_state. This change paves the way to having a common "tb_lookup" function. Reviewed-by: Richard Henderson Signed-

[Qemu-devel] [PATCH v3 07/43] tcg/mips: constify tcg_target_callee_save_regs

2017-07-19 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Emilio G. Cota --- tcg/mips/tcg-target.inc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/mips/tcg-target.inc.c b/tcg/mips/tcg-target.inc.c index 85756b8..56db2

[Qemu-devel] [PATCH v3 32/43] tcg: take .helpers out of TCGContext

2017-07-19 Thread Emilio G. Cota
Groundwork for supporting multiple TCG contexts. The hash table becomes read-only after it is filled in, so we can save space by keeping just a global pointer to it. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- tcg/tcg.h | 2 -- tcg/tcg.c | 10 +++

[Qemu-devel] [PATCH v3 04/43] translate-all: make have_tb_lock static

2017-07-19 Thread Emilio G. Cota
It is only used by this object, and it's not exported to any other. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/tran

[Qemu-devel] [PATCH v3 06/43] tcg/i386: constify tcg_target_callee_save_regs

2017-07-19 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Emilio G. Cota --- tcg/i386/tcg-target.inc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c index 01e3b4e..06df0

[Qemu-devel] [PATCH v3 05/43] cpu-exec: rename have_tb_lock to acquired_tb_lock in tb_find

2017-07-19 Thread Emilio G. Cota
Reusing the have_tb_lock name, which is also defined in translate-all.c, makes code reviewing unnecessarily harder. Avoid potential confusion by renaming the local have_tb_lock variable to something else. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- accel/tcg/cpu-exec.c | 1

[Qemu-devel] [PATCH v3 00/43] tcg: support for multiple TCG contexts

2017-07-19 Thread Emilio G. Cota
v2: https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg04749.html v3 applies on top of the current master (d4e59218a). To ease review/testing, you can pull this series from: https://github.com/cota/qemu/tree/multi-tcg-v3 Note: I cannot even compile-test _WIN32 bits, help appreciated! S

[Qemu-devel] [Bug 1703506] Re: SMT not supported by QEMU on AMD Ryzen CPU

2017-07-19 Thread Imatimba
Attached Ubuntu 17.04 guest logs. I wasn't able to run x86info as root. Only as regular user. Error shown: readEntry: Operation not permitted error reading 1KB from 0x3fffc00 There are a few bug reports about it but no workarounds. Seems to happen on vm's. So the output is missing a few sections.

Re: [Qemu-devel] [PATCH v2 3/3] qemu.py: make 'args' public

2017-07-19 Thread Fam Zheng
On Thu, 07/20 10:38, Fam Zheng wrote: > On Wed, 07/19 18:31, Amador Pahim wrote: > > Let's make args public so users can extend it without felling like > > abusing the internal API. > > s/felling/feeling/ ? Apart from that: Reviewed-by: Fam Zheng

[Qemu-devel] 答复: Re: [PATCH] vhost: fix a migration failed because ofvhost region merge

2017-07-19 Thread peng.hao2
原始邮件 发件人: 收件人: 抄送人: 彭浩10096742王业超10154425 日 期 :2017年07月19日 23:53 主 题 :Re: [Qemu-devel] [PATCH] vhost: fix a migration failed because ofvhost region merge On Wed, Jul 19, 2017 at 03:24:27PM +0200, Igor Mammedov wrote: > On Wed, 19 Jul 2017 12:46:13 +0100 > "Dr. David Alan Gilbert" wr

Re: [Qemu-devel] [PATCH v2 2/3] qemu.py: include debug information on launch error

2017-07-19 Thread Fam Zheng
On Wed, 07/19 18:31, Amador Pahim wrote: > When launching a VM, if an exception happens and the VM is not > initiated, it is useful to see the qemu command line that was executed > and the output of that command. > > Before the patch: > > >>> VM = qemu.QEMUMachine('../aarch64-softmmu/qemu-sys

[Qemu-devel] Can I mount encrypt qcow2?

2017-07-19 Thread 陳培泓
Can I mount encrypt qcow2 file through qemu-nbd? I tried but failed and nothing about that in man page

Re: [Qemu-devel] [PATCH v2 1/3] qemu.py: fix is_running()

2017-07-19 Thread Fam Zheng
On Wed, 07/19 18:31, Amador Pahim wrote: > Current implementation is broken. It does not really test if the child > process is running. > > The Popen.returncode will only be set after by a poll(), wait() or > communicate(). If the Popen fails to launch a VM, the Popen.returncode > will not turn to

Re: [Qemu-devel] [PATCH v2 3/3] qemu.py: make 'args' public

2017-07-19 Thread Fam Zheng
On Wed, 07/19 18:31, Amador Pahim wrote: > Let's make args public so users can extend it without felling like > abusing the internal API. s/felling/feeling/ ? Fam > > Signed-off-by: Amador Pahim > --- > scripts/qemu.py | 13 +++-- > tests/qemu-iotests/iotests.py | 18 +++

[Qemu-devel] Why "trace event does not exist"?

2017-07-19 Thread Sam
Hi all, I want to add new trace-event and log it, so I add into $QEMU/trace-event like this: io_mem_init(void) "" > and after configure, $QEMU/build/trace-events-all also have this. then I add code like this into $QEMU/exec.c trace_io_mem_init(); > then I `make` and `make install`. But when I

Re: [Qemu-devel] [PATCH v6] qga: Add support network interface statistics in guest-network-get-interfaces command

2017-07-19 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 1500512858-29428-1-git-send-email-lu.zhip...@zte.com.cn Subject: [Qemu-devel] [PATCH v6] qga: Add support network

[Qemu-devel] [PATCH v6] qga: Add support network interface statistics in guest-network-get-interfaces command

2017-07-19 Thread ZhiPeng Lu
we can get the network interface statistics inside a virtual machine by guest-network-get-interfaces command. it is very useful for us to monitor and analyze network traffic. Signed-off-by: ZhiPeng Lu v1->v2: - correct some spelling mistake and add the stats data to the guest-network-get-int

Re: [Qemu-devel] >256 Virtio-net-pci hotplug Devices

2017-07-19 Thread Kinsella, Ray
Hi Marcel, You can use multi-function PCIe Root Ports, this will give you 8 ports per slot, if you have 16 empty slots (I think we have more) you reach 128 root ports. Then you can use multi-function virtio-net-pci devices, this will give you 8 functions per port, so you reach the target of 102

[Qemu-devel] [PULL v2 13/14] tcg/tci: enable bswap16_i64

2017-07-19 Thread Richard Henderson
From: Philippe Mathieu-Daudé Altough correctly implemented, bswap16_i64() never got tested/executed so the safety TODO() statement was never removed. Since it got now tested the TODO() can be removed. while running Alex Bennée's image aarch64-linux-3.15rc2-buildroot.img: Trace 0x7fa1904b0890 [

[Qemu-devel] [PULL v2 11/14] target/sparc: optimize gen_op_mulscc() using deposit op

2017-07-19 Thread Richard Henderson
From: Philippe Mathieu-Daudé Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20170718045540.16322-9-f4...@amsat.org> Signed-off-by: Richard Henderson --- target/sparc/translate.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/target/

[Qemu-devel] [PULL v2 14/14] tcg: Pass generic CPUState to gen_intermediate_code()

2017-07-19 Thread Richard Henderson
From: Lluís Vilanova Needed to implement a target-agnostic gen_intermediate_code() in the future. Reviewed-by: David Gibson Reviewed-by: Richard Henderson Reviewed-by: Alex Benneé Reviewed-by: Emilio G. Cota Signed-off-by: Lluís Vilanova Message-Id: <150002025498.22386.18051908483085660588.

[Qemu-devel] [PULL v2 06/14] target/arm: Optimize aarch64 rev16

2017-07-19 Thread Richard Henderson
It is much shorter to reverse all 4 half-words in parallel than extract, reverse, and deposit each in turn. Suggested-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 24 ++-- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/

[Qemu-devel] [PULL v2 10/14] target/sparc: optimize various functions using extract op

2017-07-19 Thread Richard Henderson
From: Philippe Mathieu-Daudé Done with the Coccinelle semantic patch scripts/coccinelle/tcg_gen_extract.cocci. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/sparc/translate.c | 15 +-- 1 file changed, 5 insertions

[Qemu-devel] [PULL v2 12/14] target/alpha: optimize gen_cvtlq() using deposit op

2017-07-19 Thread Richard Henderson
From: Philippe Mathieu-Daudé Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20170718045540.16322-10-f4...@amsat.org> Signed-off-by: Richard Henderson --- target/alpha/translate.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ta

[Qemu-devel] [PULL v2 09/14] target/ppc: optimize various functions using extract op

2017-07-19 Thread Richard Henderson
From: Philippe Mathieu-Daudé Done with the Coccinelle semantic patch scripts/coccinelle/tcg_gen_extract.cocci. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: David Gibson Message-Id: <20170718045540.16322-6-f4...@amsat.org> Signed-off-by: Richard Henderson ---

[Qemu-devel] [PULL v2 07/14] target/arm: optimize aarch32 rev16

2017-07-19 Thread Richard Henderson
From: Aurelien Jarno Use the same mask to avoid having to load two different constants, as suggested by Richard Henderson. Signed-off-by: Aurelien Jarno Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20170516230159.4195-2-aurel...@aurel32.net> Signed-off-by: R

[Qemu-devel] [PULL v2 08/14] target/m68k: optimize bcd_flags() using extract op

2017-07-19 Thread Richard Henderson
From: Philippe Mathieu-Daudé Done with the Coccinelle semantic patch scripts/coccinelle/tcg_gen_extract.cocci. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20170718045540.16322-5-f4...@amsat.org> Signed-off-by: Richard Henderson -

[Qemu-devel] [PULL v2 01/14] tcg/mips: reserve a register for the guest_base.

2017-07-19 Thread Richard Henderson
From: Jiang Biao Reserve a register for the guest_base using ppc code for reference. By doing so, we do not have to recompute it for every memory load. Signed-off-by: Jiang Biao Signed-off-by: Richard Henderson Message-Id: <1499677934-2249-1-git-send-email-jiang.bi...@zte.com.cn> --- tcg/mips

[Qemu-devel] [PULL v2 03/14] tcg: Expand glue macros before stringifying helper names

2017-07-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- include/exec/helper-tcg.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/include/exec/helper-tcg.h b/include/exec/helper-tcg.h index bb9287727c..b0c5bafa99 100644 --- a/include/exec/helper-tcg.h +++ b/include/exec/helper

[Qemu-devel] [PULL v2 05/14] coccinelle: add a script to optimize tcg op using tcg_gen_extract()

2017-07-19 Thread Richard Henderson
From: Philippe Mathieu-Daudé The following thread was helpful while writing this script: https://github.com/coccinelle/coccinelle/issues/86 Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20170718045540.16322-3-f4...@amsat.org> Signed-off-by: Richard Henderson --- scripts/coccinelle/t

[Qemu-devel] [PULL v2 04/14] coccinelle: ignore ASTs pre-parsed cached C files

2017-07-19 Thread Richard Henderson
From: Philippe Mathieu-Daudé files generated using coccinelle tool: 'spatch --use-cache' Reviewed-by: Eric Blake Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20170718045540.16322-2-f4...@amsat.org> Signed-off-by: Richard Henderson --- .gitignore | 2 ++ 1 file changed, 2 insertions(+)

[Qemu-devel] [PULL v2 02/14] util/cacheinfo: Add missing include for ppc linux

2017-07-19 Thread Richard Henderson
From: Philippe Mathieu-Daudé This include was forgotten when splitting cacheinfo.c out of tcg/ppc/tcg-target.inc.c (see commit b255b2c8). For a Centos7 host, the include path implicitly pulls in the desired AT_* defines. Not so f

[Qemu-devel] [PULL v2 00/14] tcg-next patch queue

2017-07-19 Thread Richard Henderson
0100) are available in the git repository at: git://github.com/rth7680/qemu.git tags/pull-tcg-20170719 for you to fetch changes up to 9c489ea6bed134fecfd556b439c68bba48fbe102: tcg: Pass generic CPUState to gen_intermediate_code() (2017-0

Re: [Qemu-devel] [PULL 0/8] target/alpha cleanups

2017-07-19 Thread Richard Henderson
On 07/19/2017 06:57 AM, Peter Maydell wrote: On 19 July 2017 at 05:45, Richard Henderson wrote: The new title holder for perf top is helper_lookup_tb_ptr. Those targets that have a complicated cpu_get_tb_cpu_state function are going to regret that. Yeah, Paolo's pointed out (and had some patc

Re: [Qemu-devel] [RFC PATCH 7/8] VFIO: Add new IOCTL for IOMMU TLB invalidate propagation

2017-07-19 Thread Jacob Pan
On Wed, 19 Jul 2017 18:45:43 +0800 "Liu, Yi L" wrote: > On Mon, Jul 17, 2017 at 04:45:15PM -0600, Alex Williamson wrote: > > On Mon, 17 Jul 2017 10:58:41 + > > "Liu, Yi L" wrote: > > > > > Hi Alex, > > > > > > Pls refer to the response inline. > > > > > > > -Original Message-

Re: [Qemu-devel] [PATCH v5 0/3] Add litmus tests for MTTCG consistency tests

2017-07-19 Thread Philippe Mathieu-Daudé
Hi Pranith, On 12/01/2016 02:28 AM, Pranith Kumar wrote: Hello, The following patch series adds litmus tests to test consistency for MTTCG enabled qemu. These patches apply on top of the clean up tests/tcg folder made by my previous patch series. The tests were generated using the litmus tool.

Re: [Qemu-devel] [PULL 00/14] tcg-next patch queue

2017-07-19 Thread Richard Henderson
On 07/19/2017 10:33 AM, Philippe Mathieu-Daudé wrote: On 07/19/2017 04:45 PM, Peter Maydell wrote: The sparc-linux-user test fails: /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/sparc-linux-user/qemu-sparc -L ./gnemul/qemu-sparc sparc/ls -l dummyfile Inconsistency detected by

Re: [Qemu-devel] [PULL 00/14] tcg-next patch queue

2017-07-19 Thread Philippe Mathieu-Daudé
On 07/19/2017 04:45 PM, Peter Maydell wrote: The sparc-linux-user test fails: /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/sparc-linux-user/qemu-sparc -L ./gnemul/qemu-sparc sparc/ls -l dummyfile Inconsistency detected by ld.so: rtld.c: 858: dl_main: Assertion `_dl_rtld_map.l_pre

Re: [Qemu-devel] [PULL v2 00/18] Merge crypto 201/07/18

2017-07-19 Thread Peter Maydell
On 19 July 2017 at 10:15, Daniel P. Berrange wrote: > The following changes since commit 6887dc6700ccb7820d8a9d370f421ee361c748e8: > > Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20170718' into > staging (2017-07-18 21:13:48 +0100) > > are available in the git repository at: >

[Qemu-devel] [PATCH 3/4] GRETAP Backend for UDST

2017-07-19 Thread anton . ivanov
From: Anton Ivanov GRETAP Backend for Universal Datagram Socket Transport Signed-off-by: Anton Ivanov --- net/Makefile.objs | 2 +- net/clients.h | 4 + net/gre.c | 311 ++ net/net.c | 1 + qapi-schema.json | 41 ++

[Qemu-devel] [PATCH 4/4] Raw Backend for UDST

2017-07-19 Thread anton . ivanov
From: Anton Ivanov Raw Socket Backend for Universal Datagram Socket Transport Signed-off-by: Anton Ivanov --- net/Makefile.objs | 2 +- net/clients.h | 3 ++ net/net.c | 1 + net/raw.c | 123 ++ qapi-schema.json |

[Qemu-devel] [PATCH 2/4] Migrate l2tpv3 to UDST Backend

2017-07-19 Thread anton . ivanov
From: Anton Ivanov Migrate L2TPv3 transport to the Unified Datagram Socket Transport Backend. Signed-off-by: Anton Ivanov --- net/l2tpv3.c | 537 +-- 1 file changed, 83 insertions(+), 454 deletions(-) diff --git a/net/l2tpv3.c b/net/l2tp

[Qemu-devel] Revised Unified Datagram Socket Transport patchset

2017-07-19 Thread anton . ivanov
Hi Jason, hi list, Follows a revised patchset. I have addressed most comments. TODO: replace memcpy with dup where applicable TODO: add force v4 option TODO: port the UDP portion of the existing socket transport to the new infrastructure Future: add sendmmsg once a "bulk xmit" has been arranged

[Qemu-devel] [PATCH 1/4] Unified Datagram Socket Transports

2017-07-19 Thread anton . ivanov
From: Anton Ivanov Basic infrastructure to start moving datagram based transports to a common infrastructure as well as introduce several additional transports. Signed-off-by: Anton Ivanov --- configure | 12 +- net/Makefile.objs | 2 +- net/net.c | 4 +- net/udst.c

Re: [Qemu-devel] [PATCH v2] hmp: allow cpu index for "info lapic"

2017-07-19 Thread Eduardo Habkost
On Wed, Jul 19, 2017 at 08:17:49PM +0100, Dr. David Alan Gilbert wrote: > * Eduardo Habkost (ehabk...@redhat.com) wrote: > > On Wed, Jul 19, 2017 at 10:17:36AM -0500, Eric Blake wrote: > > > On 07/19/2017 10:07 AM, Daniel P. Berrange wrote: > > > >> It doesn't. Perhaps we should add that as a futu

Re: [Qemu-devel] [PULL 00/14] tcg-next patch queue

2017-07-19 Thread Peter Maydell
On 19 July 2017 at 05:57, Richard Henderson wrote: > This edition is a real mix: > * Code gen improvement for mips64 host (Jiang) > * Build fix for ppc-linux (Philippe) > * Runtime fix for tci (Philippe) > * Fix atomic helper names in debugging dumps (rth) > > * Cross-target tcg code gen

Re: [Qemu-devel] Fwd: [RFC PATCH 0/2] Allow RedHat PCI bridges reserve more buses than necessary during init

2017-07-19 Thread Marcel Apfelbaum
On 19/07/2017 21:56, Konrad Rzeszutek Wilk wrote: On Wed, Jul 19, 2017 at 09:38:50PM +0300, Alexander Bezzubikov wrote: 2017-07-19 21:18 GMT+03:00 Konrad Rzeszutek Wilk : On Wed, Jul 19, 2017 at 05:14:41PM +, Alexander Bezzubikov wrote: ср, 19 июля 2017 г. в 16:57, Konrad Rzeszutek Wilk <

Re: [Qemu-devel] [PATCH v2] hmp: allow cpu index for "info lapic"

2017-07-19 Thread Dr. David Alan Gilbert
* Eduardo Habkost (ehabk...@redhat.com) wrote: > On Wed, Jul 19, 2017 at 10:17:36AM -0500, Eric Blake wrote: > > On 07/19/2017 10:07 AM, Daniel P. Berrange wrote: > > >> It doesn't. Perhaps we should add that as a future libvirt-qemu.so API > > >> addition, although it's probably easier to just us

Re: [Qemu-devel] Fwd: [RFC PATCH 0/2] Allow RedHat PCI bridges reserve more buses than necessary during init

2017-07-19 Thread Konrad Rzeszutek Wilk
On Wed, Jul 19, 2017 at 09:38:50PM +0300, Alexander Bezzubikov wrote: > 2017-07-19 21:18 GMT+03:00 Konrad Rzeszutek Wilk : > > > On Wed, Jul 19, 2017 at 05:14:41PM +, Alexander Bezzubikov wrote: > > > ср, 19 июля 2017 г. в 16:57, Konrad Rzeszutek Wilk < > > konrad.w...@oracle.com>: > > > > > >

Re: [Qemu-devel] [PATCH v2 1/3] qemu.py: fix is_running()

2017-07-19 Thread Eduardo Habkost
On Wed, Jul 19, 2017 at 03:34:47PM -0300, Eduardo Habkost wrote: > On Wed, Jul 19, 2017 at 06:31:06PM +0200, Amador Pahim wrote: > > Current implementation is broken. It does not really test if the child > > process is running. > > > > The Popen.returncode will only be set after by a poll(), wait(

  1   2   3   4   >