[Qemu-devel] [PATCH v3 7/8] qmp: Support abstract classes on device-list-properties

2016-10-26 Thread Eduardo Habkost
When an abstract class is used on device-list-properties, we can simply return the class properties registered for the class. This will be useful if management software needs to query for supported options that apply to all devices of a given type (e.g. options supported by all CPU models,

[Qemu-devel] [PULL v2 28/37] tests: add atomic_add-bench

2016-10-26 Thread Richard Henderson
From: "Emilio G. Cota" With this microbenchmark we can measure the overhead of emulating atomic instructions with a configurable degree of contention. The benchmark spawns $n threads, each performing $o atomic ops (additions) in a loop. Each atomic operation is performed on a

[Qemu-devel] [PULL v2 29/37] target-arm: Rearrange aa32 load and store functions

2016-10-26 Thread Richard Henderson
Stop specializing on TARGET_LONG_BITS == 32; unconditionally allocate a temp and expand with tcg_gen_extu_i32_tl. Split out gen_aa32_addr, gen_aa32_frob64, gen_aa32_ld_i32 and gen_aa32_st_i32 as separate interfaces. Reviewed-by: Alex Bennée Signed-off-by: Richard

[Qemu-devel] [PULL v2 36/37] target-alpha: Introduce MMU_PHYS_IDX

2016-10-26 Thread Richard Henderson
Rather than using helpers for physical accesses, use a mmu index. The primary cleanup is with store-conditional on physical addresses. Signed-off-by: Richard Henderson --- target-alpha/cpu.h| 18 +--- target-alpha/helper.c | 8 ++ target-alpha/helper.h

Re: [Qemu-devel] [QEMU PATCH v8 2/3] migration: migrate QTAILQ

2016-10-26 Thread Dr. David Alan Gilbert
* Jianjun Duan (du...@linux.vnet.ibm.com) wrote: > Currently we cannot directly transfer a QTAILQ instance because of the > limitation in the migration code. Here we introduce an approach to > transfer such structures. We created VMStateInfo vmstate_info_qtailq > for QTAILQ. Similar VMStateInfo

[Qemu-devel] [PULL v2 19/37] target-i386: emulate LOCK'ed cmpxchg using cmpxchg helpers

2016-10-26 Thread Richard Henderson
From: "Emilio G. Cota" The diff here is uglier than necessary. All this does is to turn FOO into: if (s->prefix & PREFIX_LOCK) { BAR } else { FOO } where FOO is the original implementation of an unlocked cmpxchg. [rth: Adjust unlocked cmpxchg to use movcond instead of

[Qemu-devel] [PULL v2 24/37] target-i386: emulate LOCK'ed XADD using atomic helper

2016-10-26 Thread Richard Henderson
From: "Emilio G. Cota" [rth: Move load of reg value to common location.] Signed-off-by: Emilio G. Cota Message-Id: <1467054136-10430-17-git-send-email-c...@braap.org> Signed-off-by: Richard Henderson --- target-i386/translate.c | 15

[Qemu-devel] [PULL v2 25/37] target-i386: emulate LOCK'ed BTX ops using atomic helpers

2016-10-26 Thread Richard Henderson
From: "Emilio G. Cota" [rth: Avoid redundant qemu_ld in locked case. Fix previously unnoticed incorrect zero-extension of address in register-offset case.] Signed-off-by: Emilio G. Cota Message-Id: <1467054136-10430-18-git-send-email-c...@braap.org>

[Qemu-devel] [PULL v2 32/37] target-arm: emulate aarch64's LL/SC using cmpxchg helpers

2016-10-26 Thread Richard Henderson
From: "Emilio G. Cota" Emulating LL/SC with cmpxchg is not correct, since it can suffer from the ABA problem. Portable parallel code, however, is written assuming only cmpxchg--and not LL/SC--is available. This means that in practice emulating LL/SC with cmpxchg is a viable

[Qemu-devel] [PULL v2 21/37] target-i386: emulate LOCK'ed INC using atomic helper

2016-10-26 Thread Richard Henderson
From: "Emilio G. Cota" [rth: Merge gen_inc_locked back into gen_inc to share cc update.] Signed-off-by: Emilio G. Cota Message-Id: <1467054136-10430-14-git-send-email-c...@braap.org> Signed-off-by: Richard Henderson ---

[Qemu-devel] [PULL v2 26/37] target-i386: emulate XCHG using atomic helper

2016-10-26 Thread Richard Henderson
From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Message-Id: <1467054136-10430-19-git-send-email-c...@braap.org> Signed-off-by: Richard Henderson --- target-i386/translate.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-)

[Qemu-devel] [PULL v2 27/37] target-i386: remove helper_lock()

2016-10-26 Thread Richard Henderson
From: "Emilio G. Cota" It's been superseded by the atomic helpers. The use of the atomic helpers provides a significant performance and scalability improvement. Below is the result of running the atomic_add-test microbenchmark with: $ x86_64-linux-user/qemu-x86_64

[Qemu-devel] [PULL v2 22/37] target-i386: emulate LOCK'ed NOT using atomic helper

2016-10-26 Thread Richard Henderson
From: "Emilio G. Cota" [rth: Avoid qemu_load that's redundant with the atomic op.] Signed-off-by: Emilio G. Cota Message-Id: <1467054136-10430-15-git-send-email-c...@braap.org> Signed-off-by: Richard Henderson --- target-i386/translate.c | 26

[Qemu-devel] [PULL v2 23/37] target-i386: emulate LOCK'ed NEG using cmpxchg helper

2016-10-26 Thread Richard Henderson
From: "Emilio G. Cota" [rth: Move redundant qemu_load out of cmpxchg loop.] Signed-off-by: Emilio G. Cota Message-Id: <1467054136-10430-16-git-send-email-c...@braap.org> Signed-off-by: Richard Henderson --- target-i386/translate.c | 38

[Qemu-devel] [PULL v2 20/37] target-i386: emulate LOCK'ed OP instructions using atomic helpers

2016-10-26 Thread Richard Henderson
From: "Emilio G. Cota" [rth: Eliminate some unnecessary temporaries.] Signed-off-by: Emilio G. Cota Message-Id: <1467054136-10430-13-git-send-email-c...@braap.org> Signed-off-by: Richard Henderson --- target-i386/translate.c | 76

[Qemu-devel] [PULL v2 18/37] tcg: Emit barriers with parallel_cpus

2016-10-26 Thread Richard Henderson
Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tcg-op.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c index cdd61d6..bb2bfee

[Qemu-devel] [PULL v2 14/37] cputlb: Tidy some macros

2016-10-26 Thread Richard Henderson
TGT_LE and TGT_BE are not size dependent and do not need to be redefined. The others are no longer used at all. Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- cputlb.c | 8

[Qemu-devel] [PULL v2 15/37] tcg: Add atomic helpers

2016-10-26 Thread Richard Henderson
Add all of cmpxchg, op_fetch, fetch_op, and xchg. Handle both endian-ness, and sizes up to 8. Handle expanding non-atomically, when emulating in serial. Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson

[Qemu-devel] [PULL v2 17/37] tcg: Add CONFIG_ATOMIC64

2016-10-26 Thread Richard Henderson
Allow qemu to build on 32-bit hosts without 64-bit atomic ops. Even if we only allow 32-bit hosts to multi-thread emulate 32-bit guests, we still need some way to handle the 32-bit guest using a 64-bit atomic operation. Do so by dropping back to single-step. Reviewed-by: Emilio G. Cota

[Qemu-devel] [PULL v2 16/37] tcg: Add atomic128 helpers

2016-10-26 Thread Richard Henderson
Force the use of cmpxchg16b on x86_64. Wikipedia suggests that only very old AMD64 (circa 2004) did not have this instruction. Further, it's required by Windows 8 so no new cpus will ever omit it. If we truely care about these, then we could check this at startup time and then avoid executing

[Qemu-devel] [PULL v2 13/37] cputlb: Move most of iotlb code out of line

2016-10-26 Thread Richard Henderson
Saves 2k code size off of a cold path. Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- cputlb.c | 37 + softmmu_template.h | 52

[Qemu-devel] [PULL v2 06/37] int128: Use __int128 if available

2016-10-26 Thread Richard Henderson
Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/qemu/int128.h | 135 +- tests/test-int128.c | 22 2 files changed, 145

[Qemu-devel] [PULL v2 11/37] cputlb: Move probe_write out of softmmu_template.h

2016-10-26 Thread Richard Henderson
Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- cputlb.c | 21 + softmmu_template.h | 23 --- 2 files changed, 21 insertions(+), 23 deletions(-)

[Qemu-devel] [PULL v2 10/37] cputlb: Replace SHIFT with DATA_SIZE

2016-10-26 Thread Richard Henderson
Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- cputlb.c | 16 softmmu_template.h | 7 ++- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git

[Qemu-devel] [PULL v2 12/37] cputlb: Remove includes from softmmu_template.h

2016-10-26 Thread Richard Henderson
We already include exec/address-spaces.h and exec/memory.h in cputlb.c; the include of qemu/timer.h appears to be a fossil. Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- softmmu_template.h |

[Qemu-devel] [PULL v2 05/37] exec: Avoid direct references to Int128 parts

2016-10-26 Thread Richard Henderson
Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- exec.c| 4 ++-- include/qemu/int128.h | 10 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/exec.c

[Qemu-devel] [PULL v2 07/37] int128: Add int128_make128

2016-10-26 Thread Richard Henderson
Allows Int128 to be used more generally, rather than having to begin with 64-bit inputs and accumulate. Reviewed-by: Emilio G. Cota Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/qemu/int128.h | 20

[Qemu-devel] [PULL v2 01/37] atomics: Add parameters to macros

2016-10-26 Thread Richard Henderson
Making these functional rather than object macros will prevent later problems with complex macro expansion. Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/qemu/atomic.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

[Qemu-devel] [PULL v2 09/37] linux-user: enable parallel code generation on clone

2016-10-26 Thread Richard Henderson
From: Alex Bennée The variable parallel_cpus controls the generation of thread aware atomic code. We only need to set it once we clone our first thread. At this point any existing translations need to be thrown away. Reviewed-by: Emilio G. Cota

[Qemu-devel] [PULL v2 04/37] atomics: Add __nocheck atomic operations

2016-10-26 Thread Richard Henderson
While the check against sizeof(void *) is appropriate for normal usage within qemu, there are places in which we want wider operaions and have checked for their existance. Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/qemu/atomic.h |

[Qemu-devel] [PULL v2 00/37] cmpxchg atomic operations

2016-10-26 Thread Richard Henderson
5 17:03:11 +0100) are available in the git repository at: git://github.com/rth7680/qemu.git tags/pull-atomic-20161026 for you to fetch changes up to ed2839166c21e001d15868f4d9591a21aaebd547: target-alpha: Emulate LL/SC using cmpxchg helpers (2016-10-26 08:29:02 -

Re: [Qemu-devel] macOS 10.12 Sierra, Xcode 8 & clock_gettime()

2016-10-26 Thread G 3
On Oct 26, 2016, at 11:39 AM, Liviu Ionescu wrote: On 26 Oct 2016, at 18:32, G 3 wrote: -isysroot /Developer/SDKs/MacOSX10.6.sdk yes, this is a compiler command line option pointing to an existing folder, but `/Developer/` is no longer in use for quite some

[Qemu-devel] [PULL v2 03/37] atomics: add atomic_op_fetch variants

2016-10-26 Thread Richard Henderson
From: "Emilio G. Cota" This paves the way for upcoming work. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson Message-Id: <1467054136-10430-9-git-send-email-c...@braap.org> ---

[Qemu-devel] [PULL v2 02/37] atomics: add atomic_xor

2016-10-26 Thread Richard Henderson
From: "Emilio G. Cota" This paves the way for upcoming work. Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson Message-Id: <1467054136-10430-8-git-send-email-c...@braap.org> ---

Re: [Qemu-devel] [PATCH 0/7] blockjobs: preliminary refactoring work, Pt 1

2016-10-26 Thread John Snow
On 10/26/2016 12:52 AM, Jeff Cody wrote: On Fri, Oct 14, 2016 at 02:32:55PM -0400, John Snow wrote: On 10/13/2016 06:56 PM, John Snow wrote: This is a follow-up to patches 1-6 of: [PATCH v2 00/11] blockjobs: Fix transactional race condition That series started trying to refactor blockjobs

[Qemu-devel] [PATCH COLO-Frame (Base) v22 01/17] migration: Introduce capability 'x-colo' to migration

2016-10-26 Thread zhanghailiang
We add helper function colo_supported() to indicate whether colo is supported or not, with which we use to control whether or not showing 'x-colo' string to users, they can use qmp command 'query-migrate-capabilities' or hmp command 'info migrate_capabilities' to learn if colo is supported. The

[Qemu-devel] [PATCH COLO-Frame (Base) v22 06/17] COLO: Introduce checkpointing protocol

2016-10-26 Thread zhanghailiang
We need communications protocol of user-defined to control the checkpointing process. The new checkpointing request is started by Primary VM, and the interactive process like below: Checkpoint synchronizing points: Primary Secondary

[Qemu-devel] [PATCH COLO-Frame (Base) v22 13/17] COLO: Introduce state to record failover process

2016-10-26 Thread zhanghailiang
When handling failover, COLO processes differently according to the different stage of failover process, here we introduce a global atomic variable to record the status of failover. We add four failover status to indicate the different stage of failover process. You should use the helpers to get

Re: [Qemu-devel] [PATCH v2 3/6] qdev: Register static properties as class properties

2016-10-26 Thread Eduardo Habkost
On Wed, Oct 26, 2016 at 05:02:22PM +0200, Igor Mammedov wrote: > On Thu, 20 Oct 2016 15:47:56 -0200 > Eduardo Habkost wrote: > > > Instead of registering qdev static properties on instance_init, > > register them as class properties, at qdev_class_set_props(). > > > >

[Qemu-devel] [PATCH COLO-Frame (Base) v22 00/17] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2016-10-26 Thread zhanghailiang
This version mainly fixes several issues found by Amit. Thanks for your help, we still have chance to merge this series in QEMU v2.8. :) Besides, Patch 3 and 14 still need your review. Cc: Juan Quintela Cc: Amit Shah Cc: Hai Huang

