Re: [Qemu-devel] [PATCH v4 00/12] vfio on spapr-ppc64

2013-09-04 Thread Alexey Kardashevskiy
On 08/30/2013 08:15 PM, Alexey Kardashevskiy wrote: > Yet another try with VFIO on SPAPR (server PPC64). Alex (Williamson), could you please give it some review and comment/sob/rb/ab (whichever suits) this stuff? Since kernel headers update is on its way to upstream, we could try to include this

Re: [Qemu-devel] [PATCH v2] spapr-vscsi: Adding VSCSI capabilities

2013-09-04 Thread Alexey Kardashevskiy
On 09/02/2013 03:03 PM, Nikunj A. Dadhania wrote: > > This implements capabilities exchange between vscsi host and client. As > at the moment no capability is supported, put zero flags everywhere and > return. > > Signed-off-by: Nikunj A Dadhania Acked-by: Alexey Kardashevskiy > --- > hw/s

Re: [Qemu-devel] [PATCH] linux-headers: update to 3.11

2013-09-04 Thread Paolo Bonzini
Il 05/09/2013 05:16, Alexey Kardashevskiy ha scritto: >>> >> Sorry for my ignorance, but this is The Kernel, it is already there, >>> >> broken >>> >> or not, even if it is broken, qemu cannot stay isolated, no? >>> >> This is a mechanical change, no more. >> > >> > It's a matter of keeping thing

Re: [Qemu-devel] BUG: memory API related abort (bisected)

2013-09-04 Thread Paolo Bonzini
Il 05/09/2013 03:08, Luiz Capitulino ha scritto: > Reproducer: > > 1. Start QEMU with gdb support: > > $ qemu [...] -kernel [...] -s > > 2. Start gdb and install a breakpoint > > gdb /path/to/vmlinux > (gdb) target remote localhost:1234 > (gdb) b init_hw_perf_events > Remo

[Qemu-devel] [PATCH v6] powerpc: add PVR mask support

2013-09-04 Thread Alexey Kardashevskiy
IBM POWERPC processors encode PVR as a CPU family in higher 16 bits and a CPU version in lower 16 bits. Since there is no significant change in behavior between versions, there is no point to add every single CPU version in QEMU's CPU list. Also, new CPU versions of already supported CPU won't brea

Re: [Qemu-devel] [RFC v3 3/5] hw/arm/digic: add timer support

2013-09-04 Thread Antony Pavlov
On Wed, 4 Sep 2013 16:18:37 +1000 Peter Crosthwaite wrote: > On Wed, Sep 4, 2013 at 3:21 PM, Antony Pavlov wrote: > > Signed-off-by: Antony Pavlov > > --- > > hw/arm/digic.c | 25 ++ > > hw/timer/Makefile.objs | 1 + > > hw/timer/digic-timer.c | 122 > >

[Qemu-devel] [PATCH] spapr-rtas: reset top 4 bits in parameters address

2013-09-04 Thread Alexey Kardashevskiy
On the real hardware, RTAS is called in real mode and therefore ignores top 4 bits of the address passed in the call. This fixes QEMU to do the same thing. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr_rtas.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/sp

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-04 Thread Alexey Kardashevskiy
On 09/05/2013 02:30 PM, David Gibson wrote: > On Tue, Sep 03, 2013 at 05:31:42PM +1000, Alexey Kardashevskiy wrote: >> This allows guests to have a different timebase origin from the host. >> >> This is needed for migration, where a guest can migrate from one host >> to another and the two hosts mi

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-04 Thread David Gibson
On Tue, Sep 03, 2013 at 05:31:42PM +1000, Alexey Kardashevskiy wrote: > This allows guests to have a different timebase origin from the host. > > This is needed for migration, where a guest can migrate from one host > to another and the two hosts might have a different timebase origin. > However,

Re: [Qemu-devel] [PATCH] linux-headers: update to 3.11

2013-09-04 Thread Alexey Kardashevskiy
On 09/04/2013 01:35 AM, Paolo Bonzini wrote: > Il 03/09/2013 17:28, Alexey Kardashevskiy ha scritto: >> On 09/03/2013 08:42 PM, Jan Kiszka wrote: >>> On 2013-09-03 11:32, Alexey Kardashevskiy wrote: On 09/03/2013 07:29 PM, Peter Maydell wrote: > On 3 September 2013 09:27, Alexey Kardashevs

Re: [Qemu-devel] [PATCH 2/2] add some virtio-scsi trace events

