[Qemu-devel] [PATCH v24 01/12] unblock backup operations in backing file

2016-07-27 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei --- block.c | 17 + 1 file changed, 17 insertions(+) diff --git a/block.c b/block.c index 9f037db..63e4636 100644 --- a/block.c +++ b/block.c @@ -1310,6 +1310,23 @@ void bdr

[Qemu-devel] [PATCH v24 04/12] Link backup into block core

2016-07-27 Thread Changlong Xie
From: Wen Congyang Some programs that add a dependency on it will use the block layer directly. Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Stefan Hajnoczi Reviewed-by: Jeff Cody ---

[Qemu-devel] [PATCH v24 09/12] Implement new driver for block replication

2016-07-27 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block/Makefile.objs | 1 + block/replication.c | 659 2 files changed, 660 in

[Qemu-devel] [PATCH v24 06/12] auto complete active commit

2016-07-27 Thread Changlong Xie
From: Wen Congyang Auto complete mirror job in background to prevent from blocking synchronously Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei --- block/mirror.c| 13 + blockdev.c| 2 +- include/block/block_int.h

[Qemu-devel] [PATCH v24 02/12] Backup: clear all bitmap when doing block checkpoint

2016-07-27 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- block/backup.c | 18 ++ include/block/block_backup.h | 25 + 2 files changed,

Re: [Qemu-devel] [PATCH RFC v0 5/6] target-ppc: add vsrv instruction

2016-07-27 Thread Nikunj A Dadhania
David Gibson writes: > [ Unknown signature status ] > On Wed, Jul 27, 2016 at 12:01:33PM +0530, Nikunj A Dadhania wrote: >> David Gibson writes: >> >> > [ Unknown signature status ] >> > On Wed, Jul 27, 2016 at 12:56:57AM +0530, Nikunj A Dadhania wrote: >> >> From: Vivek Andrew Sha >> >> >> >

[Qemu-devel] [PATCH v24 00/12] Block replication for continuous checkpoints

2016-07-27 Thread Changlong Xie
Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). You can get the detailed information about block replication from here: http://wiki.qemu.org/Features/BlockReplication Usage: Please refer to docs/block-replication.txt You can get the patc

[Qemu-devel] [PATCH v24 05/12] docs: block replication's description

2016-07-27 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei Signed-off-by: zhanghailiang Signed-off-by: Gonglei --- docs/block-replication.txt | 239 + 1 file changed, 239 insertions(+) create mode 10064

[Qemu-devel] [PATCH v24 07/12] configure: support replication

2016-07-27 Thread Changlong Xie
configure --(enable/disable)-replication to switch replication support on/off, and it is on by default. We later introduce replation support. Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei --- configure | 11 +++ 1 file changed, 11 insertions(+) di

[Qemu-devel] [PATCHv2 01/31] ppc: Provide basic raise_exception_* functions

2016-07-27 Thread Benjamin Herrenschmidt
Instead of using the same helpers called from translate.c, let's have a bunch of functions that take the various argument combinations, especially the retaddr which will be needed in subsequent patches, and leave the helpers to be just that, helpers for translate.c We don't yet convert all users,

[Qemu-devel] [PATCH v24 03/12] Backup: export interfaces for extra serialization

2016-07-27 Thread Changlong Xie
Normal backup(sync='none') workflow: step 1. NBD peformance I/O write from client to server qcow2_co_writev bdrv_co_writev ... bdrv_aligned_pwritev notifier_with_return_list_notify -> backup_do_cow bdrv_driver_pwritev // write new contents step 2. drive-backup s

[Qemu-devel] [PATCHv2 10/31] ppc: Don't update the NIP in floating point generated code

2016-07-27 Thread Benjamin Herrenschmidt
This is no longer necessary as the helpers will properly retrieve the return address. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate/fp-impl.c | 28 target-ppc/translate/vsx-impl.c | 6 -- 2 files changed, 34 deletions(-) diff --git a/target-pp

[Qemu-devel] [PATCHv2 04/31] ppc: Move DFP ops out of translate.c

2016-07-27 Thread Benjamin Herrenschmidt
Makes things a bit more manageable Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 365 +--- target-ppc/translate/dfp-impl.c | 212 +++ target-ppc/translate/dfp-ops.c | 151 + 3 files changed, 36

[Qemu-devel] [PATCH v24 12/12] MAINTAINERS: add maintainer for replication

2016-07-27 Thread Changlong Xie
As per Stefan's suggestion, add Wen and I as co-maintainers of replication. Cc: Stefan Hajnoczi Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1d0e2c3..25b9438 100644 --- a/MA

[Qemu-devel] [PATCH v24 11/12] support replication driver in blockdev-add

2016-07-27 Thread Changlong Xie
From: Wen Congyang Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei Signed-off-by: zhanghailiang Signed-off-by: Gonglei Reviewed-by: Eric Blake --- qapi/block-core.json | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff -

[Qemu-devel] [PATCH v24 10/12] tests: add unit test case for replication