[Qemu-devel] [PATCH COLO-Frame (Base) v22 02/17] COLO: migrate COLO related info to secondary node

2016-10-26 Thread zhanghailiang
We can determine whether or not VM in destination should go into COLO mode by referring to the info that was migrated. We skip this section if COLO is not enabled (i.e. migrate_set_capability colo off), so that, It doesn't break compatibility with migration no matter whether users configure the

[Qemu-devel] [PATCH COLO-Frame (Base) v22 12/17] COLO: Add 'x-colo-lost-heartbeat' command to trigger failover

2016-10-26 Thread zhanghailiang
We leave users to choose whatever heartbeat solution they want, if the heartbeat is lost, or other errors they detect, they can use experimental command 'x_colo_lost_heartbeat' to tell COLO to do failover, COLO will do operations accordingly. For example, if the command is sent to the Primary

Re: [Qemu-devel] [PATCH COLO-Frame (Base) v21 00/17] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT)

2016-10-26 Thread Hailiang Zhang
Hi Amit, On 2016/10/26 16:26, Amit Shah wrote: On (Wed) 26 Oct 2016 [14:43:30], Hailiang Zhang wrote: Hi Amit, On 2016/10/26 14:09, Amit Shah wrote: Hello, On (Tue) 18 Oct 2016 [20:09:56], zhanghailiang wrote: This is the 21th version of COLO frame series. Rebase to the latest master.