2013-09-04 Thread Laszlo Ersek
On 09/04/13 16:21, Stefan Hajnoczi wrote: > On Thu, Aug 29, 2013 at 03:37:50PM +0200, Laszlo Ersek wrote: >> +static void dump_cmd_req(const VirtIOSCSIReq *req, uint32_t cdb_size) >> +{ >> +const VirtIOSCSICmdReq *cr; >> +char *cdb_hex; >> + >> +if (!trace_event_get_state(TRACE_VIRTIO_S

Re: [Qemu-devel] I/O performance degradation with Virtio-Blk-Data-Plane

2013-09-04 Thread Jonghwan Choi
Thanks for your reply. > > 1. The fio results so it's clear which cases performed worse and by how >much. > When I set vcpu = 8, read performance is decreased about 25%. In my test, when vcpu = 1, I got a best formance. > 2. The fio job files. > [testglobal] description=high_iops exec_prer

[Qemu-devel] BUG: memory API related abort (bisected)

2013-09-04 Thread Luiz Capitulino
Reproducer: 1. Start QEMU with gdb support: $ qemu [...] -kernel [...] -s 2. Start gdb and install a breakpoint gdb /path/to/vmlinux (gdb) target remote localhost:1234 (gdb) b init_hw_perf_events Remote communication error. Target disconnected.: Connection reset by peer.

Re: [Qemu-devel] [PATCH] tci: Add implementation of rotl_i64, rotr_i64

2013-09-04 Thread Richard Henderson
On 09/04/2013 01:49 PM, Stefan Weil wrote: > It is used by qemu-ppc64 when running Debian's busybox-static. > > Signed-off-by: Stefan Weil > --- > > This patch is also useful for QEMU 1.6. Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [RFC PATCH] Convert ram_list to RCU DQ V4

2013-09-04 Thread Paolo Bonzini
Il 04/09/2013 22:48, Mike Day ha scritto: > > On Wed, Sep 4, 2013 at 3:58 PM, Paolo Bonzini > wrote: >> >> > @@ -1323,23 +1325,21 @@ static RAMBlock > *qemu_get_ram_block(ram_addr_t addr) >> > { >> > RAMBlock *block; >> > >> > -/* The list is protected by the

Re: [Qemu-devel] When does live migration give up?

2013-09-04 Thread Alex Bligh
Paolo, > > Do you mean something like this? > > destination > socket() > bind() to { sin_port = 0, sin_addr.s_addr = INADDR_ANY } > listen() > getsockname() > send address to source > accept() > start QEMU with file descriptor returned by accept > > source

[Qemu-devel] [PATCH 00/16] Streamlining endian handling in TCG

2013-09-04 Thread Richard Henderson
This patch set is far from complete, and is more of an RFC, but it contains at least one example of each of the 4-5 steps in the conversion. Step 1 is the most complete, as it's largely a search-and-replace step on the tcg backends. The enumeration values of TCGMemOp match the current integer val

Re: [Qemu-devel] [PATCH] tci: Add implementation of rotl_i64, rotr_i64

2013-09-04 Thread Stefan Weil
Am 04.09.2013 22:49, schrieb Stefan Weil: > It is used by qemu-ppc64 when running Debian's busybox-static. > > Signed-off-by: Stefan Weil > --- > > This patch is also useful for QEMU 1.6. ... so I should have added qemu-stable. Done now. > > tcg/tci/tcg-target.c |1 - > tci.c

[Qemu-devel] [PATCH] tci: Add implementation of rotl_i64, rotr_i64

2013-09-04 Thread Stefan Weil
It is used by qemu-ppc64 when running Debian's busybox-static. Signed-off-by: Stefan Weil --- This patch is also useful for QEMU 1.6. tcg/tci/tcg-target.c |1 - tci.c| 10 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tcg/tci/tcg-target.c b/tcg

[Qemu-devel] [PATCH 08/16] tcg-hppa: Use TCGMemOp within qemu_ldst routines

2013-09-04 Thread Richard Henderson
Untested. Signed-off-by: Richard Henderson --- tcg/hppa/tcg-target.c | 110 -- 1 file changed, 53 insertions(+), 57 deletions(-) diff --git a/tcg/hppa/tcg-target.c b/tcg/hppa/tcg-target.c index 236b39c..b13c2d8 100644 --- a/tcg/hppa/tcg-target.c +

[Qemu-devel] [PATCH 09/16] tcg-mips: Use TCGMemOp within qemu_ldst routines

2013-09-04 Thread Richard Henderson
Untested. Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c | 116 ++ 1 file changed, 52 insertions(+), 64 deletions(-) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c index 5f0a65b..3ef5487 100644 --- a/tcg/mips/tcg-target.c +

Re: [Qemu-devel] [RFC PATCH] Convert ram_list to RCU DQ V4

2013-09-04 Thread Mike Day
On Wed, Sep 4, 2013 at 3:58 PM, Paolo Bonzini wrote: > > > @@ -1323,23 +1325,21 @@ static RAMBlock *qemu_get_ram_block(ram_addr_t addr) > > { > > RAMBlock *block; > > > > -/* The list is protected by the iothread lock here. */ > > +/* This assumes the iothread lock is taken here too

[Qemu-devel] [PATCH 03/16] tcg-aarch64: Use TCGMemOp within qemu_ldst routines

2013-09-04 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c | 126 +++ 1 file changed, 62 insertions(+), 64 deletions(-) diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c index 651327e..608b735 100644 --- a/tcg/aarch64/tcg-target.c +++

[Qemu-devel] [PATCH 04/16] tcg-arm: Use TCGMemOp within qemu_ldst routines

2013-09-04 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.c | 125 +-- 1 file changed, 61 insertions(+), 64 deletions(-) diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c index ca8b293..9625154 100644 --- a/tcg/arm/tcg-target.c +++ b/tcg/arm/t

Re: [Qemu-devel] [RFC PATCH] spapr: add initial ibm, client-architecture-support rtas call support

2013-09-04 Thread Anthony Liguori
On Wed, Sep 4, 2013 at 8:37 AM, Alexander Graf wrote: > >> >>> So IMHO this whole thing should be orthogonal to -cpu. >> >> Well, since we cannot change CPU class on the fly, yes, it should be a >> "compatibility" flags/properties/methods/whatever of the default CPU for >> the specific family. > >

[Qemu-devel] [PATCH 02/16] tcg-i386: Use TCGMemOp within qemu_ldst routines

2013-09-04 Thread Richard Henderson
Step one in the transition, with constants passed down from tcg_out_op. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 123 -- 1 file changed, 59 insertions(+), 64 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target

[Qemu-devel] [PATCH 12/16] exec: Add both big- and little-endian memory helpers

2013-09-04 Thread Richard Henderson
Step three in the transition: helpers not tied to the target "default" endianness. To be used when the guest uses a memory operation with non-default endianness. Signed-off-by: Richard Henderson --- include/exec/softmmu_template.h | 286 +++- tcg/tcg.h

[Qemu-devel] [PATCH 05/16] tcg-s390: Use TCGMemOp within qemu_ldst routines

2013-09-04 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/s390/tcg-target.c | 107 ++ 1 file changed, 46 insertions(+), 61 deletions(-) diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c index 1b44aee..e640f86 100644 --- a/tcg/s390/tcg-target.c +++ b/tcg/s3

[Qemu-devel] [PATCH 16/16] target-ppc: Convert to new ldst opcodes

2013-09-04 Thread Richard Henderson
This lets us change "le_mode" to "end_mode" and fold away nearly all of the tests for the current cpu endianness, and removing all of the explicitly generated bswap opcodes. Cc: qemu-...@nongnu.org Signed-off-by: Richard Henderson --- target-ppc/translate.c | 147 +---

[Qemu-devel] [PATCH 14/16] tcg-i386: Remove "cb" output restriction from qemu_st8 for i386

2013-09-04 Thread Richard Henderson
Once we form a combined qemu_st_i32 opcode, we won't be able to have separate constraints based on size. This one is fairly easy to work around, since eax is available as a scratch register. When storing variable data, this tends to merely exchange one mov for another. E.g. -: mov%esi,%ecx

[Qemu-devel] [PATCH 15/16] tcg-i386: Support new ldst opcodes

2013-09-04 Thread Richard Henderson
No support for helpers with non-default endianness yet, but good enough to test the opcodes. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 139 ++ tcg/i386/tcg-target.h | 2 +- 2 files changed, 51 insertions(+), 90 deletions(-) di

[Qemu-devel] [PATCH 06/16] tcg-ppc: Use TCGMemOp within qemu_ldst routines

2013-09-04 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c | 93 1 file changed, 43 insertions(+), 50 deletions(-) diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c index 82cedce..2fa99b8 100644 --- a/tcg/ppc/tcg-target.c +++ b/tcg/ppc/t

[Qemu-devel] [PATCH 13/16] tcg-i386: Tidy softmmu routines

2013-09-04 Thread Richard Henderson
Pass two TCGReg to tcg_out_tlb_load, rather than idx+args. Move ldst_optimization routines just below tcg_out_tlb_load to avoid the need for forward declarations. Use TCGReg enum in preference to int where apprpriate. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 509 +++

[Qemu-devel] [PATCH 10/16] tcg-sparc: Use TCGMemOp within qemu_ldst routines

2013-09-04 Thread Richard Henderson
Untested. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c | 116 +++-- 1 file changed, 65 insertions(+), 51 deletions(-) diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c index 9574954..747510a 100644 --- a/tcg/sparc/tcg-target.

[Qemu-devel] [PATCH 11/16] tcg: Add qemu_ld_st_i32/64

2013-09-04 Thread Richard Henderson
Step two in the transition, adding the new ldst opcodes. Keep the old opcodes around until all backends support the new opcodes. Signed-off-by: Richard Henderson --- tcg/README | 43 - tcg/aarch64/tcg-target.h | 2 + tcg/arm/tcg-target.h | 2 + tcg/hppa/tcg-target

[Qemu-devel] [PATCH 01/16] tcg: Add TCGMemOp

2013-09-04 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg.h | 59 +-- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index 53c4b33..91dcd92 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -197,6 +197,60 @@ typedef enum TCG

[Qemu-devel] [PATCH 07/16] tcg-ppc64: Use TCGMemOp within qemu_ldst routines

2013-09-04 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 82 +++--- 1 file changed, 44 insertions(+), 38 deletions(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 73b7034..7da6a2f 100644 --- a/tcg/ppc64/tcg-target.c +++ b/tcg

Re: [Qemu-devel] [RFC PATCH] Convert ram_list to RCU DQ V4

2013-09-04 Thread Paolo Bonzini
Il 04/09/2013 21:41, Mike Day ha scritto: > * now passes virt-test -t qemu > * uses call_rcu instead of call_rcu1 > * completely removed the ram_list mutex and its locking functions > * cleaned up some comments > > Changes from V3: > > * added rcu reclaim function to free ram blocks > * reduced t

[Qemu-devel] [RFC PATCH] Convert ram_list to RCU DQ V4

2013-09-04 Thread Mike Day
* now passes virt-test -t qemu * uses call_rcu instead of call_rcu1 * completely removed the ram_list mutex and its locking functions * cleaned up some comments Changes from V3: * added rcu reclaim function to free ram blocks * reduced the number of comments * made rcu locking policy consistent f

Re: [Qemu-devel] When does live migration give up?

2013-09-04 Thread Alex Bligh
--On 4 September 2013 19:05:50 +0100 Alex Bligh wrote: We appear to be getting something other than 'ms' returned through the monitoring system. Unhelpfully what that is is not logged. By which I mean 'we seem to be getting "status: failed" on the send side' -- Alex Bligh

Re: [Qemu-devel] When does live migration give up?

2013-09-04 Thread Paolo Bonzini
Il 04/09/2013 20:05, Alex Bligh ha scritto: > Paolo, > > --On 4 September 2013 19:07:53 +0200 Paolo Bonzini > wrote: > >> Il 04/09/2013 17:24, Alex Bligh ha scritto: >>> We have seen a situation when migrating about 50 VMs at once where some >>> of them fail. I think this is because they are dir

Re: [Qemu-devel] [PATCH v2 01/10] prep: kill get_system_io() usage

2013-09-04 Thread Hervé Poussineau
Paolo Bonzini a écrit : Il 04/09/2013 00:29, Hervé Poussineau ha scritto: While ISA address space in prep machine is currently the one returned by get_system_io(), this depends of the implementation of i82378/raven devices, and this may not be the case forever. Use the right ISA address space w

[Qemu-devel] [PATCH v5 11/21] block: introduce bdrv_get_block_status API

2013-09-04 Thread Paolo Bonzini
For now, bdrv_get_block_status is just another name for bdrv_is_allocated. The next patches will add more flags. This also touches all block drivers with a mostly mechanical rename. The sole exception is cow; because it calls cow_co_is_allocated from the read code, we keep that function and make

[Qemu-devel] [PATCH v5 08/21] block: expect errors from bdrv_co_is_allocated

2013-09-04 Thread Paolo Bonzini
Some bdrv_is_allocated callers do not expect errors, but the fallback in qcow2.c might make other callers trip on assertion failures or infinite loops. Fix the callers to always look for errors. Cc: qemu-sta...@nongnu.org Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block.c

[Qemu-devel] [PATCH v5 09/21] qemu-img: always probe the input image for allocated sectors

2013-09-04 Thread Paolo Bonzini
qemu-img convert can assume "that sectors which are unallocated in the input image are present in both the output's and input's base images". However it is only doing this if the output image returns true for bdrv_has_zero_init(). Testing bdrv_has_zero_init() does not make much sense if the outpu

[Qemu-devel] [PATCH v5 06/21] block: do not use ->total_sectors in bdrv_co_is_allocated

2013-09-04 Thread Paolo Bonzini
This is more robust when the device has removable media. Signed-off-by: Paolo Bonzini --- block.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 0e95b47..410d5dd 100644 --- a/block.c +++ b/block.c @@ -3045,9 +3045,15 @@ static int coroutine_fn

[Qemu-devel] [PATCH v5 10/21] block: make bdrv_has_zero_init return false for copy-on-write-images

2013-09-04 Thread Paolo Bonzini
This helps implementing is_allocated on top of get_block_status. Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block.c| 5 + qemu-img.c | 9 + 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/block.c b/block.c index a3f7577..e18ff71 100644 --- a/block.c

[Qemu-devel] [PATCH v5 12/21] block: define get_block_status return value

2013-09-04 Thread Paolo Bonzini
Define the return value of get_block_status. Bits 0, 1, 2 and 9-62 are valid; bit 63 (the sign bit) is reserved for errors. Bits 3-8 are left for future extensions. The return code is compatible with the old is_allocated API: if a driver only returns 0 or 1 (aka BDRV_BLOCK_DATA) like is_allocate

[Qemu-devel] [PATCH v5 07/21] block: remove bdrv_is_allocated_above/bdrv_co_is_allocated_above distinction

2013-09-04 Thread Paolo Bonzini
Now that bdrv_is_allocated detects coroutine context, the two can use the same code. Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block.c | 46 -- block/commit.c| 6 +++--- block/mirror.c| 4 ++-- block/stre

[Qemu-devel] [PATCH v5 18/21] raw-posix: return get_block_status data and flags

2013-09-04 Thread Paolo Bonzini
Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/raw-posix.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index dbc65b0..d011cfd 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -1089,7 +1089,7

[Qemu-devel] [PATCH v5 04/21] block: keep bs->total_sectors up to date even for growable block devices

2013-09-04 Thread Paolo Bonzini
If a BlockDriverState is growable, after every write we need to check if bs->total_sectors might have changed. With this change, bdrv_getlength does not need anymore a system call. Signed-off-by: Paolo Bonzini --- block.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/b

[Qemu-devel] [PATCH v5 20/21] block: add default get_block_status implementation for protocols

2013-09-04 Thread Paolo Bonzini
Protocols return raw data, so you can assume the offsets to pass through unchanged. Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 6df387c..18cdfe6 100644 --- a/block.c +++ b/block

[Qemu-devel] [PATCH v5 02/21] cow: make writes go at a less indecent speed

2013-09-04 Thread Paolo Bonzini
Only sync once per write, rather than once per sector. Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/cow.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/block/cow.c b/block/cow.c index fa3d41f..9ae2d6a 100644 --- a/block/cow.c +++ b/bl

Re: [Qemu-devel] Block Filters

2013-09-04 Thread Benoît Canet
> Propagate operations like snapshot down the tree. block.c is designed > for bs->file/bs->backing_hd kind of BlockDrivers, perhaps it needs to > become a bit more generic to support other types of BlockDrivers > properly. Shouldn't bs->backing_hd become bs->children[0] and bs->file stay the same

Re: [Qemu-devel] When does live migration give up?

2013-09-04 Thread Alex Bligh
Paolo, --On 4 September 2013 19:07:53 +0200 Paolo Bonzini wrote: Il 04/09/2013 17:24, Alex Bligh ha scritto: We have seen a situation when migrating about 50 VMs at once where some of them fail. I think this is because they are dirtying pages faster than they can be transmitted. No, migra

[Qemu-devel] [PATCH v5 01/21] cow: make reads go at a decent speed

2013-09-04 Thread Paolo Bonzini
Do not do two reads for each sector; load each sector of the bitmap and use bitmap operations to process it. Writes are still dog slow! Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/cow.c | 54 -- 1 file changed, 32 insertion

[Qemu-devel] [PATCH v5 03/21] cow: do not call bdrv_co_is_allocated

2013-09-04 Thread Paolo Bonzini
As we change bdrv_is_allocated to gather more information from bs and bs->file, it will become a bit slower. It is still appropriate for online jobs, but not for reads/writes. Call the internal function instead. Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/cow.c | 2 +- 1 fi

[Qemu-devel] [PATCH v5 05/21] block: make bdrv_co_is_allocated static

2013-09-04 Thread Paolo Bonzini
bdrv_is_allocated can detect coroutine context and go through a fast path, similar to other block layer functions. Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block.c | 24 +++- block/backup.c| 4 ++-- block/raw_bsd.c | 2 +- block/

[Qemu-devel] [PATCH v2 1/5] util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR

2013-09-04 Thread Sebastian Ottlik
If a socket is closed it remains in TIME_WAIT state for some time. On operating systems using BSD sockets the endpoint of the socket may not be reused while in this state unless SO_REUSEADDR was set on the socket. On windows on the other hand the default behaviour is to allow reuse (i.e. identical

[Qemu-devel] [PATCH v2 0/5] Do not set SO_REUSEADDR on Windows

2013-09-04 Thread Sebastian Ottlik
This patchset disabels all use of SO_REUSEADDR on Windows. On Windows systems the default behaviour is equivalent to SO_REUSEADDR on other operating systems. SO_REUSEADDR can still be set but results in undesired behaviour instead. It may even lead to situations were system behaviour is unspecified

[Qemu-devel] [PATCH v2 3/5] net: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-04 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik diff --git a/net/socket.c b/net/socket.c index e6130

[Qemu-devel] [PATCH v5 13/21] block: return get_block_status data and flags for formats

2013-09-04 Thread Paolo Bonzini
Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/cow.c | 8 +++- block/qcow.c | 9 - block/qcow2.c| 16 ++-- block/qed.c | 35 --- block/sheepdog.c | 2 +- block/vdi.c | 13 - block/vmdk.c

[Qemu-devel] [PATCH v5 15/21] block: return BDRV_BLOCK_ZERO past end of backing file

2013-09-04 Thread Paolo Bonzini
If the sectors are unallocated and we are past the end of the backing file, they will read as zero. Signed-off-by: Paolo Bonzini --- block.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index b6d380f..6df387c 100644 --- a/block.c +++ b/block

[Qemu-devel] [PATCH v5 14/21] block: use bdrv_has_zero_init to return BDRV_BLOCK_ZERO

2013-09-04 Thread Paolo Bonzini
Alternatively, this could use a "discard zeroes data" flag returned by bdrv_get_info. Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 0eb5e43..b6d380f 100644 --- a/block.c ++

[Qemu-devel] [PATCH v5 00/21] Add qemu-img subcommand to dump file metadata

2013-09-04 Thread Paolo Bonzini
v4->v5: no change except for context and correcting the "Since: 1.6" in qapi-schema.json Paolo Bonzini (21): cow: make reads go at a decent speed cow: make writes go at a less indecent speed cow: do not call bdrv_co_is_allocated block: keep bs->total_sectors up to date even for gro

[Qemu-devel] [PATCH v5 17/21] docs, qapi: document qemu-img map

2013-09-04 Thread Paolo Bonzini
Eric Blake also requested including the output in qapi-schema.json, so that it is published through the introspection mechanism. Signed-off-by: Paolo Bonzini --- qapi-schema.json | 29 + qemu-img.texi| 55 +++ 2

[Qemu-devel] [PATCH v5 16/21] qemu-img: add a "map" subcommand

2013-09-04 Thread Paolo Bonzini
This command dumps the metadata of an entire chain, in either tabular or JSON format. Signed-off-by: Paolo Bonzini --- qemu-img-cmds.hx | 6 ++ qemu-img.c | 192 +++ 2 files changed, 198 insertions(+) diff --git a/qemu-img-cmds.hx b/qe

Re: [Qemu-devel] [PATCH RFC] Do not set SO_REUSEADDR on Windows

2013-09-04 Thread Paolo Bonzini
Il 04/09/2013 19:31, Stefan Weil ha scritto: > May I suggest a slightly different approach? Instead of a new function > qemu_set_reuseaddr I'd prefer extending the existing qemu_setsockopt. > These steps / patches are required: > > 1. Move *sock* lines from include/qemu-common.h to include/qemu/so

Re: [Qemu-devel] [PATCH V3] target-i386: forward CPUID cache leaves when -cpu host is used

2013-09-04 Thread Eduardo Habkost
On Mon, Sep 02, 2013 at 07:09:47PM +0200, Benoît Canet wrote: > > > > > > Signed-off-by: Benoit Canet > > > > Reviewed-by: Eduardo Habkost > > Thanks. > > Do you have an idea on how QEMU could reflect the real host clock frequency > to the guest when the host cpu scaling governor kicks in ? >

Re: [Qemu-devel] [PATCH RFC] Do not set SO_REUSEADDR on Windows

2013-09-04 Thread Stefan Weil
Am 04.09.2013 16:41, schrieb Peter Maydell: > On 4 September 2013 15:27, Paolo Bonzini wrote: >> Il 04/09/2013 16:22, Sebastian Ottlik ha scritto: >>> This patchset disabels all use of SO_REUSEADDR on Windows. On >>> Windows systems the default behavior is equivalent to SO_REUSEADDR >>> on other o

[Qemu-devel] [PATCH v2 4/5] slirp: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-04 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik diff --git a/slirp/misc.c b/slirp/misc.c index c0d48

[Qemu-devel] [PATCH v2 2/5] gdbstub: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-04 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik diff --git a/gdbstub.c b/gdbstub.c index 2b7f22b..0e

Re: [Qemu-devel] When does live migration give up?

2013-09-04 Thread Paolo Bonzini
Il 04/09/2013 17:24, Alex Bligh ha scritto: > We have seen a situation when migrating about 50 VMs at once where some > of them fail. I think this is because they are dirtying pages faster than > they can be transmitted. No, migration never "gives up". It may never converge, but it keeps trying u

[Qemu-devel] [PATCH v2 5/5] util: call socket_set_fast_reuse instead of setting SO_REUSEADDR

2013-09-04 Thread Sebastian Ottlik
SO_REUSEADDR should be avoided on Windows but is desired on other operating systems. So instead of setting it we call socket_set_fast_reuse that will result in the appropriate behaviour on all operating systems. Signed-off-by: Sebastian Ottlik diff --git a/util/qemu-sockets.c b/util/qemu-sockets

[Qemu-devel] [PATCH v5 19/21] raw-posix: report unwritten extents as zero

2013-09-04 Thread Paolo Bonzini
These are created for example with XFS_IOC_ZERO_RANGE. Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block/raw-posix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/raw-posix.c b/block/raw-posix.c index d011cfd..1b41ea3 100644 --- a/block/raw-posix.c +++ b/block/raw-po

[Qemu-devel] [PATCH v5 21/21] block: look for zero blocks in bs->file

2013-09-04 Thread Paolo Bonzini
Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- block.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 18cdfe6..6e6f974 100644 --- a/block.c +++ b/block.c @@ -3055,7 +3055,7 @@ static int64_t coroutine_fn bdrv_co_get_block_s

[Qemu-devel] [PATCH RFC 4/4] util: do not set SO_REUSEADDR on Windows

2013-09-04 Thread Sebastian Ottlik
If a socket is closed it may remain in TIME_WAIT state for some time. On most operating systems the local port of the connection or socket may not be reeused while in this state unless SO_REUSEADDR was set on the socket. On windows on the other hand the default behaviour is to allow reuse (i.e. ide

[Qemu-devel] [PATCH RFC 3/4] slirp: do not set SO_REUSEADDR on Windows

2013-09-04 Thread Sebastian Ottlik
If a socket is closed it may remain in TIME_WAIT state for some time. On most operating systems the local port of the connection or socket may not be reeused while in this state unless SO_REUSEADDR was set on the socket. On windows on the other hand the default behaviour is to allow reuse (i.e. ide

Re: [Qemu-devel] Questions about hvm domU default devices with upstream qemu

2013-09-04 Thread Stefano Stabellini
On Wed, 4 Sep 2013, Fabio Fantoni wrote: > Il 04/07/2013 15:51, Fabio Fantoni ha scritto: > > Last year I posted a question about default devices of upstream qemu that > > differ from qemu traditional, like empty floppy and cdrom in particular. > > About empty floppy now is disabled as workaround.

Re: [Qemu-devel] [PATCH v4 00/21] Add qemu-img subcommand to dump file metadata

2013-09-04 Thread Stefan Hajnoczi
On Thu, Aug 29, 2013 at 04:00:00PM +0200, Paolo Bonzini wrote: > This series adds a subcommand to "qemu-img" that can dump file metadata. > Metadata that is dumped includes: > > - whether blocks are allocated in bs->file and, if so, where > > - whether blocks are zero > > - whether data is read

Re: [Qemu-devel] [PATCH v6 0/8] Implement reference count for BlockDriverState

2013-09-04 Thread Stefan Hajnoczi
On Fri, Aug 23, 2013 at 09:14:43AM +0800, Fam Zheng wrote: > BlockDriverState lifecycle management is needed by future features such as > image fleecing and blockdev-add. This series adds reference count to > BlockDriverState. > > The first two patches clean up two odd BlockDriverState use cases,

Re: [Qemu-devel] [RFC PATCH] spapr: add initial ibm, client-architecture-support rtas call support

2013-09-04 Thread Alexey Kardashevskiy
On 09/04/2013 10:13 PM, Alexander Graf wrote: > > On 04.09.2013, at 13:40, Alexey Kardashevskiy wrote: > >> On 09/04/2013 08:42 PM, Alexander Graf wrote: >>> >>> On 04.09.2013, at 12:19, Alexey Kardashevskiy wrote: >>> This is an RFC patch. The modern Linux kernel supports every k

Re: [Qemu-devel] [PATCH] seccomp: adding times() to the whitelist

2013-09-04 Thread Paul Moore
On Wednesday, September 04, 2013 09:25:08 AM Eduardo Otubo wrote: > This was causing Qemu process to hang when using -sandbox on. > > Related RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1004175 > > Signed-off-by: Eduardo Otubo Works for me. Tested-by: Paul Moore > --- > qemu-seccomp.c

[Qemu-devel] [PATCH RFC 1/4] gdbstub: do not set SO_REUSEADDR on Windows

2013-09-04 Thread Sebastian Ottlik
If a socket is closed it may remain in TIME_WAIT state for some time. On most operating systems the local port of the connection or socket may not be reeused while in this state unless SO_REUSEADDR was set on the socket. On windows on the other hand the default behaviour is to allow reuse (i.e. ide

[Qemu-devel] [PATCH RFC 2/4] net: do not set SO_REUSEADDR on Windows

2013-09-04 Thread Sebastian Ottlik
If a socket is closed it may remain in TIME_WAIT state for some time. On most operating systems the local port of the connection or socket may not be reeused while in this state unless SO_REUSEADDR was set on the socket. On windows on the other hand the default behaviour is to allow reuse (i.e. ide

Re: [Qemu-devel] [PATCH RFC] Do not set SO_REUSEADDR on Windows

2013-09-04 Thread Peter Maydell
On 4 September 2013 15:27, Paolo Bonzini wrote: > Il 04/09/2013 16:22, Sebastian Ottlik ha scritto: >> This patchset disabels all use of SO_REUSEADDR on Windows. On Windows systems >> the default behavior is equivalent to SO_REUSEADDR on other operating >> systems. SO_REUSEADDR can still be set bu

Re: [Qemu-devel] public key not found?

2013-09-04 Thread Eric Blake
On 09/04/2013 10:08 AM, Andreas Färber wrote: > Am 04.09.2013 15:11, schrieb Anthony Liguori: >> On Wed, Sep 4, 2013 at 6:47 AM, Michael S. Tsirkin wrote: >>> I noticed recent merges of the pci tree have this text: >>> >>> # gpg: Signature made Sun 01 Sep 2013 03:15:36 AM CDT using RSA key >>>

Re: [Qemu-devel] public key not found?

2013-09-04 Thread Anthony Liguori
On Wed, Sep 4, 2013 at 11:08 AM, Andreas Färber wrote: > Am 04.09.2013 15:11, schrieb Anthony Liguori: >> On Wed, Sep 4, 2013 at 6:47 AM, Michael S. Tsirkin wrote: >>> I noticed recent merges of the pci tree have this text: >>> >>> # gpg: Signature made Sun 01 Sep 2013 03:15:36 AM CDT using R

Re: [Qemu-devel] qemu-user + networking issues / segfaults

2013-09-04 Thread Richard Henderson
On 08/29/2013 02:27 PM, Christof Schulze wrote: > #5 0x6012a100 in tb_gen_code (env=0x612def20, pc=18446744073699066880, > cs_base=0, flags=4243635, cflags=0) > at /mnt/data/build/qemu-1.6.0-ministatic/translate-all.c:964 In know exactly what this is -- the fallback vsyscall page. I've had

Re: [Qemu-devel] public key not found?

2013-09-04 Thread Andreas Färber
Am 04.09.2013 15:11, schrieb Anthony Liguori: > On Wed, Sep 4, 2013 at 6:47 AM, Michael S. Tsirkin wrote: >> I noticed recent merges of the pci tree have this text: >> >> # gpg: Signature made Sun 01 Sep 2013 03:15:36 AM CDT using RSA key >> # ID D28D5469 >> # gpg: Can't check signatur

Re: [Qemu-devel] [PATCH v2] qmp: Documentation for BLOCK_IMAGE_CORRUPTED

2013-09-04 Thread Stefan Hajnoczi
On Tue, Sep 03, 2013 at 03:49:39PM +0200, Max Reitz wrote: > Add an appropriate entry describing this event and its parameters into > qmp-events.txt. > > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > --- > v2: > - moved section to keep qmp-events.txt sorted > --- > QMP/qmp-events.txt |

[Qemu-devel] When does live migration give up?

2013-09-04 Thread Alex Bligh
We have seen a situation when migrating about 50 VMs at once where some of them fail. I think this is because they are dirtying pages faster than they can be transmitted. What algorithm controls when migration fails in this way, and is it tunable? I am fully aware one answer to this question is

[Qemu-devel] [PATCH RFC] Do not set SO_REUSEADDR on Windows

2013-09-04 Thread Sebastian Ottlik
This patchset disabels all use of SO_REUSEADDR on Windows. On Windows systems the default behavior is equivalent to SO_REUSEADDR on other operating systems. SO_REUSEADDR can still be set but results in undesired bahvior instead. It may even lead to situations were system behavior is unspecified. Mo

Re: [Qemu-devel] [RFC PATCH] spapr: add initial ibm, client-architecture-support rtas call support

2013-09-04 Thread Alexander Graf
On 04.09.2013, at 15:08, Alexey Kardashevskiy wrote: > On 09/04/2013 10:13 PM, Alexander Graf wrote: >> >> On 04.09.2013, at 13:40, Alexey Kardashevskiy wrote: >> >>> On 09/04/2013 08:42 PM, Alexander Graf wrote: On 04.09.2013, at 12:19, Alexey Kardashevskiy wrote: > This i

Re: [Qemu-devel] public key not found?

2013-09-04 Thread Paolo Bonzini
Il 04/09/2013 15:11, Anthony Liguori ha scritto: > On Wed, Sep 4, 2013 at 6:47 AM, Michael S. Tsirkin wrote: >> I noticed recent merges of the pci tree have this text: >> >> # gpg: Signature made Sun 01 Sep 2013 03:15:36 AM CDT using RSA key >> # ID D28D5469 >> # gpg: Can't check signa

Re: [Qemu-devel] [PATCH] seccomp: adding times() to the whitelist

2013-09-04 Thread Corey Bryant
On 09/04/2013 08:25 AM, Eduardo Otubo wrote: This was causing Qemu process to hang when using -sandbox on. Related RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1004175 Signed-off-by: Eduardo Otubo --- qemu-seccomp.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --g

Re: [Qemu-devel] [PATCH 2/2] add some virtio-scsi trace events

2013-09-04 Thread Stefan Hajnoczi
On Thu, Aug 29, 2013 at 03:37:50PM +0200, Laszlo Ersek wrote: > +static void dump_cmd_req(const VirtIOSCSIReq *req, uint32_t cdb_size) > +{ > +const VirtIOSCSICmdReq *cr; > +char *cdb_hex; > + > +if (!trace_event_get_state(TRACE_VIRTIO_SCSI_DUMP_CMD_REQ)) { > +return; > +} >

Re: [Qemu-devel] [PATCH RFC] Do not set SO_REUSEADDR on Windows

2013-09-04 Thread Paolo Bonzini
Il 04/09/2013 16:22, Sebastian Ottlik ha scritto: > This patchset disabels all use of SO_REUSEADDR on Windows. On Windows systems > the default behavior is equivalent to SO_REUSEADDR on other operating > systems. SO_REUSEADDR can still be set but results in undesired bahvior > instead. It may even

Re: [Qemu-devel] [PATCH 0/8] [PATCH RFC v3] s390 cpu hotplug

2013-09-04 Thread Luiz Capitulino
On Wed, 04 Sep 2013 15:04:17 +0200 Andreas Färber wrote: > Am 04.09.2013 14:56, schrieb Luiz Capitulino: > > On Wed, 04 Sep 2013 14:45:44 +0200 > > Andreas Färber wrote: > > > >> For the HMP patch I am waiting on feedback from Igor once he returns > >> from his vacation and, if there are no obj

[Qemu-devel] [PATCH] target-arm: Implement qmp query-cpu-definitions

2013-09-04 Thread Cole Robinson
Libvirt uses this to introspect available CPU models. Signed-off-by: Cole Robinson --- Maybe this will be centrally handled after the QOM CPU work is done? target-arm/helper.c | 32 1 file changed, 32 insertions(+) diff --git a/target-arm/helper.c b/target-arm/

  1   2   3   >