2016-07-27 Thread Changlong Xie
Signed-off-by: Wen Congyang Signed-off-by: Changlong Xie Signed-off-by: Wang WeiWei --- tests/.gitignore | 1 + tests/Makefile.include | 4 + tests/test-replication.c | 575 +++ 3 files changed, 580 insertions(+) create mode 100644 test

[Qemu-devel] [PATCH v24 08/12] Introduce new APIs to do replication operation

2016-07-27 Thread Changlong Xie
This commit introduces six replication interfaces(for block, network etc). Firstly we can use replication_(new/remove) to create/destroy replication instances, then in migration we can use replication_(start/stop/do_checkpoint /get_error)_all to handle all replication operations. More detail please

[Qemu-devel] [PATCHv2 12/31] ppc: Don't update NIP in lswi/lswx/stswi/stswx

2016-07-27 Thread Benjamin Herrenschmidt
Instead, pass GETPC() result to the corresponding helpers. This requires a bit of fiddling to get the PC (hopefully) right in the case where we generate a program check, though the hacks there are temporary, a subsequent patch will clean this all up by always having the nip already set to the right

[Qemu-devel] [PATCHv2 06/31] ppc: Move VSX ops out of translate.c

2016-07-27 Thread Benjamin Herrenschmidt
Makes things a bit more manageable Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 994 +--- target-ppc/translate/vsx-impl.c | 721 + target-ppc/translate/vsx-ops.c | 271 +++ 3 files changed, 99

[Qemu-devel] [PATCHv2 18/31] ppc: Don't update NIP in facility unavailable interrupts

2016-07-27 Thread Benjamin Herrenschmidt
This is no longer necessary as the helpers will properly retrieve the return address when needed. Also remove gen_update_current_nip() which didn't seem to make much sense to me. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/cpu.h| 1 - target-ppc/misc_helper.c| 9 +---

[Qemu-devel] [PATCHv2 02/31] ppc: Move classic fp ops out of translate.c

2016-07-27 Thread Benjamin Herrenschmidt
Makes things a bit more manageable Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 1205 +--- target-ppc/translate/fp-impl.c | 1098 target-ppc/translate/fp-ops.c | 111 3 files changed, 12

[Qemu-devel] [PATCHv2 07/31] ppc: Rename fload_invalid_op_excp to float_invalid_op_excp

2016-07-27 Thread Benjamin Herrenschmidt
No other change Signed-off-by: Benjamin Herrenschmidt --- target-ppc/fpu_helper.c | 122 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/target-ppc/fpu_helper.c b/target-ppc/fpu_helper.c index d9795d0..e1f600a 100644 --- a/target-p

[Qemu-devel] [PATCHv2 09/31] ppc: Make float_check_status() pass the return address

2016-07-27 Thread Benjamin Herrenschmidt
Instead of relying on NIP having been updated already. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/fpu_helper.c | 62 + 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/target-ppc/fpu_helper.c b/target-ppc/fpu_helper.c index

[Qemu-devel] [PATCHv2 19/31] ppc: Don't update NIP BookE 2.06 tlbwe

2016-07-27 Thread Benjamin Herrenschmidt
This is no longer necessary as the helpers will properly retrieve the return address when needed. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/mmu_helper.c | 12 ++-- target-ppc/translate.c | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/target-ppc/mmu_hel

[Qemu-devel] [PATCHv2 05/31] ppc: Move VMX ops out of translate.c

2016-07-27 Thread Benjamin Herrenschmidt
Makes things a bit more manageable Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 1068 +-- target-ppc/translate/vmx-impl.c | 829 ++ target-ppc/translate/vmx-ops.c | 246 + 3 files changed, 1

[Qemu-devel] [PATCHv2 08/31] ppc: Make float_invalid_op_excp() pass the return address

2016-07-27 Thread Benjamin Herrenschmidt
Instead of relying on NIP having been updated already Signed-off-by: Benjamin Herrenschmidt --- target-ppc/fpu_helper.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target-ppc/fpu_helper.c b/target-ppc/fpu_helper.c index e1f600a..8d881fc 100644 --- a/target-ppc/fpu_h

[Qemu-devel] [PATCHv2 03/31] ppc: Move embedded spe ops out of translate.c

2016-07-27 Thread Benjamin Herrenschmidt
Makes things a bit more manageable Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 1328 +-- target-ppc/translate/spe-impl.c | 1229 target-ppc/translate/spe-ops.c | 106 3 files changed,

[Qemu-devel] [PATCHv2 28/31] ppc: Don't set access_type on all load/stores on hash64

2016-07-27 Thread Benjamin Herrenschmidt
We don't use it so let's not generate the updates. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index fb4eb7b..4640a29 100644 --- a/target-ppc/translate.c ++

[Qemu-devel] [PATCHv2 13/31] ppc: Don't update NIP in lmw/stmw/icbi

2016-07-27 Thread Benjamin Herrenschmidt
Instead, pass GETPC() result to the corresponding helpers. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/mem_helper.c | 11 ++- target-ppc/translate.c | 6 -- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/target-ppc/mem_helper.c b/target-ppc/mem_helper.c in

[Qemu-devel] [PATCHv2 11/31] ppc: FP exceptions are always precise