[Qemu-devel] [PATCH COLO-Frame (Base) v22 10/17] COLO: Add checkpoint-delay parameter for migrate-set-parameters

2016-10-26 Thread zhanghailiang
Add checkpoint-delay parameter for migrate-set-parameters, so that we can control the checkpoint frequency when COLO is in periodic mode. Cc: Luiz Capitulino Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: zhanghailiang

[Qemu-devel] [PATCH COLO-Frame (Base) v22 05/17] COLO: Establish a new communicating path for COLO

2016-10-26 Thread zhanghailiang
This new communication path will be used for returning messages from Secondary side to Primary side. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah

[Qemu-devel] [PATCH COLO-Frame (Base) v22 15/17] COLO: Implement failover work for secondary VM

2016-10-26 Thread zhanghailiang
If users require SVM to takeover work, COLO incoming thread should exit from loop while failover BH helps backing to migration incoming coroutine. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH COLO-Frame (Base) v22 16/17] docs: Add documentation for COLO feature

2016-10-26 Thread zhanghailiang
Introduce the design of COLO, and how to test it. Signed-off-by: zhanghailiang Reviewed-by: Amit Shah --- v22: - Add Reviewed-by tag v21: - Fix some minor typos and grammar from Eric --- docs/COLO-FT.txt | 189

