Re: [Qemu-devel] [PATCH v2 0/5] Convert remaining legacy chardevs to QAPI

2014-09-08 Thread Paolo Bonzini
Il 02/09/2014 12:24, Peter Maydell ha scritto: > This patchset converts the two remaining legacy chardevs > ('socket' and 'udp') to use the new-style parse/kind > mechanisms, and removes all the no-longer-required > legacy machinery. > > Patch 1 was posted to the list back in June > (https://patch

[Qemu-devel] [PATCH v2 6/9] virtio-serial: fix virtio-serial child refcount in transports

2014-09-08 Thread arei.gonglei
From: Gonglei object_initialize() leaves the object with a refcount of 1. object_property_add_child() adds its own reference which is dropped again when the property is deleted. The upshot of this is that we always have a refcount >= 1. Upon hot unplug the virtio-serial child is not finalized!

[Qemu-devel] [PATCH v2 0/9] virtio: fix virtio child recount in transports

2014-09-08 Thread arei.gonglei
From: Gonglei virtio-$device-{pci, s390, ccw} all duplicate the qdev properties of their virtio child. This approach does not work well with string or pointer properties since we must be careful about leaking or double-freeing them. Use the QOM alias property to forward property accesses to the

[Qemu-devel] [PATCH v2 5/9] virtio-serial: use aliases instead of duplicate qdev properties

2014-09-08 Thread arei.gonglei
From: Gonglei virtio-serial-{pci, s390, ccw} all duplicate the qdev properties of their VirtIOSerial child. This approach does not work well with string or pointer properties since we must be careful about leaking or double-freeing them. Use the QOM alias property to forward property accesses to

[Qemu-devel] [PATCH v2 1/9] virtio-net: use aliases instead of duplicate qdev properties

2014-09-08 Thread arei.gonglei
From: Gonglei virtio-net-pci, virtio-net-s390, and virtio-net-ccw all duplicate the qdev properties of their VirtIONet child. This approach does not work well with string or pointer properties since we must be careful about leaking or double-freeing them. Use the QOM alias property to forward pr

[Qemu-devel] [PATCH v2 3/9] virtio/vhost scsi: use aliases instead of duplicate qdev properties

2014-09-08 Thread arei.gonglei
From: Gonglei {virtio, vhost}-scsi-{pci, s390, ccw} all duplicate the qdev properties of their VirtIOSCSI/VHostSCSI child. This approach does not work well with string or pointer properties since we must be careful about leaking or double-freeing them. Use the QOM alias property to forward prope

[Qemu-devel] [PATCH v2 8/9] virtio-rng: fix virtio-rng child refcount in transports

2014-09-08 Thread arei.gonglei
From: Gonglei object_initialize() leaves the object with a refcount of 1. object_property_add_child() adds its own reference which is dropped again when the property is deleted. The upshot of this is that we always have a refcount >= 1. Upon hot unplug the virtio-rng child is not finalized! Dr

[Qemu-devel] [PATCH v2 9/9] virtio-balloon: fix virtio-balloon child refcount in transports

2014-09-08 Thread arei.gonglei
From: Gonglei object_initialize() leaves the object with a refcount of 1. object_property_add_child() adds its own reference which is dropped again when the property is deleted. The upshot of this is that we always have a refcount >= 1. Upon hot unplug the virtio-balloon child is not finalized!

[Qemu-devel] [PATCH v2 2/9] virtio: fix virtio-net child refcount in transports

2014-09-08 Thread arei.gonglei
From: Gonglei object_initialize() leaves the object with a refcount of 1. object_property_add_child() adds its own reference which is dropped again when the property is deleted. The upshot of this is that we always have a refcount >= 1. Upon hot unplug the virtio-net child is not finalized! Dr

[Qemu-devel] [PATCH v2 4/9] virtio/vhost-scsi: fix virtio-scsi/vhost-scsi child refcount in transports

2014-09-08 Thread arei.gonglei
From: Gonglei object_initialize() leaves the object with a refcount of 1. object_property_add_child() adds its own reference which is dropped again when the property is deleted. The upshot of this is that we always have a refcount >= 1. Upon hot unplug the virtio-scsi/vhost-scsi child is not fi

[Qemu-devel] [PATCH v2 7/9] virtio-rng: use aliases instead of duplicate qdev properties

2014-09-08 Thread arei.gonglei
From: Gonglei virtio-rng-{pci, s390, ccw} all duplicate the qdev properties of their VirtIORNG child. This approach does not work well with string or pointer properties since we must be careful about leaking or double-freeing them. Use the QOM alias property to forward property accesses to the V

Re: [Qemu-devel] [RFC PATCH v6 00/14] Reverse execution.

2014-09-08 Thread Pavel Dovgaluk
> From: Frederic Konrad [mailto:fred.kon...@greensocs.com] > On 08/09/2014 10:29, Paolo Bonzini wrote: > > Il 08/09/2014 10:09, Frederic Konrad ha scritto: > >> By the way how do you want to have this discussion? > >> > >> At the KVM forum? Or by phone on KVM phone call? > > Or both. :) > > > > Ser

Re: [Qemu-devel] [PULL 6/7] net: complete all queued packets on VM stop

2014-09-08 Thread Jason Wang
On 09/04/2014 11:50 PM, Stefan Hajnoczi wrote: > From: "Michael S. Tsirkin" > > This completes all packets, ensuring that callbacks > will not run when VM is stopped. > > Cc: qemu-sta...@nongnu.org > Cc: Jason Wang > Signed-off-by: Michael S. Tsirkin > Signed-off-by: Stefan Hajnoczi > --- > ne