2016-07-27 Thread Benjamin Herrenschmidt
We don't implement imprecise FP exceptions and using store_current which sets SRR1 to the *previous* instruction never makes sense for these. So let's be truthful and make them precise, which is allowed by the architecture. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/excp_helper.c | 11

[Qemu-devel] [PATCHv2 15/31] ppc: Rework NIP updates vs. exception generation

2016-07-27 Thread Benjamin Herrenschmidt
We make env->nip almost always point to the faulting instruction, thus avoiding a mess of "store_current" vs "store_next" in the exception handling. The syscall exception knows to move the PC by 4 and that's really about it. This actually fixes a number of cases where the translator was setting en

[Qemu-devel] [PATCHv2 29/31] ppc: Use a helper to generate "LE unsupported" alignment interrupts

2016-07-27 Thread Benjamin Herrenschmidt
Some operations aren't allowed in LE mode, use a helper rather than open coding the exception generation. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate

[Qemu-devel] [PATCHv2 16/31] ppc: Fix source NIP on SLB related interrupts

2016-07-27 Thread Benjamin Herrenschmidt
We need to pass it to the raise helper since we don't update it before the calls. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/mmu-hash64.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target-ppc/mmu-hash64.c b/target-ppc/mmu-hash64.c index 5de1358

[Qemu-devel] [PATCHv2 17/31] ppc: Don't update NIP in DCR access routines

2016-07-27 Thread Benjamin Herrenschmidt
This is no longer necessary as the helpers will properly retrieve the return address when needed Signed-off-by: Benjamin Herrenschmidt --- target-ppc/timebase_helper.c | 23 +-- target-ppc/translate.c | 12 2 files changed, 13 insertions(+), 22 deletions(-)

[Qemu-devel] [PATCHv2 14/31] ppc: Make tlb_fill() use new exception helper

2016-07-27 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- target-ppc/mmu_helper.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/target-ppc/mmu_helper.c b/target-ppc/mmu_helper.c index 737f338..692398c 100644 --- a/target-ppc/mmu_helper.c +++ b/target-ppc/mmu_helper.c @@ -2892,10 +289

Re: [Qemu-devel] [RFC PATCH V3 1/3] filter-rewriter: introduce filter-rewriter initialization

2016-07-27 Thread Jason Wang
On 2016年07月05日 18:29, Zhang Chen wrote: Filter-rewriter is a part of COLO project. It will rewrite some of secondary packet to make secondary guest's tcp connection established successfully. In this module we will rewrite tcp packet's ack to the secondary from primary,and rewrite tcp packet's s

[Qemu-devel] [PATCHv2 21/31] ppc: Don't update NIP if not taking alignment exceptions

2016-07-27 Thread Benjamin Herrenschmidt
Move the NIP update to after the conditional branch so that we don't do it if we aren't going to take the alignment exception Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc

[Qemu-devel] [PATCHv2 22/31] ppc: Don't update NIP in dcbz and lscbx

2016-07-27 Thread Benjamin Herrenschmidt
Instead, pass GETPC() result to the corresponding helpers. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/mem_helper.c | 9 + target-ppc/translate.c | 4 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/target-ppc/mem_helper.c b/target-ppc/mem_helper.c index e20

[Qemu-devel] [PATCHv2 23/31] ppc: Make alignment exceptions suck less

2016-07-27 Thread Benjamin Herrenschmidt
The current alignment exception generation tries to load the opcode to put in DSISR from a context where a cpu_ldl_code() is really not a good idea. It might fault and longjmp out and that's not something we want happening here. Instead, pass the releavant opcode bits via the error_code. There ar

[Qemu-devel] [PATCHv2 20/31] ppc: Don't update NIP on conditional trap instructions

2016-07-27 Thread Benjamin Herrenschmidt
This is no longer necessary as the helpers will properly retrieve the return address when needed. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/excp_helper.c | 6 -- target-ppc/translate.c | 8 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/target-ppc/excp_

[Qemu-devel] [PATCHv2 25/31] ppc: Speed up dcbz

2016-07-27 Thread Benjamin Herrenschmidt
Use tlb_vaddr_to_host to do a fast path single translate for the whole cache line. Also make the reservation check match the entire range. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/mem_helper.c | 46 +- target-ppc/translate.c | 11 -

Re: [Qemu-devel] [PATCH RFC v0 5/6] target-ppc: add vsrv instruction

2016-07-27 Thread David Gibson
On Wed, Jul 27, 2016 at 12:27:27PM +0530, Nikunj A Dadhania wrote: > David Gibson writes: > > > [ Unknown signature status ] > > On Wed, Jul 27, 2016 at 12:01:33PM +0530, Nikunj A Dadhania wrote: > >> David Gibson writes: > >> > >> > [ Unknown signature status ] > >> > On Wed, Jul 27, 2016 at 1

[Qemu-devel] [PATCHv2 24/31] ppc: Handle unconditional (always/never) traps at translation time

2016-07-27 Thread Benjamin Herrenschmidt
We don't need to call a helper for trap always and trap never which are used by Linux under some circumstances. Signed-off-by: Benjamin Herrenschmidt -- v2. Don't generate the helper call when trapping always --- target-ppc/translate.c | 49 +++-- 1 f