[Qemu-devel] [PATCH COLO-Frame (Base) v22 03/17] migration: Enter into COLO mode after migration if COLO is enabled

2016-10-26 Thread zhanghailiang
Add a new migration state: MIGRATION_STATUS_COLO. Migration source side enters this state after the first live migration successfully finished if COLO is enabled by command 'migrate_set_capability x-colo on'. We reuse migration thread, so the process of checkpointing will be handled in migration

[Qemu-devel] [PATCH COLO-Frame (Base) v22 17/17] configure: Support enable/disable COLO feature

2016-10-26 Thread zhanghailiang
configure --enable-colo/--disable-colo to switch COLO support on/off. COLO feature doesn't depend on any other external librariesis, So here it is reasonable to enable COLO by default, to avoid re-compile QEMU if users want to use this capability. Signed-off-by: zhanghailiang

[Qemu-devel] [PATCH COLO-Frame (Base) v22 08/17] COLO: Send PVM state to secondary side when do checkpoint

2016-10-26 Thread zhanghailiang
VM checkpointing is to synchronize the state of PVM to SVM, just like migration does, we re-use save helpers to achieve migrating PVM's state to Secondary side. COLO need to cache the data of VM's state in the secondary side before synchronize it to SVM. COLO need the size of the data to

[Qemu-devel] [PATCH COLO-Frame (Base) v22 09/17] COLO: Load VMState into QIOChannelBuffer before restore it

2016-10-26 Thread zhanghailiang
We should not destroy the state of SVM (Secondary VM) until we receive the complete data of PVM's state, in case the primary fails in the process of sending the state, so we cache the VM's state in secondary side before load it into SVM. Besides, we should call qemu_system_reset() before load VM

[Qemu-devel] [PATCH COLO-Frame (Base) v22 11/17] COLO: Synchronize PVM's state to SVM periodically

2016-10-26 Thread zhanghailiang
Do checkpoint periodically, the default interval is 200ms. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah --- v22: - Add

[Qemu-devel] [PATCH COLO-Frame (Base) v22 14/17] COLO: Implement the process of failover for primary VM

2016-10-26 Thread zhanghailiang
For primary side, if COLO gets failover request from users. To be exact, gets 'x_colo_lost_heartbeat' command. COLO thread will exit the loop while the failover BH does the cleanup work and resumes VM. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian

[Qemu-devel] [PATCH COLO-Frame (Base) v22 04/17] migration: Switch to COLO process after finishing loadvm

2016-10-26 Thread zhanghailiang
Switch from normal migration loadvm process into COLO checkpoint process if COLO mode is enabled. We add three new members to struct MigrationIncomingState, 'have_colo_incoming_thread' and 'colo_incoming_thread' record the COLO related thread for secondary VM, 'migration_incoming_co' records the

Re: [Qemu-devel] [PATCH] gtk: fix compilation warning with gtk 3.22.2

2016-10-26 Thread Alberto Garcia
On Wed 26 Oct 2016 05:21:08 PM CEST, Alberto Garcia wrote: > +#else > +{ > +screen_width = gdk_screen_get_width(screen); > +screen_height = gdk_screen_get_height(screen); > +} > +#endif I forgot to remove these braces, they are actually not necessary, so

Re: [Qemu-devel] macOS 10.12 Sierra, Xcode 8 & clock_gettime()