[Qemu-devel] [PATCH v7 RESEND 7/8] exec: report error when memory < hpagesize

2014-09-08 Thread Hu Tao
Report an error when memory < hpagesize in file_ram_alloc() so callers can handle the error. If user adds a memory-backend-file object using object_add command, specifying a size that is less than huge page size, qemu will core dump with message: Bad ram offset f000 Aborted (core

[Qemu-devel] [PATCH v7 RESEND 6/8] exec: file_ram_alloc: don't exit if failed to preallocate memory

2014-09-08 Thread Hu Tao
When using monitor command object_add to add a memory backend file but failed to preallocate memory for it, qemu exits silently. In the case we'd better give an error message and keep guest running. The problem can be reproduced as follows: 1. run qemu with -mem-prealloc 2. (monitor)object_add m

[Qemu-devel] [PATCH v7 RESEND 8/8] exec: add parameter errp to gethugepagesize

2014-09-08 Thread Hu Tao
Add parameter errp to gethugepagesize thus callers can handle errors. If user adds a memory-backend-file object using object_add command, specifying a non-existing directory for property mem-path, qemu will core dump with message: /nonexistingdir: No such file or directory Bad ram offset

[Qemu-devel] [PATCH v7 RESEND 2/8] memory: add parameter errp to memory_region_init_ram

2014-09-08 Thread Hu Tao
Add parameter errp to memory_region_init_ram and update all call sites to pass in &error_abort. Signed-off-by: Hu Tao Reviewed-by: Peter Crosthwaite --- backends/hostmem-ram.c | 2 +- hw/alpha/typhoon.c | 3 ++- hw/arm/armv7m.c

[Qemu-devel] [PATCH v7 RESEND 3/8] memory: add parameter errp to memory_region_init_ram_ptr

2014-09-08 Thread Hu Tao
Add parameter errp to memory_region_init_ram_ptr and update all call sites to pass in &error_abort. Reviewed-by: Peter Crosthwaite Signed-off-by: Hu Tao --- hw/display/g364fb.c | 2 +- hw/i386/kvm/pci-assign.c | 3 ++- hw/misc/ivshmem.c| 5 +++-- hw/misc/vfio.c | 3 ++- h

[Qemu-devel] [PATCH v7 RESEND 5/8] hostmem-ram: don't exit qemu if size of memory-backend-ram is way too big

2014-09-08 Thread Hu Tao
When using monitor command object_add to add a memory backend whose size is way too big to allocate memory for it, qemu just exits. In the case we'd better give an error message and keep guest running. The problem can be reproduced as follows: 1. run qemu 2. (monitor)object_add memory-backend-ram

[Qemu-devel] [PATCH v7 RESEND 4/8] memory: add parameter errp to memory_region_init_rom_device

2014-09-08 Thread Hu Tao
Add parameter errp to memory_region_init_rom_device and update all call sites to pass in &error_abort. Reviewed-by: Peter Crosthwaite Signed-off-by: Hu Tao --- hw/block/pflash_cfi01.c | 2 +- hw/block/pflash_cfi02.c | 2 +- include/exec/memory.h | 4 +++- memory.c| 5 +++-- 4

[Qemu-devel] [PATCH v7 RESEND 1/8] exec: add parameter errp to qemu_ram_alloc and qemu_ram_alloc_from_ptr

2014-09-08 Thread Hu Tao
Add parameter errp to qemu_ram_alloc and qemu_ram_alloc_from_ptr so that we can handle errors. Signed-off-by: Hu Tao Reviewed-by: Peter Crosthwaite --- exec.c | 36 +++- include/exec/ram_addr.h | 4 ++-- memory.c| 6 +++--- 3 fi

[Qemu-devel] [PATCH v7 RESEND 0/8] memory API improvements and bug fixes for memory backends

2014-09-08 Thread Hu Tao
This is merely a rebase of v7, and fixes two merge conflicts. This series includes two parts: 1. part 1 includes patches 1-4, which improves error handling of memory_region_init_ram, memory_region_init_ram_ptr and memory_region_init_rom_device 2. part 2 includes patches 5-8, each

[Qemu-devel] [PULL] qemu-sparc update

2014-09-08 Thread Mark Cave-Ayland
Hi Peter, I've just updated my qemu-sparc branch with an implementation of the apb PCI error registers. Please pull. ATB, Mark. The following changes since commit 1bc0e405816c9c6bde5695af20b07a1491ce1f9f: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into stagi

[Qemu-devel] [PATCH v14 4/5] raw-posix: Add falloc and full preallocation option

2014-09-08 Thread Hu Tao
This patch adds a new option preallocation for raw format, and implements falloc and full preallocation. Signed-off-by: Hu Tao Reviewed-by: Max Reitz --- block/raw-posix.c | 93 +++ qemu-doc.texi | 9 ++ qemu-img.texi | 9 ++

[Qemu-devel] [PATCH v14 5/5] qcow2: Add falloc and full preallocation option

2014-09-08 Thread Hu Tao
preallocation=falloc allocates disk space by posix_fallocate(), preallocation=full allocates disk space by writing zeros to disk. Both modes imply preallocation=metadata. Signed-off-by: Hu Tao Reviewed-by: Max Reitz --- block/qcow2.c | 62 +++

[Qemu-devel] [PATCH v14 3/5] qapi: introduce PreallocMode and new PreallocModes full and falloc.

2014-09-08 Thread Hu Tao
This patch prepares for the subsequent patches. Signed-off-by: Hu Tao Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf --- block/qcow2.c | 23 +++ qapi/block-core.json | 17 + tests/qemu-iotests/049.out | 2 +- 3 files changed, 33 insertion

[Qemu-devel] [PATCH v14 2/5] block: don't convert file size to sector size

2014-09-08 Thread Hu Tao
and avoid converting it back later. Signed-off-by: Hu Tao Reviewed-by: Max Reitz --- block/gluster.c | 9 - block/qcow.c | 8 block/qcow2.c | 10 +- block/raw-posix.c | 12 ++-- block/raw-win32.c | 6 +++--- 5 files changed, 22 insertions(+), 23 de

[Qemu-devel] [PATCH v14 1/5] block: round up file size to nearest sector

2014-09-08 Thread Hu Tao
Signed-off-by: Hu Tao Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- block/archipelago.c | 3 ++- block/cow.c | 3 ++- block/gluster.c | 4 +-- block/iscsi.c| 4 +-- block/nfs.c

[Qemu-devel] [PATCH v14 0/5] qcow2, raw: add preallocation=full and preallocation=falloc

2014-09-08 Thread Hu Tao
This series adds two preallocation mode to qcow2 and raw: Option preallocation=full preallocates disk space for image by writing zeros to disk, this ensures disk space in any cases. Option preallocation=falloc preallocates disk space by calling posix_fallocate(). This is faster than preallocation

Re: [Qemu-devel] [PATCH v3 03/47] Start documenting how postcopy works.

2014-09-08 Thread Hongyang Yang
在 09/09/2014 11:34 AM, Hongyang Yang 写道: Hi I've read your documentation about Postcopy, this is interesting. It comes to my mind that if COLO can gain some improvements from Postcopy. The first thing I thought was that if we can use the back channel that request dirty pages from source so

Re: [Qemu-devel] [PATCH v3 03/47] Start documenting how postcopy works.

2014-09-08 Thread Hongyang Yang
在 08/28/2014 11:03 PM, Dr. David Alan Gilbert (git) 写道: From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert --- docs/migration.txt | 188 + 1 file changed, 188 insertions(+) diff --git a/docs/migration.txt b/docs/migrat

Re: [Qemu-devel] [PATCH v3 03/47] Start documenting how postcopy works.

2014-09-08 Thread Hongyang Yang
Hi I've read your documentation about Postcopy, this is interesting. It comes to my mind that if COLO can gain some improvements from Postcopy. The first thing I thought was that if we can use the back channel that request dirty pages from source so that we do not need to manage a ram snapsho

Re: [Qemu-devel] [PATCH] vnc: add additional key up event before repeated key down

2014-09-08 Thread Chun Yan Liu
>>> On 9/6/2014 at 05:23 AM, in message , Stefano Stabellini wrote: > On Fri, 5 Sep 2014, Chunyan Liu wrote: > > Using xen tools 'xl vncviewer' with tigervnc (default on SLE-12), > > found that: the display of the guest is unexpected while keep > > pressing a key. We expect the same characte

Re: [Qemu-devel] [PATCH v13 6/6] qcow2: Add full preallocation option

2014-09-08 Thread Hu Tao
On Thu, Sep 04, 2014 at 03:09:08PM +0200, Kevin Wolf wrote: > Am 29.08.2014 um 10:33 hat Hu Tao geschrieben: > > preallocation=full allocates disk space by fallocating the space if > > posix_fallocate() is available, otherwise by writing zeros to disk to > > ensure disk space in any cases. > > > >

[Qemu-devel] [PATCH] Fix typos and misspellings in comments

2014-09-08 Thread zhanghailiang
Found by codespell: occured -> occurred formated -> formatted Comander -> Commander gaurantee -> guarantee Signed-off-by: zhanghailiang --- hw/ppc/spapr.c | 2 +- hw/usb/quirks.h | 2 +- libcacard/vcard_emul_nss.c | 2 +- linux-he

[Qemu-devel] [PATCH V2] net: don't use set/get_pointer() in set/get_netdev()

2014-09-08 Thread Jason Wang
Commit 1ceef9f27359cbe92ef124bf74de6f792e71f6fb (net: multiqueue support) tries to use set_pointer() and get_pointer() to set and get NICPeers which is not a pointer defined in DEFINE_PROP_NETDEV. This trick works but result a unclean and fragile implementation (e.g print_netdev and parse_netdev).

[Qemu-devel] ballooning not working on hotplugged pc-dimm

2014-09-08 Thread Alexandre DERUMIER
Hello, I was playing with pc-dimm hotplug, and I notice that balloning is not working on memory space of pc-dimm devices. example: qemu -m size=1024,slots=255,maxmem=15000M #free -m : 1024M -> qmp balloon 512M #free -m : 512M -> hotplug pc-dimm 1G: #free -m : 1512M (This is the same behav

Re: [Qemu-devel] [PATCH] net: don't use set/get_pointer() in set/get_netdev()

2014-09-08 Thread Jason Wang
On 09/05/2014 12:40 AM, Peter Maydell wrote: > On 4 September 2014 17:21, Stefan Hajnoczi wrote: >> Unfortunately this patch breaks aarch64-softmmu qtests: >> GTESTER check-qtest-aarch64 >> Broken pipe >> GTester: last random seed: R02S6d8ab263ca56f8ae7a4b47bdf93fbc73 >> >> Please take a look at w

Re: [Qemu-devel] [PATCH] net: don't use set/get_pointer() in set/get_netdev()

2014-09-08 Thread Jason Wang
On 09/05/2014 12:21 AM, Stefan Hajnoczi wrote: > Unfortunately this patch breaks aarch64-softmmu qtests: > GTESTER check-qtest-aarch64 > Broken pipe > GTester: last random seed: R02S6d8ab263ca56f8ae7a4b47bdf93fbc73 > > Please take a look at what is causing this. > > Dropped from the net branch. > >

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-08 Thread Jun Li
On Fri, 09/05 12:21, Kevin Wolf wrote: > Am 01.09.2014 um 12:52 hat Jun Li geschrieben: > > When every item of refcount block is NULL, free refcount block and reset the > > corresponding item of refcount table with NULL. > > > > Signed-off-by: Jun Li > > The commit message should also describe w

Re: [Qemu-devel] [Xen-devel] [RFC Patch v3 23/22] Introduce "xen-load-devices-state"

2014-09-08 Thread Wen Congyang
At 09/06/2014 05:57 AM, Stefano Stabellini Write: > On Fri, 5 Sep 2014, Wen Congyang wrote: >> introduce a "xen-load-devices-state" QAPI command that can be used to load >> the state of all devices, but not the RAM or the block devices of the >> VM. > > Hello Wen, > please CC qemu-devel too for QE

Re: [Qemu-devel] [PATCH] qemu-char: fix terminal crash when using "-monitor stdio -nographic"

2014-09-08 Thread Li Liu
On 2014/9/5 17:31, Gerd Hoffmann wrote: > On Fr, 2014-09-05 at 11:04 +0200, Markus Armbruster wrote: >> Li Liu writes: >> >>> Ping, any more comments? Thanks. >> >> I'd like to hear Gerd's opinion (cc'ed). >> > But is having multiple character devices use the same terminal valid? > > No (gu

Re: [Qemu-devel] Supporting multiple CPU AddressSpaces and memory transaction attributes

2014-09-08 Thread Edgar E. Iglesias
On Mon, Sep 08, 2014 at 12:53:57PM +0100, Peter Maydell wrote: > On 7 September 2014 02:47, Edgar E. Iglesias wrote: > > On Thu, Sep 04, 2014 at 06:47:58PM +0100, Peter Maydell wrote: > >> We introduce the concept of memory transaction attributes, > >> which are a guest-CPU specific bunch of bits

Re: [Qemu-devel] [PATCH v4 0/2] trace: Trace control commands

2014-09-08 Thread Luiz Capitulino
On Mon, 08 Sep 2014 15:03:41 -0500 Lluís Vilanova wrote: > Lluís Vilanova writes: > > > Adds QAPI/QMP commands to control tracing events, and reimplements some of > > the > > related HMP commands on top. > > Ping. I need reviewers. Stefan and Eric are obvious candidates.

Re: [Qemu-devel] [PATCH v4 0/2] trace: Trace control commands

2014-09-08 Thread Lluís Vilanova
Lluís Vilanova writes: > Adds QAPI/QMP commands to control tracing events, and reimplements some of the > related HMP commands on top. Ping. Thanks, Lluis > NOTE: The "trace-event-set-state" command uses a bool 'enable' argument > instead > of an enum 'state'. I'm still not sure if a

Re: [Qemu-devel] [PATCH] exec: file_ram_alloc(): print error when prealloc fails

2014-09-08 Thread Eric Blake
On 09/08/2014 12:08 PM, Luiz Capitulino wrote: > If memory allocation fails when using the -mem-prealloc command-line > option, QEMU exits without printing any error information to > the user: > > # qemu [...] -m 1G -mem-prealloc -mem-path /dev/hugepages > # echo $? > 1 > > This commit adds an

[Qemu-devel] [PATCH] exec: file_ram_alloc(): print error when prealloc fails

2014-09-08 Thread Luiz Capitulino
If memory allocation fails when using the -mem-prealloc command-line option, QEMU exits without printing any error information to the user: # qemu [...] -m 1G -mem-prealloc -mem-path /dev/hugepages # echo $? 1 This commit adds an error message, so that we print instead: # qemu [...] -m 1G -m

Re: [Qemu-devel] qcow2, lazy_refcounts and killing qemu

2014-09-08 Thread Max Reitz
On 08.09.2014 09:16, Markus Armbruster wrote: "Richard W.M. Jones" writes: On Fri, Sep 05, 2014 at 04:39:51PM +0100, Stefan Hajnoczi wrote: Did you try older QEMU versions? I'm curious if this is something that crept in later or is fundamentally broken in lazy_refcounts=on. At your promptin

[Qemu-devel] [PATCH] qdev: HotplugHandler: rename unplug callback to unplug_request

2014-09-08 Thread Igor Mammedov
'HotplugHandler.unplug' callback is currently used as async call to issue unplug request from device that implements it. Renaming 'unplug' callback to 'unplug_request' should help to avoid confusion about what callback does and would allow to introduce 'unplug' callback that would perform actual de

Re: [Qemu-devel] [Bug 1363641] Re: Build of v2.1.0 fails on armv7l due to undeclared __NR_select

2014-09-08 Thread Dr. David Alan Gilbert
(cc'ing Michael Hines who owns and knows the RDMA code) * Karl-Philipp Richter (krichter...@aol.de) wrote: > ** Description changed: > > After `make clean` and `git clean -x -f -d` `git checkout v2.1.0 && > configure --prefix=/home/user/prefix-qemu-2.1.0 && make` fails due to > missing decl

Re: [Qemu-devel] [PATCH v2 4/5] qcow2: Check L1/L2/reftable entries for alignment

2014-09-08 Thread Benoît Canet
The Monday 08 Sep 2014 à 19:47:31 (+0200), Max Reitz wrote : > On 08.09.2014 16:40, Benoît Canet wrote: > >The Friday 05 Sep 2014 à 16:07:18 (+0200), Max Reitz wrote : > >>Offsets taken from the L1, L2 and refcount tables are generally assumed > >>to be correctly aligned. However, this cannot be gu

Re: [Qemu-devel] [PATCH v2 4/5] qcow2: Check L1/L2/reftable entries for alignment

2014-09-08 Thread Max Reitz
On 08.09.2014 16:40, Benoît Canet wrote: The Friday 05 Sep 2014 à 16:07:18 (+0200), Max Reitz wrote : Offsets taken from the L1, L2 and refcount tables are generally assumed to be correctly aligned. However, this cannot be guaranteed if the image has been written to by something different than q

Re: [Qemu-devel] [PATCH v2 1/5] qapi/block: Add "fatal" to BLOCK_IMAGE_CORRUPTED

2014-09-08 Thread Max Reitz
On 08.09.2014 16:01, Benoît Canet wrote: The Friday 05 Sep 2014 à 16:07:15 (+0200), Max Reitz wrote : Not every BLOCK_IMAGE_CORRUPTED event must be fatal; for example, when reading from an image, they should generally not be. Nonetheless, even an image only read from may of course be corrupted a

[Qemu-devel] [PATCH 0/4] Block-related miscellaneous cleanups

2014-09-08 Thread Markus Armbruster
Random crap I ran into while working on a bigger task. Markus Armbruster (4): qemu-io: Clean up openfile() after commit 2e40134 xen_disk: Plug memory leak on error path xen: Drop redundant bdrv_close() from pci_piix3_xen_ide_unplug() thread-pool: Drop unnecessary includes hw/block/xen_di

[Qemu-devel] [PATCH 1/4] qemu-io: Clean up openfile() after commit 2e40134

2014-09-08 Thread Markus Armbruster
Commit 6db9560 split off the growable case so it can use bdrv_file_open() instead of bdrv_open() then. Growable BDSes become anonymous. Weird. Commit 2e40134 folded bdrv_file_open() back into bdrv_open() with new flag BDRV_O_PROTOCOL. We still have two bdrv_open() calls, and growable BDSes rema

[Qemu-devel] [PATCH 3/4] xen: Drop redundant bdrv_close() from pci_piix3_xen_ide_unplug()

2014-09-08 Thread Markus Armbruster
drive_del() closes just fine. Signed-off-by: Markus Armbruster --- hw/ide/piix.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 59319eb..49e78a7 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -182,7 +182,6 @@ int pci_piix3_xen_ide_unplug(DeviceState *de

Re: [Qemu-devel] [PATCH] block: extend BLOCK_IO_ERROR event with nospace indicator

2014-09-08 Thread Luiz Capitulino
On Mon, 8 Sep 2014 17:33:18 +0200 Kevin Wolf wrote: > Am 08.09.2014 um 16:42 hat Luiz Capitulino geschrieben: > > On Fri, 29 Aug 2014 16:07:27 -0400 > > Luiz Capitulino wrote: > > > > > Management software, such as RHEV's vdsm, want to be able to allocate > > > disk space on demand. The basic u

Re: [Qemu-devel] [PATCH 1/1] loader: g_realloc(p, 0) frees and returns NULL, simplify

2014-09-08 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Wed, Aug 20, 2014 at 08:38:11PM +0200, Markus Armbruster wrote: >> Once upon a time, it was decided that qemu_realloc(ptr, 0) should >> abort. Switching to glib retired that bright idea. A bit of code >> that was added to cope with it (commit 3e372cf) is still

[Qemu-devel] [PATCH 2/4] xen_disk: Plug memory leak on error path

2014-09-08 Thread Markus Armbruster
While there, streamline control flow a bit. Signed-off-by: Markus Armbruster --- hw/block/xen_disk.c | 31 ++- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c index a221d0b..2dcef07 100644 --- a/hw/block/xen_di

[Qemu-devel] [PATCH 4/4] thread-pool: Drop unnecessary includes

2014-09-08 Thread Markus Armbruster
Dragging block_int.h into a header is *not* nice. Fortunately, this is the only offender. Signed-off-by: Markus Armbruster --- include/block/thread-pool.h | 6 +- thread-pool.c | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/include/block/thread-pool.h b/i

Re: [Qemu-devel] [PATCH] virtio-pci: enable bus master for old guests

2014-09-08 Thread Michael S. Tsirkin
On Mon, Sep 08, 2014 at 06:26:51PM +0200, Jan Kiszka wrote: > On 2014-09-08 18:05, Michael S. Tsirkin wrote: > > commit cc943c36faa192cd4b32af8fe5edb31894017d35 > > pci: Use bus master address space for delivering MSI/MSI-X messages > > breaks virtio-net for rhel6.[56] x86 guests because they d

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-08 Thread Paolo Bonzini
Il 08/09/2014 18:18, Peter Lieven ha scritto: >> > When copying data, gparted will try using very large I/O sizes. Of >> > course if something breaks it will just use a smaller size, but it would >> > make performance worse. >> > >> > I tried now (with local storage, not virtual---but with such l

Re: [Qemu-devel] [PATCH] virtio-pci: enable bus master for old guests

2014-09-08 Thread Jan Kiszka
On 2014-09-08 18:05, Michael S. Tsirkin wrote: > commit cc943c36faa192cd4b32af8fe5edb31894017d35 > pci: Use bus master address space for delivering MSI/MSI-X messages > breaks virtio-net for rhel6.[56] x86 guests because they don't > enable bus mastering for virtio PCI devices > > Old guests f

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-08 Thread Peter Lieven
> Am 08.09.2014 um 17:27 schrieb Paolo Bonzini : > > Il 08/09/2014 17:18, Peter Lieven ha scritto: >>> >>> That's why we have splitting code for discard, and why we would have to >>> add it for read/write too. >> >> Why should a guest generate such big requests. > > When copying data, gparted

Re: [Qemu-devel] [PATCH v2] Support vhd type VHD_DIFFERENCING

2014-09-08 Thread Kevin Wolf
Am 08.09.2014 um 16:41 hat Xiaodong Gong geschrieben: > From: Xiaodong Gong > > Now qemu only supports vhd type VHD_FIXED and VHD_DYNAMIC, > so qemu can't read snapshot volume of vhd, and can't support > other storage features of vhd file. > > This patch add read parent information in function "

[Qemu-devel] [PATCH] virtio-pci: enable bus master for old guests

2014-09-08 Thread Michael S. Tsirkin
commit cc943c36faa192cd4b32af8fe5edb31894017d35 pci: Use bus master address space for delivering MSI/MSI-X messages breaks virtio-net for rhel6.[56] x86 guests because they don't enable bus mastering for virtio PCI devices Old guests forgot to enable bus mastering, enable it automatically on D

Re: [Qemu-devel] [PATCH] Fix improper usage of cpu_to_be32 in vpc

2014-09-08 Thread Kevin Wolf
Am 08.09.2014 um 16:40 hat Xiaodong Gong geschrieben: > From: Xiaodong Gong > > cpu_to_be32() is wrong since vhd_type is an enum constant > (just a regular CPU-endian integer). > > Signed-off-by: Xiaodong Gong Thanks, this one is perfect. :-) Applied to the block branch. Kevin

Re: [Qemu-devel] [PATCH] block: extend BLOCK_IO_ERROR event with nospace indicator

2014-09-08 Thread Kevin Wolf
Am 08.09.2014 um 16:42 hat Luiz Capitulino geschrieben: > On Fri, 29 Aug 2014 16:07:27 -0400 > Luiz Capitulino wrote: > > > Management software, such as RHEV's vdsm, want to be able to allocate > > disk space on demand. The basic use case is to start a VM with a small > > disk and then the disk i

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-08 Thread Paolo Bonzini
Il 08/09/2014 17:18, Peter Lieven ha scritto: >> >> That's why we have splitting code for discard, and why we would have to >> add it for read/write too. > > Why should a guest generate such big requests. When copying data, gparted will try using very large I/O sizes. Of course if something brea

Re: [Qemu-devel] [PATCH v2 3/3] util: Add an utility infrastructure used to compute an average on a time slice

2014-09-08 Thread Benoît Canet
On Mon, Sep 08, 2014 at 05:09:38PM +0200, Paolo Bonzini wrote: > Il 08/09/2014 16:49, Benoît Canet ha scritto: > >> > - create two windows, with twice the suggested expiration period, and > >> > return min/avg/max from the oldest window. Example > >> > > >> >t=0 |t=1 |t=

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-08 Thread Peter Lieven
On 08.09.2014 17:15, Paolo Bonzini wrote: Il 08/09/2014 17:13, ronnie sahlberg ha scritto: What I would like to see would also be to report these limitations to the guest itself to prevent it from generating too large I/Os. That's difficult because you don't want a backend change (e.g. from loc

Re: [Qemu-devel] [PATCH 1/2] tcg: Compress TCGLabelQemuLdst

2014-09-08 Thread Claudio Fontana
Reviewed-by: Claudio Fontana On 03.09.2014 18:46, Richard Henderson wrote: > Use 1 32-bit word instead of 6. > > Signed-off-by: Richard Henderson > --- > tcg/tcg-be-ldst.h | 19 --- > 1 file changed, 12 insertions(+), 7 deletions(-) > > diff --git a/tcg/tcg-be-ldst.h b/tcg/tcg

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-08 Thread Peter Lieven
On 08.09.2014 17:13, ronnie sahlberg wrote: On Mon, Sep 8, 2014 at 7:42 AM, Paolo Bonzini wrote: Il 08/09/2014 16:35, Peter Lieven ha scritto: messages. :) So you would not throw an error msg here? No, though a trace could be useful. Is there a howto somewhere how to implement that? Try co

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-08 Thread Paolo Bonzini
Il 08/09/2014 17:13, ronnie sahlberg ha scritto: > > What I would like to see would also be to report these limitations to > the guest itself to prevent it from generating too large I/Os. That's difficult because you don't want a backend change (e.g. from local storage to iSCSI) to change the vit

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-08 Thread ronnie sahlberg
On Mon, Sep 8, 2014 at 7:42 AM, Paolo Bonzini wrote: > Il 08/09/2014 16:35, Peter Lieven ha scritto: > > messages. :) So you would not throw an error msg here? >>> No, though a trace could be useful. >> >> Is there a howto somewhere how to implement that? > > Try commit 4ac4458076e1aa

[Qemu-devel] [Bug 1366836] Re: Core2Duo and KVM may not boot Win8 properly on 3.x kernels

2014-09-08 Thread Erik Rull
** Description changed: When I start up QEMU w/ KVM 1.7.0 on a Core2Duo machine running a vanilla kernel 3.4.67 or 3.10.12 to run a Windows 8.0 guest, the guest freezes at Windows 8 boot without any error. When I dump the CPU registers via "info registers", nothing changes, that means the s

Re: [Qemu-devel] [PATCH v2 3/3] util: Add an utility infrastructure used to compute an average on a time slice

2014-09-08 Thread Paolo Bonzini
Il 08/09/2014 16:49, Benoît Canet ha scritto: >> > - create two windows, with twice the suggested expiration period, and >> > return min/avg/max from the oldest window. Example >> > >> >t=0 |t=1 |t=2 |t=3 |t=4 >> >wnd0: [0,1) |wnd0: [1,3) |

[Qemu-devel] [Bug 1366836] Re: Core2Duo and KVM may not boot Win8 properly on 3.x kernels

2014-09-08 Thread Erik Rull
** Description changed: - When I start up QEMU w/ KVM 1.7.0 on a Core2Duo machine running a vanilla kernel - 3.4.67 or 3.10.12 to run a Windows 8.0 guest, the guest freezes at Windows 8 boot without any error. - When I dump the CPU registers via "info registers", nothing changes, that means - t

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-08 Thread Peter Lieven
On 08.09.2014 16:42, Paolo Bonzini wrote: Il 08/09/2014 16:35, Peter Lieven ha scritto: messages. :) So you would not throw an error msg here? No, though a trace could be useful. Is there a howto somewhere how to implement that? Try commit 4ac4458076e1aaf3b01a6361154117df20e22215. Thanks f

Re: [Qemu-devel] [PATCH v2 2/3] timers: Move NANOSECONDS_PER_SECONDS to timer.h for future reuse

2014-09-08 Thread Eric Blake
On 09/08/2014 06:18 AM, Benoît Canet wrote: > Signed-off-by: Benoît Canet > --- > include/qemu/throttle.h | 2 -- > include/qemu/timer.h| 2 ++ > 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualiz

[Qemu-devel] [Bug 1366836] [NEW] Core2Duo and KVM may not boot Win8 properly on 3.x kernels

2014-09-08 Thread Erik Rull
Public bug reported: When I start up QEMU w/ KVM 1.7.0 on a Core2Duo machine running a vanilla kernel 3.4.67 or 3.10.12 to run a Windows 8.0 guest, the guest freezes at Windows 8 boot without any error. When I dump the CPU registers via "info registers", nothing changes, that means the system rea

Re: [Qemu-devel] [PATCH v2 3/3] util: Add an utility infrastructure used to compute an average on a time slice

2014-09-08 Thread Benoît Canet
The Monday 08 Sep 2014 à 16:29:26 (+0200), Paolo Bonzini wrote : > Il 08/09/2014 14:18, Benoît Canet ha scritto: > > The algorithm used was defined on the list while discussing the new IO > > accounting > > overhaul. > > See http://lists.nongnu.org/archive/html/qemu-devel/2014-08/msg04954.html > >

Re: [Qemu-devel] [PATCH v2 1/3] throttle: Make NANOSECONDS_PER_SECOND an integer

2014-09-08 Thread Eric Blake
On 09/08/2014 06:18 AM, Benoît Canet wrote: > We will want to reuse this define in the future by making it common to > multiples s/multiples/multiple/ > QEMU modules. > It would be safer that this define be an integer so we avoid stranges float s/stranges/strange/ > rounding errors. > Do this

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-08 Thread Paolo Bonzini
Il 08/09/2014 16:35, Peter Lieven ha scritto: messages. :) >>> So you would not throw an error msg here? >> No, though a trace could be useful. > > Is there a howto somewhere how to implement that? Try commit 4ac4458076e1aaf3b01a6361154117df20e22215. > Whats your opinion changed the ma

Re: [Qemu-devel] [PATCH] block: extend BLOCK_IO_ERROR event with nospace indicator

2014-09-08 Thread Luiz Capitulino
On Fri, 29 Aug 2014 16:07:27 -0400 Luiz Capitulino wrote: > Management software, such as RHEV's vdsm, want to be able to allocate > disk space on demand. The basic use case is to start a VM with a small > disk and then the disk is enlarged when QEMU hits a ENOSPC condition. > > To this end, the

[Qemu-devel] [PATCH v2] Support vhd type VHD_DIFFERENCING

2014-09-08 Thread Xiaodong Gong
From: Xiaodong Gong Now qemu only supports vhd type VHD_FIXED and VHD_DYNAMIC, so qemu can't read snapshot volume of vhd, and can't support other storage features of vhd file. This patch add read parent information in function "vpc_open", read bitmap in "vpc_read", and change bitmap in "vpc_writ

Re: [Qemu-devel] [PATCH v2 4/5] qcow2: Check L1/L2/reftable entries for alignment

2014-09-08 Thread Benoît Canet
The Friday 05 Sep 2014 à 16:07:18 (+0200), Max Reitz wrote : > Offsets taken from the L1, L2 and refcount tables are generally assumed > to be correctly aligned. However, this cannot be guaranteed if the image > has been written to by something different than qemu, thus check all > offsets taken fr

[Qemu-devel] [PATCH] Fix improper usage of cpu_to_be32 in vpc

2014-09-08 Thread Xiaodong Gong
From: Xiaodong Gong cpu_to_be32() is wrong since vhd_type is an enum constant (just a regular CPU-endian integer). Signed-off-by: Xiaodong Gong --- block/vpc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block/vpc.c b/block/vpc.c index 055efc4..c024b4c 100644 --

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-08 Thread Peter Lieven
On 08.09.2014 15:58, Paolo Bonzini wrote: Il 08/09/2014 15:56, Peter Lieven ha scritto: Look like you are changing the coroutine version. Some hardware like virtio-blk uses the AIO version of read and writes. What would happen if all the block drivers down the chain are AIO enabled ? The AIO v

Re: [Qemu-devel] [PATCH v2 3/3] util: Add an utility infrastructure used to compute an average on a time slice

2014-09-08 Thread Paolo Bonzini
Il 08/09/2014 14:18, Benoît Canet ha scritto: > The algorithm used was defined on the list while discussing the new IO > accounting > overhaul. > See http://lists.nongnu.org/archive/html/qemu-devel/2014-08/msg04954.html > > Also the module takes care of computing minimal and maximal values over t

Re: [Qemu-devel] [PATCH v2 3/5] qcow2: Use qcow2_signal_corruption() for overlaps

2014-09-08 Thread Benoît Canet
The Friday 05 Sep 2014 à 16:07:17 (+0200), Max Reitz wrote : > Use the new function in case of a failed overlap check. > > This changes output in case of corruption, so adapt iotest 060's > reference output accordingly. > > Signed-off-by: Max Reitz > --- > block/qcow2-refcount.c | 24 +++---

Re: [Qemu-devel] [RFC][patch 0/6] pci pass-through support for qemu/KVM on s390

2014-09-08 Thread Alex Williamson
On Mon, 2014-09-08 at 11:20 +0200, Paolo Bonzini wrote: > Il 06/09/2014 01:19, Alexander Graf ha scritto: > >> > 1) interpretive execution of pci load/store instruction. If we use this > >> > function > >> >pci access does not get intercepted (no SIE exit) but is handled via > >> > microcode.