[Qemu-devel] [PATCHv2 31/31] ppc: Speed up load/store multiple

2016-07-27 Thread Benjamin Herrenschmidt
Use a single translate when not crossing a page boundary and avoid going through layers of helpers. MacOS uses those instructions a lot, so does OpenBIOS. Signed-off-by: Benjamin Herrenschmidt --- target-ppc/mem_helper.c | 69 + 1 file changed, 69

Re: [Qemu-devel] [PATCH v4 07/15] target-ppc: implement branch-less divw[o][.]

2016-07-27 Thread David Gibson
On Wed, Jul 27, 2016 at 12:11:08PM +0530, Nikunj A Dadhania wrote: > David Gibson writes: > > > [ Unknown signature status ] > > On Wed, Jul 27, 2016 at 11:47:15AM +0530, Nikunj A Dadhania wrote: > >> David Gibson writes: > >> > >> > [ Unknown signature status ] > >> > On Tue, Jul 26, 2016 at 0

[Qemu-devel] [PATCHv2 27/31] ppc: Avoid double translation for lvx/lvxl/stvx/stvxl

2016-07-27 Thread Benjamin Herrenschmidt
Those are always naturally aligned, so cannot cross a page boundary, thus instead of generating two 8-byte loads with translation on each (and double swap for LE on LE), we use a helper that will do a single translation and memcpy the result over (or do appropriate swapping if needed). Signed-off-

Re: [Qemu-devel] [PATCH] i2c: fix migration regression introduced by broadcast support

2016-07-27 Thread Igor Mammedov
On Tue, 26 Jul 2016 11:31:45 -0400 (EDT) Paolo Bonzini wrote: > - Igor Mammedov ha scritto: > > QEMU fails migration with following error: > > > > qemu-system-x86_64: Missing section footer for i2c_bus > > qemu-system-x86_64: load of migration failed: Invalid argument > > > > when migratin

Re: [Qemu-devel] [RFC PATCH V3 0/3] filter-rewriter: introduce filter-rewriter

2016-07-27 Thread Jason Wang
On 2016年07月27日 13:49, Zhang Chen wrote: On 07/27/2016 10:50 AM, Jason Wang wrote: On 2016年07月27日 10:32, Zhang Chen wrote: Hi~ all~~ Anyone have some comments for this series? Will have a look at this. Btw. I wonder how this is tested, do we need a unit test for this? COLO-compare an

Re: [Qemu-devel] [RFC PATCH V3 3/3] filter-rewriter: rewrite tcp packet to keep secondary connection

2016-07-27 Thread Jason Wang
On 2016年07月05日 18:29, Zhang Chen wrote: We will rewrite tcp packet secondary received and sent. When colo guest is a tcp server. Firstly, client start a tcp handshake. the packet's seq=client_seq, ack=0,flag=SYN. COLO primary guest get this pkt and mirror(filter-mirror) to secondary guest, sec

[Qemu-devel] [PATCHv2 26/31] ppc: Fix CFAR updates

2016-07-27 Thread Benjamin Herrenschmidt
We were one instruction off Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index cfe247d..fb4eb7b 100644 --- a/target-ppc/translate.c +++ b/target-ppc/tra

Re: [Qemu-devel] [PULL 26/28] apic: Use apic_id as apic's migration instance_id

2016-07-27 Thread Igor Mammedov
On Tue, 26 Jul 2016 16:19:28 -0300 Eduardo Habkost wrote: > On Tue, Jul 26, 2016 at 04:16:04PM +0200, Igor Mammedov wrote: > > On Tue, 26 Jul 2016 18:41:22 +0530 > > Amit Shah wrote: > > > > > On (Tue) 26 Jul 2016 [14:58:39], Igor Mammedov wrote: > > > > > This was flagged by a nightly run

Re: [Qemu-devel] [PATCH 4/4] block: Cater to iscsi with non-power-of-2 discard

2016-07-27 Thread Fam Zheng
On Thu, 07/21 13:34, Eric Blake wrote: > +max_write_zeroes = max_write_zeroes / alignment * alignment; Not using QEMU_ALIGN_DOWN despite patch 3?

[Qemu-devel] [PATCHv2 30/31] ppc: load/store multiple and string insns don't do LE

2016-07-27 Thread Benjamin Herrenschmidt
Just generate an alignment interrupt Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate.c | 29 + 1 file changed, 29 insertions(+) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 0723c97..3dd9a48 100644 --- a/target-ppc/translate.c +++

Re: [Qemu-devel] [PATCH for-2.7 0/4] NBD and block alignment fixes

2016-07-27 Thread Fam Zheng
On Thu, 07/21 13:34, Eric Blake wrote: > This series extracts a couple of bug fixes that should be included > in 2.7, out of my earlier v5 NBD series [1] that was deemed too > large and too late. Then it tackles the promised regression fix > reported by Peter for Dell Equallogic iSCSI SANs with th

Re: [Qemu-devel] [PATCH V5 0/6] coroutine: mmap stack memory and stack size