2016-10-26 Thread Liviu Ionescu
> On 26 Oct 2016, at 18:32, G 3 wrote: > > -isysroot /Developer/SDKs/MacOSX10.6.sdk yes, this is a compiler command line option pointing to an existing folder, but `/Developer/` is no longer in use for quite some time, and Apple does not provide any official way to

[Qemu-devel] [PATCH COLO-Frame (Base) v22 07/17] COLO: Add a new RunState RUN_STATE_COLO

2016-10-26 Thread zhanghailiang
Guest will enter this state when paused to save/restore VM state under COLO checkpoint. Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by:

Re: [Qemu-devel] [PATCH v8 00/36] block: Image locking series

2016-10-26 Thread Max Reitz
On 26.10.2016 17:33, Kevin Wolf wrote: > Am 26.10.2016 um 17:12 hat Max Reitz geschrieben: >> On 26.10.2016 13:01, Fam Zheng wrote: >>> On Tue, 10/25 16:57, Kevin Wolf wrote: Am 25.10.2016 um 15:30 hat Max Reitz geschrieben: > On 25.10.2016 10:24, Kevin Wolf wrote: >> Am 24.10.2016 um

Re: [Qemu-devel] macOS 10.12 Sierra, Xcode 8 & clock_gettime()

2016-10-26 Thread G 3
On Oct 26, 2016, at 11:15 AM, Liviu Ionescu wrote: On 26 Oct 2016, at 17:32, G 3 wrote: Maybe changing the base SDK from Mac OS 10.12 to say Mac OS 10.6 might fix the problem. any suggestion how to do this? for my linux and windows builds I use docker

Re: [Qemu-devel] [RESEND PATCH v3 kernel 2/7] virtio-balloon: define new feature bit and page bitmap head

2016-10-26 Thread Michael S. Tsirkin
On Fri, Oct 21, 2016 at 02:24:35PM +0800, Liang Li wrote: > Add a new feature which supports sending the page information with > a bitmap. The current implementation uses PFNs array, which is not > very efficient. Using bitmap can improve the performance of > inflating/deflating significantly > >

Re: [Qemu-devel] [Qemu-ppc] [PATCH 14/15] target-ppc: Use tcg_gen_extract_*

2016-10-26 Thread Richard Henderson
On 10/25/2016 07:59 PM, David Gibson wrote: > On Sat, Oct 15, 2016 at 08:37:49PM -0700, Richard Henderson wrote: >> Use the new primitives for RDWINM and RLDICL. >> >> Cc: qemu-...@nongnu.org >> Signed-off-by: Richard Henderson >> --- >> target-ppc/translate.c | 9 - >>

Re: [Qemu-devel] [PATCH v8 00/36] block: Image locking series

2016-10-26 Thread Kevin Wolf
Am 26.10.2016 um 17:12 hat Max Reitz geschrieben: > On 26.10.2016 13:01, Fam Zheng wrote: > > On Tue, 10/25 16:57, Kevin Wolf wrote: > >> Am 25.10.2016 um 15:30 hat Max Reitz geschrieben: > >>> On 25.10.2016 10:24, Kevin Wolf wrote: > Am 24.10.2016 um 20:03 hat Max Reitz geschrieben: > >

[Qemu-devel] [PATCH 1/2] vus: Introduce vhost-user-scsi host device

2016-10-26 Thread Felipe Franciosi
This commit introduces a vhost-user device for SCSI. This is based on the existing vhost-scsi implementation, but done over vhost-user instead. It also uses a chardev to connect to the backend. Unlike vhost-scsi (today), VMs using vhost-user-scsi can be live migrated. To use it, one must

Re: [Qemu-devel] [PATCH COLO-Frame (Base) v21 12/17] COLO: Add 'x-colo-lost-heartbeat' command to trigger failover

2016-10-26 Thread Hailiang Zhang
On 2016/10/26 21:59, Dr. David Alan Gilbert wrote: * Amit Shah (amit.s...@redhat.com) wrote: On (Tue) 18 Oct 2016 [20:10:08], zhanghailiang wrote: We leave users to choose whatever heartbeat solution they want, if the heartbeat is lost, or other errors they detect, they can use experimental

[Qemu-devel] [PATCH 0/2] Introduce vhost-user-scsi and sample application

2016-10-26 Thread Felipe Franciosi
Based on various discussions on the 2016 KVM Forum, I'm sending over a vhost-user-scsi implementation for your consideration. This patch set introduces a new vhost-user SCSI device. While heavily based on vhost-scsi, it is implemented using vhost's userspace counterpart. The device has been coded

Re: [Qemu-devel] [PATCH 2/2] tests: Enhance qmp output to cover partial visit