Re: [Qemu-devel] [PATCH v2 2/5] qcow2: Add qcow2_signal_corruption()

2014-09-08 Thread Benoît Canet
The Friday 05 Sep 2014 à 16:07:16 (+0200), Max Reitz wrote : > Add a helper function for easily marking an image corrupt (on fatal > corruptions) while outputting an informative message to stderr and via > QAPI. > > Signed-off-by: Max Reitz > --- > block/qcow2.c | 48

Re: [Qemu-devel] [PULL v2 00/24] Block patches

2014-09-08 Thread Peter Maydell
On 8 September 2014 11:51, Stefan Hajnoczi wrote: > v2: > * Dropped Fam's dataplane virtio header patches that break win32 build > [Peter] > > The following changes since commit f102f224556f292f55b6e25147741bb8c48c9451: > > Merge remote-tracking branch 'remotes/afaerber/tags/qom-cpu-for-peter'

Re: [Qemu-devel] [PATCH v2 1/5] qapi/block: Add "fatal" to BLOCK_IMAGE_CORRUPTED

2014-09-08 Thread Benoît Canet
The Friday 05 Sep 2014 à 16:07:15 (+0200), Max Reitz wrote : > Not every BLOCK_IMAGE_CORRUPTED event must be fatal; for example, when > reading from an image, they should generally not be. Nonetheless, even > an image only read from may of course be corrupted and this can be > detected during norma

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-08 Thread Paolo Bonzini
Il 08/09/2014 15:56, Peter Lieven ha scritto: > >>> Look like you are changing the coroutine version. >>> >>> Some hardware like virtio-blk uses the AIO version of read and writes. >>> What would happen if all the block drivers down the chain are AIO >>> enabled ? >> The AIO version still goes

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-08 Thread Peter Lieven
On 08.09.2014 15:49, Paolo Bonzini wrote: Il 08/09/2014 15:44, Benoît Canet ha scritto: +if (bs->bl.max_transfer_length && nb_sectors > bs->bl.max_transfer_length) { +error_report("read of %d sectors at sector %ld exceeds device max" + " transfer length of %d sec

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-08 Thread Paolo Bonzini
Il 08/09/2014 15:44, Benoît Canet ha scritto: >> > +if (bs->bl.max_transfer_length && nb_sectors > >> > bs->bl.max_transfer_length) { >> > +error_report("read of %d sectors at sector %ld exceeds device max" >> > + " transfer length of %d sectors.", nb_sectors, >> >

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-08 Thread Benoît Canet
The Friday 05 Sep 2014 à 18:51:26 (+0200), Peter Lieven wrote : > Signed-off-by: Peter Lieven > --- > block.c | 14 ++ > 1 file changed, 14 insertions(+) > > diff --git a/block.c b/block.c > index 2c4a5de..fa4c34b 100644 > --- a/block.c > +++ b/block.c > @@ -3215,6 +3215,13 @@ stat

Re: [Qemu-devel] [PULL 01/12] pci: Use bus master address space for delivering MSI/MSI-X messages

2014-09-08 Thread Michael S. Tsirkin
On Thu, Aug 14, 2014 at 06:08:44PM +0200, Michael S. Tsirkin wrote: > From: Jan Kiszka > > The spec says (and real HW confirms this) that, if the bus master bit > is 0, the device will not generate any PCI accesses. MSI and MSI-X > messages fall among these, so we should use the corresponding add

  1   2   >