2016-07-27 Thread Peter Lieven
Am 12.07.2016 um 18:23 schrieb Peter Lieven: > I decided to split this from the rest of the Qemu RSS usage series as > it contains the more or less non contentious patches. > > I omitted the MAP_GROWSDOWN flag in mmap as we are not 100% sure which > side effects it has. > > I kept the guard page wh

[Qemu-devel] [PATCH qemu] kvm-irqchip: Only do explicit IRQ routing commit when IRQCHIP is in use

2016-07-27 Thread Alexey Kardashevskiy
3f1fea0fb5bf "kvm-irqchip: do explicit commit when update irq" produces a crash on pseries guest running with VFIO on POWER8 machine as it does not support KVM_CAP_IRQCHIP (KVM_CAP_IRQ_XICS is there instead). At the result, KVMState::irq_routes is NULL when VFIO calls kvm_irqchip_commit_routes. Th

Re: [Qemu-devel] [RFC PATCH V3 1/3] filter-rewriter: introduce filter-rewriter initialization

2016-07-27 Thread Zhang Chen
On 07/27/2016 03:02 PM, Jason Wang wrote: On 2016年07月05日 18:29, Zhang Chen wrote: Filter-rewriter is a part of COLO project. It will rewrite some of secondary packet to make secondary guest's tcp connection established successfully. In this module we will rewrite tcp packet's ack to the seco

Re: [Qemu-devel] [RFC PATCH V3 0/3] filter-rewriter: introduce filter-rewriter

2016-07-27 Thread Zhang Chen
On 07/27/2016 03:05 PM, Jason Wang wrote: On 2016年07月27日 13:49, Zhang Chen wrote: On 07/27/2016 10:50 AM, Jason Wang wrote: On 2016年07月27日 10:32, Zhang Chen wrote: Hi~ all~~ Anyone have some comments for this series? Will have a look at this. Btw. I wonder how this is tested, do we

Re: [Qemu-devel] ext4 error when testing virtio-scsi & vhost-scsi

2016-07-27 Thread Zhangfei Gao
Hi, Michael I have met ext4 error when using vhost_scsi on arm64 platform, and suspect it is vhost_scsi issue. Ext4 error when testing virtio_scsi & vhost_scsi No issue: 1. virtio_scsi, ext4 2. vhost_scsi & virtio_scsi, ext2 3. Instead of vhost, also tried loopback and no problem. Using loopba

Re: [Qemu-devel] [PATCH] error: error_setg_errno(): errno may be clobbered

2016-07-27 Thread Markus Armbruster
Sascha Silbe writes: > As a general policy, we want callers to save errno > themselves. error_setg_internal() currently goes out of its way to > preserve errno, In other words, "error_setg_errno(): errno may be clobbered" is a lie :) > so with the API documentation not mentionin

Re: [Qemu-devel] [PATCH v6] qemu-img: add the 'dd' subcommand

2016-07-27 Thread Fam Zheng
On Mon, 07/25 07:58, Reda Sallahi wrote: > This patch adds a basic dd subcommand analogous to dd(1) to qemu-img. > > For the start, this implements the bs, if, of and count options and requires > both if and of to be specified (no stdin/stdout if not specified) and doesn't > support tty, pipes, et

Re: [Qemu-devel] [PATCH v2 1/1] block: improve error handling in raw_open