2016-10-26 Thread Eric Blake
On 10/25/2016 08:41 AM, Eric Blake wrote: >>> +static void test_visitor_out_partial_visit(TestOutputVisitorData *data, >>> + const void *unused) >>> +{ >>> +/* Check that aborting mid-visit doesn't leak or double-free */ >>> +

Re: [Qemu-devel] [PATCH 12/22] qcow2-bitmap: add IN_USE flag

2016-10-26 Thread Max Reitz
On 26.10.2016 11:04, Vladimir Sementsov-Ogievskiy wrote: > 25.10.2016 13:53, Vladimir Sementsov-Ogievskiy wrote: >> 24.10.2016 20:18, Max Reitz wrote: >>> On 24.10.2016 19:08, Max Reitz wrote: On 24.10.2016 13:35, Vladimir Sementsov-Ogievskiy wrote: > 24.10.2016 13:32, Vladimir

[Qemu-devel] [PATCH 2/2] vus: Introduce a vhost-user-scsi sample application

2016-10-26 Thread Felipe Franciosi
This commit introduces a vhost-user-scsi backend sample application. It must be linked with libiscsi and libvhost-user. To use it, compile with: make tests/vhost-user-scsi And run as follows: tests/vhost-user-scsi -u /tmp/vus.sock -i iscsi://uri_to_target/ The application is currently limited

[Qemu-devel] [PATCH] gtk: fix compilation warning with gtk 3.22.2

2016-10-26 Thread Alberto Garcia
gdk_screen_get_width() is deprecated since gtk 3.22.2, use gdk_monitor_get_geometry() instead if it's available. Signed-off-by: Alberto Garcia --- ui/gtk.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index

Re: [Qemu-devel] [PATCH 0/5] curses: wide character support

2016-10-26 Thread Samuel Thibault
Gerd Hoffmann, on Wed 26 Oct 2016 14:40:26 +0200, wrote: > > > Given how close the freeze deadline is now I'm tempted to cherry-pick > > > patches 0-3 and prepare a pull request ASAP. > > > > You mean patches 1-3? Patch 5 would be very useful too to fix typing > > accented > > letters, and it

Re: [Qemu-devel] [PATCH RFC] acpi: don't build acpi tables for xen hvm guests

2016-10-26 Thread Wei Liu
On Wed, Oct 26, 2016 at 05:09:52PM +0200, Igor Mammedov wrote: > On Tue, 25 Oct 2016 18:28:04 +0100 > Wei Liu wrote: > > > Xen's toolstack is in charge of building ACPI tables. Skip acpi table > > building if running on Xen. > > > > This issue is discovered due to direct

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-10-26 Thread Alex Williamson
On Wed, 26 Oct 2016 07:54:56 + "Tian, Kevin" wrote: > > From: Tian, Kevin > > Sent: Wednesday, October 26, 2016 3:54 PM > > > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > > Sent: Thursday, October 20, 2016 5:03 AM > > > > @@ -83,6 +92,21 @@

Re: [Qemu-devel] macOS 10.12 Sierra, Xcode 8 & clock_gettime()

2016-10-26 Thread Liviu Ionescu
> On 26 Oct 2016, at 17:32, G 3 wrote: > > Maybe changing the base SDK from Mac OS 10.12 to say Mac OS 10.6 might fix > the problem. any suggestion how to do this? for my linux and windows builds I use docker images, and I'm quite happy with this setup, it is

Re: [Qemu-devel] [PATCH COLO-Frame (Base) v21 17/17] configure: Support enable/disable COLO feature

2016-10-26 Thread Hailiang Zhang
On 2016/10/26 21:42, Eric Blake wrote: On 10/26/2016 01:07 AM, Amit Shah wrote: On (Tue) 18 Oct 2016 [20:10:13], zhanghailiang wrote: configure --enable-colo/--disable-colo to switch COLO support on/off. COLO feature is enabled by default. Signed-off-by: zhanghailiang

Re: [Qemu-devel] [PATCH] Reduce curses escdelay from 1s to 0.2s

2016-10-26 Thread Samuel Thibault
Gerd Hoffmann, on Wed 26 Oct 2016 14:51:00 +0200, wrote: > On Sa, 2016-10-15 at 19:24 +0200, Samuel Thibault wrote: > > Peter Maydell, on Wed 22 Jun 2016 21:49:04 +0100, wrote: > > > On 22 June 2016 at 16:44, Samuel Thibault > > > wrote: > > > > By default, curses

Re: [Qemu-devel] [PATCH v2 2/6] bitops: fix rol/ror when shift is zero

2016-10-26 Thread Richard Henderson
On 10/25/2016 11:26 PM, Nikunj A Dadhania wrote: > All the variants for rol/ror have a bug in case where the shift == 0. > For example rol32, would generate: > > return (word << 0) | (word >> 32); > > Which though works, would be flagged as a runtime error on clang's > sanitizer. > >

Re: [Qemu-devel] [PATCH 1/3] Add dots keypresses support to the baum braille device

2016-10-26 Thread Samuel Thibault
Gerd Hoffmann, on Wed 26 Oct 2016 14:37:14 +0200, wrote: > On So, 2016-10-23 at 21:54 +0200, Samuel Thibault wrote: > > Signed-off-by: Samuel Thibault > > Hmm, this one throws strange errors at me: > > kraxel@nilsson ~/projects/qemu (queue/ui)# git am -3 >

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-10-26 Thread Alex Williamson
On Wed, 26 Oct 2016 07:53:43 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Thursday, October 20, 2016 5:03 AM > > > @@ -83,6 +92,21 @@ struct vfio_group { > > > }; > > > > > > /* > > > + * Guest RAM pinning working

Re: [Qemu-devel] [PATCH v8 00/36] block: Image locking series

2016-10-26 Thread Max Reitz
On 26.10.2016 13:01, Fam Zheng wrote: > On Tue, 10/25 16:57, Kevin Wolf wrote: >> Am 25.10.2016 um 15:30 hat Max Reitz geschrieben: >>> On 25.10.2016 10:24, Kevin Wolf wrote: Am 24.10.2016 um 20:03 hat Max Reitz geschrieben: > On 24.10.2016 12:11, Kevin Wolf wrote: > > [...] >

Re: [Qemu-devel] [PATCH RFC] acpi: don't build acpi tables for xen hvm guests

2016-10-26 Thread Igor Mammedov
On Tue, 25 Oct 2016 18:28:04 +0100 Wei Liu wrote: > Xen's toolstack is in charge of building ACPI tables. Skip acpi table > building if running on Xen. > > This issue is discovered due to direct kernel boot on Xen doesn't boot > anymore, because the new ACPI tables cause

Re: [Qemu-devel] [PATCH COLO-Frame (Base) v21 17/17] configure: Support enable/disable COLO feature

2016-10-26 Thread Hailiang Zhang
On 2016/10/26 14:07, Amit Shah wrote: On (Tue) 18 Oct 2016 [20:10:13], zhanghailiang wrote: configure --enable-colo/--disable-colo to switch COLO support on/off. COLO feature is enabled by default. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian

Re: [Qemu-devel] [PATCH v8 00/36] block: Image locking series

2016-10-26 Thread Max Reitz
On 25.10.2016 16:57, Kevin Wolf wrote: > Am 25.10.2016 um 15:30 hat Max Reitz geschrieben: >> On 25.10.2016 10:24, Kevin Wolf wrote: >>> Am 24.10.2016 um 20:03 hat Max Reitz geschrieben: On 24.10.2016 12:11, Kevin Wolf wrote: [...] > Now, the big question is how to

Re: [Qemu-devel] [PATCH v9 04/12] vfio iommu: Add support for mediated devices

2016-10-26 Thread Kirti Wankhede
On 10/26/2016 12:49 PM, Tian, Kevin wrote: >> From: Alex Williamson [mailto:alex.william...@redhat.com] >> Sent: Monday, October 24, 2016 10:32 AM >> > -static long vfio_unpin_pages(unsigned long pfn, long npage, > - int prot, bool do_accounting) > +static long

Re: [Qemu-devel] [PATCH v12 10/19] block: Add QMP support for streaming to an intermediate layer

2016-10-26 Thread Kevin Wolf
Am 26.10.2016 um 12:29 hat Alberto Garcia geschrieben: > This patch makes the 'device' parameter of the 'block-stream' command > accept a node name that is not a root node. > > In addition to that, operation blockers will be checked in all > intermediate nodes between the top and the base node. >

Re: [Qemu-devel] [PATCH v9 02/12] vfio: VFIO based driver for Mediated devices

2016-10-26 Thread Kirti Wankhede
>> +static void vfio_mdev_release(void *device_data) >> +{ >> +struct mdev_device *mdev = device_data; >> +struct parent_device *parent = mdev->parent; >> + >> +if (parent->ops->release) > > likely() > >> +parent->ops->release(mdev); >> + >> +module_put(THIS_MODULE);

Re: [Qemu-devel] [PATCH v2 3/6] qdev: Register static properties as class properties

2016-10-26 Thread Igor Mammedov
On Thu, 20 Oct 2016 15:47:56 -0200 Eduardo Habkost wrote: > Instead of registering qdev static properties on instance_init, > register them as class properties, at qdev_class_set_props(). > > qdev_property_add_legacy() was replaced by an equivalent >

Re: [Qemu-devel] [PATCH COLO-Frame (Base) v21 14/17] COLO: Implement the process of failover for primary VM

2016-10-26 Thread Hailiang Zhang
On 2016/10/26 13:58, Amit Shah wrote: On (Tue) 18 Oct 2016 [20:10:10], zhanghailiang wrote: For primary side, if COLO gets failover request from users. To be exact, gets 'x_colo_lost_heartbeat' command. COLO thread will exit the loop while the failover BH does the cleanup work and resumes VM.

Re: [Qemu-devel] [PATCH v12 11/19] docs: Document how to stream to an intermediate layer

2016-10-26 Thread Kevin Wolf
Am 26.10.2016 um 12:29 hat Alberto Garcia geschrieben: > Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf

Re: [Qemu-devel] [PATCH v9 01/12] vfio: Mediated device Core driver

2016-10-26 Thread Kirti Wankhede
>> Medisted bus driver is responsible to add/delete mediated devices to/from > > Medisted -> Mediated > Thanks for pointing out the typeo. Correcting it. >> VFIO group when devices are bound and unbound to the driver. >> >> 2. Physical device driver interface >> This interface provides vendor

Re: [Qemu-devel] [PATCH v8 05/36] raw-posix: Add image locking support

2016-10-26 Thread Max Reitz
On 25.10.2016 15:43, Fam Zheng wrote: > On Tue, 10/25 15:28, Max Reitz wrote: >> On 25.10.2016 08:31, Fam Zheng wrote: >>> On Sat, 10/22 01:40, Max Reitz wrote: On 30.09.2016 14:09, Fam Zheng wrote: >> >> [...] >> > +static int > +raw_reopen_upgrade(BDRVReopenState *state, > +

Re: [Qemu-devel] [PATCH 1/2] KVM: page track: add a new notifier type: track_flush_slot

2016-10-26 Thread Paolo Bonzini
On 26/10/2016 15:44, Jike Song wrote: > On 10/21/2016 01:06 AM, Paolo Bonzini wrote: >> On 20/10/2016 03:48, Xiao Guangrong wrote: >>> I understood that KVM side is safe, however, vfio side is independent with >>> kvm and the user of usrdata can fetch kvm struct at any time, consider >>> this

Re: [Qemu-devel] [PATCH v12 09/19] block: Support streaming to an intermediate layer

2016-10-26 Thread Kevin Wolf
Am 26.10.2016 um 12:29 hat Alberto Garcia geschrieben: > This makes sure that the image we are streaming into is open in > read-write mode during the operation. > > Operation blockers are also set in all intermediate nodes, since they > will be removed from the chain afterwards. > > Finally,

Re: [Qemu-devel] [PATCH COLO-Frame (Base) v21 12/17] COLO: Add 'x-colo-lost-heartbeat' command to trigger failover

2016-10-26 Thread Hailiang Zhang
On 2016/10/26 13:51, Amit Shah wrote: On (Tue) 18 Oct 2016 [20:10:08], zhanghailiang wrote: We leave users to choose whatever heartbeat solution they want, if the heartbeat is lost, or other errors they detect, they can use experimental command 'x_colo_lost_heartbeat' to tell COLO to do

Re: [Qemu-devel] [PATCH v12 07/19] block: Block all nodes involved in the block-commit operation

2016-10-26 Thread Kevin Wolf
Am 26.10.2016 um 12:29 hat Alberto Garcia geschrieben: > After a successful block-commit operation all nodes between top and > base are removed from the backing chain, and top's overlay needs to > be updated to point to base. Because of that we should prevent other > block jobs from messing with

Re: [Qemu-devel] [PATCH 2/4] block/curl: Fix return value from curl_read_cb

2016-10-26 Thread Max Reitz
On 25.10.2016 20:37, Eric Blake wrote: > On 10/24/2016 09:54 PM, Max Reitz wrote: >> While commit 38bbc0a580f9f10570b1d1b5d3e92f0e6feb2970 is correct in that >> the callback is supposed to return the number of bytes handled; what it >> does not mention is that libcurl will throw an error if the

Re: [Qemu-devel] [PATCH COLO-Frame (Base) v21 10/17] COLO: Add checkpoint-delay parameter for migrate-set-parameters

2016-10-26 Thread Hailiang Zhang
Hi Eric, On 2016/10/26 21:39, Eric Blake wrote: On 10/26/2016 12:45 AM, Amit Shah wrote: On (Tue) 18 Oct 2016 [20:10:06], zhanghailiang wrote: Add checkpoint-delay parameter for migrate-set-parameters, so that we can control the checkpoint frequency when COLO is in periodic mode. Cc: Luiz

Re: [Qemu-devel] [PATCH v12 05/19] block: Use block_job_add_bdrv() in backup_start()

2016-10-26 Thread Kevin Wolf
Am 26.10.2016 um 12:29 hat Alberto Garcia geschrieben: > Use block_job_add_bdrv() instead of blocking all operations in > backup_start() and unblocking them in backup_run(). > > Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf

Re: [Qemu-devel] [PATCH v12 03/19] block: Add block_job_add_bdrv()

2016-10-26 Thread Kevin Wolf
Am 26.10.2016 um 12:29 hat Alberto Garcia geschrieben: > When a block job is created on a certain BlockDriverState, operations > are blocked there while the job exists. However, some block jobs may > involve additional BDSs, which must be blocked separately when the job > is created and unblocked

Re: [Qemu-devel] [PATCH v12 02/19] block: Pause all jobs during bdrv_reopen_multiple()

2016-10-26 Thread Kevin Wolf
Am 26.10.2016 um 12:29 hat Alberto Garcia geschrieben: > When a BlockDriverState is about to be reopened it can trigger certain > operations that need to write to disk. During this process a different > block job can be woken up. If that block job completes and also needs > to call bdrv_reopen()

Re: [Qemu-devel] [PATCH COLO-Frame (Base) v21 10/17] COLO: Add checkpoint-delay parameter for migrate-set-parameters

2016-10-26 Thread Hailiang Zhang
On 2016/10/26 13:45, Amit Shah wrote: On (Tue) 18 Oct 2016 [20:10:06], zhanghailiang wrote: Add checkpoint-delay parameter for migrate-set-parameters, so that we can control the checkpoint frequency when COLO is in periodic mode. Cc: Luiz Capitulino Cc: Eric Blake

<    1   2   3   4   5   6   >