2016-07-27 Thread Markus Armbruster
Max Reitz writes: > On 26.07.2016 19:18, Halil Pasic wrote: >> >> >> On 07/26/2016 05:42 PM, Max Reitz wrote: +++ b/block/raw-posix.c > @@ -485,6 +485,7 @@ static int raw_open_common(BlockDriverState *bs, > QDict *options, > s->fd = -1; > fd = qemu_open(filename,

[Qemu-devel] [PATCH qemu] spapr_pci: Add numa node id

2016-07-27 Thread Alexey Kardashevskiy
This adds a numa id property to a PHB to allow linking passed PCI device to CPU/memory. It is up to the management stack to do CPU/memory pinning to the node with the actual PCI device. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr_pci.c | 13 + include/hw/pci-host/sp

Re: [Qemu-devel] [PATCH v6 29/33] tests: add a simple /vhost-user/multiqueue test

2016-07-27 Thread Marc-André Lureau
Hi I just realized that the travis build failed, because of wait_for_rings_started is under CONFIG_HAS_GLIB_SUBPROCESS_TESTS, the fix in this patch is: diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 8e2b63c..82dfd0d 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user

[Qemu-devel] [PATCH] ppc: Add MacOS VGA driver ROM

2016-07-27 Thread Benjamin Herrenschmidt
The project is at https://github.com/ozbenh/QemuMacDrivers This adds a native MacOS driver in ROM (which can be picked up by MacOS once OpenBIOS has been updated if Mark accepts the patches I sent him) which allows MacOS classic (tested 9.2.1) and MacOS X (tested 10.1.4 and 10.4) to properly use Q

Re: [Qemu-devel] [PATCHv2 11/31] ppc: FP exceptions are always precise

2016-07-27 Thread David Gibson
On Wed, Jul 27, 2016 at 04:56:29PM +1000, Benjamin Herrenschmidt wrote: > We don't implement imprecise FP exceptions and using store_current > which sets SRR1 to the *previous* instruction never makes sense > for these. So let's be truthful and make them precise, which is > allowed by the architect

Re: [Qemu-devel] [PATCH v2 3/6] exec: set cpu_index only if it's not been explictly set

2016-07-27 Thread Igor Mammedov
On Tue, 26 Jul 2016 15:28:13 -0300 Eduardo Habkost wrote: > On Mon, Jul 25, 2016 at 11:59:21AM +0200, Igor Mammedov wrote: > > it keeps the legacy behavior for all users that doesn't care > > about stable cpu_index value, but would allow boards that > > would support device_add/device_del to set

Re: [Qemu-devel] [PATCH qemu] kvm-irqchip: Only do explicit IRQ routing commit when IRQCHIP is in use

2016-07-27 Thread Peter Xu
On Wed, Jul 27, 2016 at 05:51:46PM +1000, Alexey Kardashevskiy wrote: > 3f1fea0fb5bf "kvm-irqchip: do explicit commit when update irq" produces > a crash on pseries guest running with VFIO on POWER8 machine as > it does not support KVM_CAP_IRQCHIP (KVM_CAP_IRQ_XICS is there instead). > At the resul

Re: [Qemu-devel] [RFC PATCH V3 3/3] filter-rewriter: rewrite tcp packet to keep secondary connection

2016-07-27 Thread Zhang Chen
On 07/27/2016 03:03 PM, Jason Wang wrote: On 2016年07月05日 18:29, Zhang Chen wrote: We will rewrite tcp packet secondary received and sent. When colo guest is a tcp server. Firstly, client start a tcp handshake. the packet's seq=client_seq, ack=0,flag=SYN. COLO primary guest get this pkt and

[Qemu-devel] [PATCH] error: error_setg_errno(): errno gets preserved

2016-07-27 Thread Sascha Silbe
C11 allows errno to be clobbered by pretty much any library function call, so in general callers need to take care to save errno before calling other functions. However, for error reporting functions this is rather awkward and can make the code on the caller side more complicated than necessary. e

[Qemu-devel] [PATCH v2 7/6] exec: ensure the only one cpu_index allocation method is used

2016-07-27 Thread Igor Mammedov
Make sure that cpu_index auto allocation isn't used in combination with manual cpu_index assignment. And dissallow out of order cpu removal if auto allocation is in use. Target that wishes to support out of order unplug should switch to manual cpu_index assignment. Following patch could be used as

Re: [Qemu-devel] [PATCH] error: error_setg_errno(): errno may be clobbered

2016-07-27 Thread Sascha Silbe
Dear Markus, Markus Armbruster writes: > Sascha Silbe writes: > >> As a general policy, we want callers to save errno >> themselves. error_setg_internal() currently goes out of its way to >> preserve errno, > > In other words, "error_setg_errno(): errno may be clobbered" is a lie :) No, it's j

Re: [Qemu-devel] [PATCH v4 0/5] fix numa node mapping for hotplugged CPUs

2016-07-27 Thread Igor Mammedov
On Mon, 18 Jul 2016 09:51:01 +0200 Igor Mammedov wrote: > On Mon, 4 Jul 2016 17:51:14 +0200 > Igor Mammedov wrote: > > Ping, > > Michael, > it seems that series fell through cracks, > could you pick it up please? v2 ping > > > Changelog: > > v3->v4: > > - return -1 on failure from numa_g

Re: [Qemu-devel] From virtio_kick until VM-exit?

2016-07-27 Thread charls chap
Hello All, I am new with qemu, I am trying to understand the I/O path of a synchronous I/O. It turns out, that I've not a clear picture. Definitely for VM-exit and VM-entry parts. Some generic questions first, and some other questions inline :) 1) if i am correct: When we run QEMU in emulatio

Re: [Qemu-devel] [PATCHv2 11/31] ppc: FP exceptions are always precise

2016-07-27 Thread Benjamin Herrenschmidt
On Wed, 2016-07-27 at 17:21 +1000, David Gibson wrote: > On Wed, Jul 27, 2016 at 04:56:29PM +1000, Benjamin Herrenschmidt > wrote: > > > > We don't implement imprecise FP exceptions and using store_current > > which sets SRR1 to the *previous* instruction never makes sense > > for these. So let's

Re: [Qemu-devel] From virtio_kick until VM-exit?

2016-07-27 Thread Stefan Hajnoczi
On Wed, Jul 27, 2016 at 10:19 AM, charls chap wrote: > I am new with qemu, I am trying to understand the I/O path of a synchronous > I/O. > It turns out, that I've not a clear picture. Definitely for VM-exit and > VM-entry parts. Please email the QEMU mailing list at qemu-devel@nongnu.org and CC

[Qemu-devel] [PATCH v4 2/2] vhost-user: Attempt to fix a race with set_mem_table.

2016-07-27 Thread Prerna Saxena
From: Prerna Saxena The set_mem_table command currently does not seek a reply. Hence, there is no easy way for a remote application to notify to QEMU when it finished setting up memory, or if there were errors doing so. As an example: (1) Qemu sends a SET_MEM_TABLE to the backend (eg, a vhost-us

[Qemu-devel] [PATCH v4 1/2] vhost-user: Introduce a new protocol feature REPLY_ACK.

2016-07-27 Thread Prerna Saxena
From: Prerna Saxena This introduces the VHOST_USER_PROTOCOL_F_REPLY_ACK. If negotiated, client applications should send a u64 payload in response to any message that contains the "need_response" bit set on the message flags. Setting the payload to "zero" indicates the command finished successful

[Qemu-devel] [PATCH v4 0/2] vhost-user: Extend protocol to receive replies on any command.

2016-07-27 Thread Prerna Saxena
From: Prerna Saxena *** BLURB HERE *** vhost-user: Extend protocol to receive replies on any command. The current vhost-user protocol requires the client to send responses to only a few commands. For the remaining commands, it is impossible for QEMU to know the status of the requested operation

Re: [Qemu-devel] [PATCH RFC] spapr: disintricate core-id from DT semantics

2016-07-27 Thread Greg Kurz
Le Mon, 25 Jul 2016 16:01:31 +1000, David Gibson a écrit : > On Fri, Jul 22, 2016 at 01:10:36PM +0200, Greg Kurz wrote: > > The goal of this patch is to have a stable core-id which does not depend > > on any DT related semantics, which involve non-obvious computations on > > modern PowerPC server

[Qemu-devel] [PATCH] qemu-img: add skip option to dd

2016-07-27 Thread Reda Sallahi
This adds the skip option which allows qemu-img dd to skip a number of blocks before copying the input. A test case was added to test the skip option. Signed-off-by: Reda Sallahi --- Depends on: [PATCH v6] qemu-img: add the 'dd' subcommand qemu-img-cmds.hx | 4 +-- qemu-img.c

Re: [Qemu-devel] [PATCH v3 0/2] vhost-user: Extend protocol to receive replies on any command.

2016-07-27 Thread Prerna Saxena
On 27/07/16 9:51 am, "Michael S. Tsirkin" wrote: >On Mon, Jul 25, 2016 at 02:27:18PM +0400, Marc-André Lureau wrote: >> Hi >> >> On Mon, Jul 25, 2016 at 10:41 AM, Prerna wrote: >> > >> > >> > On Thu, Jul 7, 2016 at 12:04 PM, Prerna Saxena >> > wrote: >> >> >> >> From: Prerna Saxena >> >>

[Qemu-devel] [PATCH v5] virtio-crypto: Add virtio crypto device specification

2016-07-27 Thread Gonglei
The virtio crypto device is a virtual crypto device (ie. hardware crypto accelerator card). The virtio crypto device can provide five crypto services: CIPHER, MAC, HASH, AEAD, KDF, ASYM, PRIMITIVE. In this patch, CIPHER, MAC, HASH, AEAD services are introduced. CC: Michael S. Tsirkin CC: Corneli

Re: [Qemu-devel] tests/ide-test hangs with gthread

2016-07-27 Thread Marc-André Lureau
Hi On Wed, Jul 13, 2016 at 10:20 PM, John Snow wrote: > > > On 07/13/2016 12:30 PM, Marc-André Lureau wrote: >> Hi, >> >> Since 4840f10 "memory: let address_space_rw/ld*/st* run outside the >> BQL", the ide-test /x86_64/ide/bmdma/no_busmaster hangs when qemu is >> compiled with gthread coroutine

[Qemu-devel] [PATCH RFC 0/3] Backup/blockjob fixes

2016-07-27 Thread Vladimir Sementsov-Ogievskiy
Hi all! There are some fixes, related to previously posted test [PATCH] backup: block-job error BUG I'm not sure that proposed solution is a true way to fix the problem, but it just works for me. Vladimir Sementsov-Ogievskiy (3): blockjob: fix dead pointer in txn list backup: fix transac

[Qemu-devel] [PATCH 1/3] blockjob: fix dead pointer in txn list

2016-07-27 Thread Vladimir Sementsov-Ogievskiy
Job may be freed in block_job_unref and in this case this would break transaction QLIST. Fix this by removing job from this list before unref. Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockjob.c | 1 + 1 file changed, 1 insertion(+) diff --git a/blockjob.c b/blockjob.c index a5ba3be..e0

[Qemu-devel] [PATCH 3/3] blockjob: fix transaction cancel

2016-07-27 Thread Vladimir Sementsov-Ogievskiy
Prevent a situation, when some jobs from transaction are already finished and user tries to cancel a job from this transaction. Signed-off-by: Vladimir Sementsov-Ogievskiy --- blockdev.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/blockdev.c b/blockdev.c index 59ae9e4..d1818

[Qemu-devel] [PATCH 2/3] backup: fix transaction fail scenario

2016-07-27 Thread Vladimir Sementsov-Ogievskiy
When there are several backups in one transaction, successed block job must wait for possible cancelling by other block job (if it fails). Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 12 blockdev.c | 2 ++ blockjob.c | 33 +

Re: [Qemu-devel] Improving QEMU's About dialog

2016-07-27 Thread Peter Maydell
On 27 July 2016 at 01:44, Programmingkid wrote: > Under Mac OS X, QEMU's about dialog is not very helpful. > It only displays an icon and the name of the binary. I > think this should be improved. Let me know what you think > of this idea: > > > > >Version: > Git commit versi

Re: [Qemu-devel] [PATCH] error: error_setg_errno(): errno gets preserved

2016-07-27 Thread Markus Armbruster
Sascha Silbe writes: > C11 allows errno to be clobbered by pretty much any library function > call, so in general callers need to take care to save errno before > calling other functions. > > However, for error reporting functions this is rather awkward and can > make the code on the caller side

Re: [Qemu-devel] [PATCH v4 1/2] vhost-user: Introduce a new protocol feature REPLY_ACK.

2016-07-27 Thread Marc-André Lureau
Hi On Wed, Jul 27, 2016 at 1:52 PM, Prerna Saxena wrote: > From: Prerna Saxena > > This introduces the VHOST_USER_PROTOCOL_F_REPLY_ACK. > > If negotiated, client applications should send a u64 payload in > response to any message that contains the "need_response" bit set > on the message flags.

Re: [Qemu-devel] A question about tb_next_offset[2]

2016-07-27 Thread Peter Maydell
On 26 July 2016 at 19:49, Kartik Ramkrishnan wrote: > Hello all, > >I am running an i386 binary in user mode using qemu. > >In the code, I am looking for the next location that the simulated > program counter jumps to when a TranslationBlock completes execution. This > address should be th

Re: [Qemu-devel] [PATCH v2 1/2] util: Drop unused *_nonblocking_connect() functions

2016-07-27 Thread Daniel P. Berrange
On Mon, Jul 25, 2016 at 09:02:50PM +0800, Cao jin wrote: > Since commit e65c67e4 & d984464e, they are not used anymore, and all > non-blocking connect now goes through inet_connect_addr(). > > Cc: Daniel P. Berrange > Cc: Gerd Hoffmann > Cc: Paolo Bonzini > Cc: Eric Blake > > Reviewed-by: Eri

Re: [Qemu-devel] [PATCH v2 2/2] util: Drop inet_listen()

2016-07-27 Thread Daniel P. Berrange
On Mon, Jul 25, 2016 at 09:02:51PM +0800, Cao jin wrote: > Since commit e65c67e4, inet_listen() is not used anymore, and all > inet listen operation goes through QIOChannel. > > Cc: Daniel P. Berrange > Cc: Gerd Hoffmann > Cc: Paolo Bonzini > Cc: Eric Blake > > Signed-off-by: Cao jin > --- >

[Qemu-devel] [Bug 1606899] [NEW] virtio-vga does not let guest poweroff properly

2016-07-27 Thread Frediano Ziglio
Public bug reported: I have a VM running rawhide (Fedora development) and I can't poweroff the machine when I enable virtio-vga. Reboot works correctly. Using QXL works also. The machine arrive to print the "Powering off" message (from Linux kernel) but then hangs. The command line is /usr/bin/q

[Qemu-devel] Fwd: Understanding Qemu Block

2016-07-27 Thread Gadre Nayan
Hi, I have recently started working on QEMU and it seems a daunting task to say the least, hence I wanted some head-start. I have browsed the source but I still need to bring closer some dots so I can start working on some experimental changes. I will have to ask further questions based on my new

[Qemu-devel] [PATCH v2] i2c: fix migration regression introduced by broadcast support

2016-07-27 Thread Igor Mammedov
QEMU fails migration with following error: qemu-system-x86_64: Missing section footer for i2c_bus qemu-system-x86_64: load of migration failed: Invalid argument when migrating from: qemu-system-x86_64-v2.6.0 -m 256M rhel72.img -M pc-i440fx-2.6 to qemu-system-x86_64-v2.7.0-rc0 -m 256M rhel72.i

Re: [Qemu-devel] [PATCH v2 1/1] block: improve error handling in raw_open

2016-07-27 Thread Halil Pasic
On 07/26/2016 07:47 PM, Max Reitz wrote: >> Frankly, I'm a bit uncomfortable with asking (do not want to be pushy), >> > but do you have an opinion on the 'error_report_err' issue (pointed >> > out in the cover letter part)? > You are using drive_add with QMP? As far as I know, one can only do so

Re: [Qemu-devel] From virtio_kick until VM-exit?

2016-07-27 Thread Stefan Hajnoczi
On Wed, Jul 27, 2016 at 10:51:41AM +0100, Stefan Hajnoczi wrote: > On Wed, Jul 27, 2016 at 10:19 AM, charls chap wrote: > > I am new with qemu, I am trying to understand the I/O path of a synchronous > > I/O. > > It turns out, that I've not a clear picture. Definitely for VM-exit and > > VM-entry

Re: [Qemu-devel] From virtio_kick until VM-exit?

2016-07-27 Thread Stefan Hajnoczi
On Wed, Jul 27, 2016 at 12:19:52PM +0300, charls chap wrote: > Hello All, > > I am new with qemu, I am trying to understand the I/O path of a synchronous > I/O. What exactly do you mean by "synchronous I/O"? Most modern devices have asynchronous interfaces (i.e. a ring or list of requests that c

  1   2   3   >