Re: [Qemu-devel] [Qemu-stable] [2.2 PATCH] virtio-net: fix unmap leak

2014-11-27 Thread Jason Wang
On Thu, Nov 27, 2014 at 3:45 PM, Fam Zheng f...@redhat.com wrote: On Thu, 11/27 13:59, Jason Wang wrote: virtio_net_handle_ctrl() and other functions that process control vq request call iov_discard_front() which will shorten the iov. This will lead unmapping in virtqueue_push() leaks

Re: [Qemu-devel] [PATCH 01/12] block: qcow2 driver may not be found

2014-11-27 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 26.11.2014 um 16:20 hat Max Reitz geschrieben: On 2014-11-26 at 16:19, Eric Blake wrote: On 11/26/2014 02:13 AM, Max Reitz wrote: On 2014-11-26 at 08:23, Markus Armbruster wrote: Max Reitz mre...@redhat.com writes: Albeit absolutely impossible right

[Qemu-devel] [RfC PATCH] hid: handle full ptr queues in post_load

2014-11-27 Thread Gerd Hoffmann
Cc: Gonglei arei.gong...@huawei.com Cc: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/input/hid.c | 21 + 1 file changed, 21 insertions(+) diff --git a/hw/input/hid.c b/hw/input/hid.c index 8f6fbb3..6fb963f 100644 ---

Re: [Qemu-devel] [PATCH v4 1/6] hw/arm/boot: load_dtb becomes non static arm_load_dtb

2014-11-27 Thread Shannon Zhao
Hi Eric, On 2014/10/31 21:53, Eric Auger wrote: load_dtb is renamed into arm_load_dtb and becomes non static. it will be used by machvirt for dynamic instantiation of platform devices Signed-off-by: Eric Auger eric.au...@linaro.org --- v2 - v3: load_dtb renamed into arm_load_dtb

Re: [Qemu-devel] [2.3 PATCH v7 05/10] block: Add bdrv_copy_dirty_bitmap and bdrv_reset_dirty_bitmap

2014-11-27 Thread Markus Armbruster
Eric Blake ebl...@redhat.com writes: On 11/26/2014 05:43 AM, Max Reitz wrote: On 2014-11-25 at 20:46, John Snow wrote: From: Fam Zheng f...@redhat.com Signed-off-by: Fam Zheng f...@redhat.com Signed-off-by: John Snow js...@redhat.com --- block.c | 35

Re: [Qemu-devel] [Qemu-stable] [2.2 PATCH] virtio-net: fix unmap leak

2014-11-27 Thread Fam Zheng
On Thu, 11/27 13:59, Jason Wang wrote: virtio_net_handle_ctrl() and other functions that process control vq request call iov_discard_front() which will shorten the iov. This will lead unmapping in virtqueue_push() leaks mapping. Fixes this by keeping the original iov untouched and using a

Re: [Qemu-devel] [PATCH] Fix for crash after migration in virtio-rng on bi-endian targets

2014-11-27 Thread Amit Shah
On (Thu) 27 Nov 2014 [16:48:10], David Gibson wrote: VirtIO devices now remember which endianness they're operating in in order to support targets which may have guests of either endianness, such as powerpc. This endianness state is transferred in a subsection of the virtio device's

Re: [Qemu-devel] [RFC PATCH v5 22/31] timer: introduce new QEMU_CLOCK_VIRTUAL_RT clock

2014-11-27 Thread Pavel Dovgaluk
From: Paolo Bonzini [mailto:pbonz...@redhat.com] On 26/11/2014 11:40, Pavel Dovgalyuk wrote: + * @QEMU_CLOCK_VIRTUAL_RT: realtime clock used for icount warp + * + * This clock runs as a realtime clock, but is used for icount warp + * and thus should be traced with record/replay to make

Re: [Qemu-devel] [PATCH RFC] block: fix spoiling all dirty bitmaps by mirror and migration

2014-11-27 Thread Fam Zheng
On Wed, 11/26 12:23, Vladimir Sementsov-Ogievskiy wrote: Mirror and migration use dirty bitmaps for their purposes, and since commit [block: per caller dirty bitmap] they use their own bitmaps, not the global one. But they use old functions bdrv_set_dirty and bdrv_reset_dirty, which change all

Re: [Qemu-devel] [2.3 PATCH v7 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2014-11-27 Thread Markus Armbruster
John Snow js...@redhat.com writes: On 11/26/2014 07:19 AM, Max Reitz wrote: On 2014-11-25 at 20:46, John Snow wrote: From: Fam Zheng f...@redhat.com The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name is mandatory and must be unique for the same

Re: [Qemu-devel] [PATCH v8 07/10] qmp: Add support of dirty-bitmap sync mode for drive-backup

2014-11-27 Thread Fam Zheng
On Wed, 11/26 12:41, John Snow wrote: From: Fam Zheng f...@redhat.com For dirty-bitmap sync mode, the block job will iterate through the given dirty bitmap to decide if a sector needs backup (backup all the dirty clusters and skip clean ones), just as allocation conditions of top sync mode.

Re: [Qemu-devel] [PATCH] block: do not use get_clock()

2014-11-27 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: Use the external qemu-timer API instead. Ignorant question: why?

Re: [Qemu-devel] [PATCH v4 1/6] hw/arm/boot: load_dtb becomes non static arm_load_dtb

2014-11-27 Thread Eric Auger
On 11/27/2014 10:00 AM, Shannon Zhao wrote: Hi Eric, On 2014/10/31 21:53, Eric Auger wrote: load_dtb is renamed into arm_load_dtb and becomes non static. it will be used by machvirt for dynamic instantiation of platform devices Signed-off-by: Eric Auger eric.au...@linaro.org --- v2 -

Re: [Qemu-devel] [Bug 1396052] [NEW] migration failed when running BurnInTest in guest

2014-11-27 Thread Amit Shah
On (Tue) 25 Nov 2014 [09:32:58], z08687 wrote: Public bug reported: Hi, I found a live migration problem and have found out the reason, but I can't fix it up myself. I really need help. When live migration vm and it's block device in save time, it will occur probabilistic . Step:

Re: [Qemu-devel] [RfC PATCH] hid: handle full ptr queues in post_load

2014-11-27 Thread Gonglei
On 2014/11/27 17:04, Gerd Hoffmann wrote: Cc: Gonglei arei.gong...@huawei.com Cc: Dr. David Alan Gilbert dgilb...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/input/hid.c | 21 + 1 file changed, 21 insertions(+) diff --git a/hw/input/hid.c

Re: [Qemu-devel] [PATCH] Fix for crash after migration in virtio-rng on bi-endian targets

2014-11-27 Thread Markus Armbruster
David Gibson da...@gibson.dropbear.id.au writes: VirtIO devices now remember which endianness they're operating in in order to support targets which may have guests of either endianness, such as powerpc. This endianness state is transferred in a subsection of the virtio device's information.

Re: [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support

2014-11-27 Thread Max Reitz
On 2014-11-13 at 11:36, Mao Chuan Li wrote: Currently the qemu-iotest framework is focused on the x86 platform. The suite should be usable by other platforms as well. To enable multi-platform usage, this patch set enhances the framework scripts to address this. By using the default machine

Re: [Qemu-devel] [PATCHv3 3/6] block: add a knob to disable multiwrite_merge

2014-11-27 Thread Peter Lieven
On 31.10.2014 11:59, Stefan Hajnoczi wrote: On Fri, Oct 31, 2014 at 09:31:53AM +0100, Peter Lieven wrote: Am 28.10.2014 um 12:11 schrieb Stefan Hajnoczi: On Sat, Oct 25, 2014 at 06:55:50PM +0200, Peter Lieven wrote: The big question is whether these user-visible interfaces make sense if write

Re: [Qemu-devel] [PATCH v8 01/10] qapi: Add optional field name to block dirty bitmap

2014-11-27 Thread Max Reitz
On 2014-11-26 at 18:41, John Snow wrote: From: Fam Zheng f...@redhat.com This field will be set for user created dirty bitmap. Also pass in an error pointer to bdrv_create_dirty_bitmap, so when a name is already taken on this BDS, it can report an error message. This is not global check, two

Re: [Qemu-devel] [PATCH v8 02/10] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2014-11-27 Thread Max Reitz
On 2014-11-26 at 18:41, John Snow wrote: From: Fam Zheng f...@redhat.com The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name is mandatory and must be unique for the same device, but different devices can have bitmaps with the same names. The granularity

Re: [Qemu-devel] [PATCH v8 03/10] block: Introduce bdrv_dirty_bitmap_granularity()

2014-11-27 Thread Max Reitz
On 2014-11-26 at 18:41, John Snow wrote: From: Fam Zheng f...@redhat.com This returns the granularity (in bytes) of dirty bitmap, which matches the QMP interface and the existing query interface. Signed-off-by: Fam Zheng f...@redhat.com Signed-off-by: John Snow js...@redhat.com --- block.c

[Qemu-devel] [PATCH v2] block: fix spoiling all dirty bitmaps by mirror and migration

2014-11-27 Thread Vladimir Sementsov-Ogievskiy
Mirror and migration use dirty bitmaps for their purposes, and since commit [block: per caller dirty bitmap] they use their own bitmaps, not the global one. But they use old functions bdrv_set_dirty and bdrv_reset_dirty, which change all dirty bitmaps. Named dirty bitmaps series by Fam and Snow

Re: [Qemu-devel] [PATCH v8 04/10] hbitmap: Add hbitmap_copy

2014-11-27 Thread Max Reitz
On 2014-11-26 at 18:41, John Snow wrote: From: Fam Zheng f...@redhat.com This makes a deep copy of an HBitmap. Signed-off-by: Fam Zheng f...@redhat.com Signed-off-by: John Snow js...@redhat.com --- include/qemu/hbitmap.h | 8 util/hbitmap.c | 16 2 files

Re: [Qemu-devel] [PATCH v8 05/10] block: Add bdrv_copy_dirty_bitmap and bdrv_reset_dirty_bitmap

2014-11-27 Thread Max Reitz
On 2014-11-26 at 18:41, John Snow wrote: From: Fam Zheng f...@redhat.com Signed-off-by: Fam Zheng f...@redhat.com Signed-off-by: John Snow js...@redhat.com --- block.c | 35 +++ include/block/block.h | 4 2 files changed, 35 insertions(+),

Re: [Qemu-devel] [Qemu-stable] [2.2 PATCH] virtio-net: fix unmap leak

2014-11-27 Thread Jason Wang
On 11/27/2014 05:08 PM, Fam Zheng wrote: On Thu, 11/27 13:59, Jason Wang wrote: virtio_net_handle_ctrl() and other functions that process control vq request call iov_discard_front() which will shorten the iov. This will lead unmapping in virtqueue_push() leaks mapping. Fixes this by

Re: [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support

2014-11-27 Thread Max Reitz
On 2014-11-27 at 10:30, Max Reitz wrote: On 2014-11-13 at 11:36, Mao Chuan Li wrote: Currently the qemu-iotest framework is focused on the x86 platform. The suite should be usable by other platforms as well. To enable multi-platform usage, this patch set enhances the framework scripts to

Re: [Qemu-devel] [RFC PATCH 2/3] raw-posix: Convert Linux AIO submission to coroutines

2014-11-27 Thread Peter Lieven
On 26.11.2014 15:46, Kevin Wolf wrote: This improves the performance of requests because an ACB doesn't need to be allocated on the heap any more. It also makes the code nicer and smaller. As a side effect, the codepath taken by aio=threads is changed to use paio_submit_co(). This doesn't

Re: [Qemu-devel] [RFC PATCH v5 00/31] Deterministic replay and reverse execution

2014-11-27 Thread Artyom Tarasenko
On Wed, Nov 26, 2014 at 11:47 AM, Pavel Dovgaluk pavel.dovga...@ispras.ru wrote: That covermail was wrong. Here is the correct one: This set of patches is related to the reverse execution and deterministic replay of qemu execution This implementation of deterministic replay can be used for

Re: [Qemu-devel] [PATCH] qemu-char: fix tcp_get_fds

2014-11-27 Thread Markus Armbruster
Markus Armbruster arm...@redhat.com writes: Michael S. Tsirkin m...@redhat.com writes: On Mon, Nov 03, 2014 at 05:13:15PM +0100, Markus Armbruster wrote: Michael S. Tsirkin m...@redhat.com writes: On Mon, Nov 03, 2014 at 04:09:36PM +0100, Markus Armbruster wrote: Michael S. Tsirkin

Re: [Qemu-devel] [PATCH v8 06/10] qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable

2014-11-27 Thread Max Reitz
On 2014-11-26 at 18:41, John Snow wrote: From: Fam Zheng f...@redhat.com This allows to put the dirty bitmap into a disabled state where no more writes will be tracked. It will be used before backup or writing to persistent file. Signed-off-by: Fam Zheng f...@redhat.com Signed-off-by: John

[Qemu-devel] [2.2 PATCH V2] virtio-net: fix unmap leak

2014-11-27 Thread Jason Wang
virtio_net_handle_ctrl() and other functions that process control vq request call iov_discard_front() which will shorten the iov. This will lead unmapping in virtqueue_push() leaks mapping. Fixes this by keeping the original iov untouched and using a temp variable in those functions. Cc: Wen

[Qemu-devel] Help: Convert HDD to QCOW2 img

2014-11-27 Thread Halsey Pian
Hi All, Recently, I'm writing an interface of wrapper class for QCOW2 in order to manage QCOW2 img files conveniently based on our requirements in my current project , this wrapper includes functions such as QCOW2 creating, read/write and snapshot relatives. Actually, these functions would

Re: [Qemu-devel] [PATCH] mips: kvm: do not use get_clock()

2014-11-27 Thread James Hogan
On 26/11/14 14:01, Paolo Bonzini wrote: Use the external qemu-timer API instead. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Acked-by: James Hogan james.ho...@imgtec.com Thanks James --- target-mips/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-devel] [RFC PATCH] vring: calculate descriptor address directly

2014-11-27 Thread Peter Lieven
vring_map causes a huge overhead by calling memory_region_find everytime. the vring_map is executed already on vring_setup and there is also the memory region referenced. Signed-off-by: Peter Lieven p...@kamp.de --- hw/virtio/dataplane/vring.c | 51 +--

Re: [Qemu-devel] [PATCH v8 07/10] qmp: Add support of dirty-bitmap sync mode for drive-backup

2014-11-27 Thread Max Reitz
On 2014-11-26 at 18:41, John Snow wrote: From: Fam Zheng f...@redhat.com For dirty-bitmap sync mode, the block job will iterate through the given dirty bitmap to decide if a sector needs backup (backup all the dirty clusters and skip clean ones), just as allocation conditions of top sync mode.

Re: [Qemu-devel] [PATCH v4 1/6] hw/arm/boot: load_dtb becomes non static arm_load_dtb

2014-11-27 Thread Shannon Zhao
On 2014/11/27 17:19, Eric Auger wrote: On 11/27/2014 10:00 AM, Shannon Zhao wrote: Hi Eric, On 2014/10/31 21:53, Eric Auger wrote: load_dtb is renamed into arm_load_dtb and becomes non static. it will be used by machvirt for dynamic instantiation of platform devices Signed-off-by: Eric

Re: [Qemu-devel] [PATCH v8 08/10] qapi: Add transaction support to block-dirty-bitmap-{add, enable, disable}

2014-11-27 Thread Max Reitz
On 2014-11-26 at 18:41, John Snow wrote: From: Fam Zheng f...@redhat.com This adds three qmp commands to transactions. Users can stop a dirty bitmap, start backup of it, and start another dirty bitmap atomically, so that the dirty bitmap is tracked incrementally and we don't miss any write.

Re: [Qemu-devel] [PATCH v8 09/10] qmp: Add dirty bitmap 'enabled' field in query-block

2014-11-27 Thread Max Reitz
On 2014-11-26 at 18:41, John Snow wrote: From: Fam Zheng f...@redhat.com Signed-off-by: Fam Zheng f...@redhat.com Signed-off-by: John Snow js...@redhat.com --- block.c | 1 + qapi/block-core.json | 5 - 2 files changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Max

Re: [Qemu-devel] [PATCH v8 10/10] qemu-iotests: Add tests for drive-backup sync=dirty-bitmap

2014-11-27 Thread Max Reitz
On 2014-11-26 at 18:41, John Snow wrote: From: Fam Zheng f...@redhat.com Signed-off-by: Fam Zheng f...@redhat.com Signed-off-by: John Snow js...@redhat.com --- tests/qemu-iotests/056| 33 ++--- tests/qemu-iotests/056.out| 4 ++--

[Qemu-devel] [RFC PATCH 2/3] block/block-backend.c: remove coroutine pool reservation

2014-11-27 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block/block-backend.c |6 -- 1 file changed, 6 deletions(-) diff --git a/block/block-backend.c b/block/block-backend.c index d0692b1..cf36ffb 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -15,9 +15,6 @@ #include

Re: [Qemu-devel] [2.2 PATCH V2] virtio-net: fix unmap leak

2014-11-27 Thread Stefano Stabellini
On Thu, 27 Nov 2014, Jason Wang wrote: virtio_net_handle_ctrl() and other functions that process control vq request call iov_discard_front() which will shorten the iov. This will lead unmapping in virtqueue_push() leaks mapping. Fixes this by keeping the original iov untouched and using a

[Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread for the pool

2014-11-27 Thread Peter Lieven
This patch creates a ring structure for the coroutine pool instead of a linked list. The implementation of the list has the issue that it always throws aways the latest coroutines instead of the oldest ones. This is a drawback since the latest used coroutines are more likely cached than old ones.

Re: [Qemu-devel] [PATCH 0/2] virtfs-proxy-helper: Fix Coverity warning

2014-11-27 Thread Gonglei
On 2014/11/13 20:17, Gonglei (Arei) wrote: From: Gonglei arei.gong...@huawei.com Gonglei (2): virtfs-proxy-helper: Fix possible socket leak. virtfs-proxy-helper: Fix handle leak to make Coverity happy fsdev/virtfs-proxy-helper.c | 16 1 file changed, 12

Re: [Qemu-devel] [2.2 PATCH V2] virtio-net: fix unmap leak

2014-11-27 Thread Fam Zheng
On Thu, 11/27 18:04, Jason Wang wrote: virtio_net_handle_ctrl() and other functions that process control vq request call iov_discard_front() which will shorten the iov. This will lead unmapping in virtqueue_push() leaks mapping. Fixes this by keeping the original iov untouched and using a

[Qemu-devel] [RFC PATCH 0/3] qemu-coroutine: use a ring per thread for the pool

2014-11-27 Thread Peter Lieven
This series removes the need for locking the coroutine pool. During collection of perf data it showed up that there is serious time spend in locking the coroutine pool during heavy I/O from the vServer. This also needs serious benchmarking. Using Kevins qemu-img bench there is a 3-4% speedup.

Re: [Qemu-devel] [PATCH v4 1/6] hw/arm/boot: load_dtb becomes non static arm_load_dtb

2014-11-27 Thread Eric Auger
On 11/27/2014 11:17 AM, Shannon Zhao wrote: On 2014/11/27 17:19, Eric Auger wrote: On 11/27/2014 10:00 AM, Shannon Zhao wrote: Hi Eric, On 2014/10/31 21:53, Eric Auger wrote: load_dtb is renamed into arm_load_dtb and becomes non static. it will be used by machvirt for dynamic instantiation

[Qemu-devel] [RFC PATCH 1/3] Revert coroutine: make pool size dynamic

2014-11-27 Thread Peter Lieven
This reverts commit ac2662a913ee5854b1269256adbdc14e57ba480a. --- include/block/coroutine.h | 11 --- qemu-coroutine.c | 26 +++--- 2 files changed, 3 insertions(+), 34 deletions(-) diff --git a/include/block/coroutine.h b/include/block/coroutine.h index

Re: [Qemu-devel] [PATCH RFC v3 11/12] virtio-net/virtio-blk: enable virtio 1.0

2014-11-27 Thread Cornelia Huck
On Wed, 26 Nov 2014 20:50:05 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Wed, Nov 26, 2014 at 06:28:42PM +0100, Cornelia Huck wrote: virtio-net (non-vhost) and virtio-blk have everything in place to support virtio 1.0: let's enable the feature bit for them. Hmm I doubt that. At

Re: [Qemu-devel] [Xen-devel] [PATCH] increase maxmem before calling xc_domain_populate_physmap

2014-11-27 Thread Stefano Stabellini
On Wed, 26 Nov 2014, Don Slutz wrote: On 11/26/14 13:17, Stefano Stabellini wrote: On Tue, 25 Nov 2014, Andrew Cooper wrote: On 25/11/14 17:45, Stefano Stabellini wrote: Increase maxmem before calling xc_domain_populate_physmap_exact to avoid the risk of running out of guest memory.

Re: [Qemu-devel] [RfC PATCH] hid: handle full ptr queues in post_load

2014-11-27 Thread Gerd Hoffmann
Hi, +evt = s-ptr.queue[(s-head+s-n) QUEUE_MASK]; s-n is QUEUE_LENGTH, can we directly delete it? evt = s-ptr.queue[s-head QUEUE_MASK] I prefer to make clear in the code that we want the last ring element not the first and leave in the +n, even if we could take it out.

Re: [Qemu-devel] [PATCH 2/2] balloon: add a feature bit to let Guest OS deflate balloon on oom

2014-11-27 Thread Denis V. Lunev
On 26/11/14 14:16, Michael S. Tsirkin wrote: On Wed, Nov 26, 2014 at 01:11:25PM +0300, Denis V. Lunev wrote: From: Raushaniya Maksudova rmaksud...@parallels.com Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms

Re: [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support

2014-11-27 Thread Michael Mueller
On Thu, 27 Nov 2014 10:30:33 +0100 Max Reitz mre...@redhat.com wrote: On 2014-11-13 at 11:36, Mao Chuan Li wrote: Currently the qemu-iotest framework is focused on the x86 platform. The suite should be usable by other platforms as well. To enable multi-platform usage, this patch set

Re: [Qemu-devel] [PATCH] Fix for crash after migration in virtio-rng on bi-endian targets

2014-11-27 Thread Amit Shah
(actually adding Greg) On (Thu) 27 Nov 2014 [14:38:42], Amit Shah wrote: On (Thu) 27 Nov 2014 [16:48:10], David Gibson wrote: VirtIO devices now remember which endianness they're operating in in order to support targets which may have guests of either endianness, such as powerpc. This

Re: [Qemu-devel] [PATCH] hmp: fix regression of HMP device_del auto-completion

2014-11-27 Thread Marcel Apfelbaum
On Wed, 2014-11-26 at 13:05 -0500, Luiz Capitulino wrote: On Wed, 26 Nov 2014 13:50:01 +0200 Marcel Apfelbaum marce...@redhat.com wrote: The commits: - 6a1fa9f5 (monitor: add del completion for peripheral device) - 66e56b13 (qdev: add qdev_build_hotpluggable_device_list helper)

Re: [Qemu-devel] [PATCH 2/2] balloon: add a feature bit to let Guest OS deflate balloon on oom

2014-11-27 Thread Michael S. Tsirkin
On Thu, Nov 27, 2014 at 02:04:55PM +0300, Denis V. Lunev wrote: On 26/11/14 14:16, Michael S. Tsirkin wrote: On Wed, Nov 26, 2014 at 01:11:25PM +0300, Denis V. Lunev wrote: From: Raushaniya Maksudova rmaksud...@parallels.com Excessive virtio_balloon inflation can cause invocation of

Re: [Qemu-devel] [RfC PATCH] hid: handle full ptr queues in post_load

2014-11-27 Thread Gonglei
On 2014/11/27 19:04, Gerd Hoffmann wrote: Hi, +evt = s-ptr.queue[(s-head+s-n) QUEUE_MASK]; s-n is QUEUE_LENGTH, can we directly delete it? evt = s-ptr.queue[s-head QUEUE_MASK] I prefer to make clear in the code that we want the last ring element not the first and leave in

Re: [Qemu-devel] [RfC PATCH] hid: handle full ptr queues in post_load

2014-11-27 Thread Gerd Hoffmann
On Do, 2014-11-27 at 19:16 +0800, Gonglei wrote: On 2014/11/27 19:04, Gerd Hoffmann wrote: Hi, +evt = s-ptr.queue[(s-head+s-n) QUEUE_MASK]; s-n is QUEUE_LENGTH, can we directly delete it? evt = s-ptr.queue[s-head QUEUE_MASK] I prefer to make clear in the code

Re: [Qemu-devel] [RfC PATCH] hid: handle full ptr queues in post_load

2014-11-27 Thread Gonglei
On 2014/11/27 19:19, Gerd Hoffmann wrote: On Do, 2014-11-27 at 19:16 +0800, Gonglei wrote: On 2014/11/27 19:04, Gerd Hoffmann wrote: Hi, +evt = s-ptr.queue[(s-head+s-n) QUEUE_MASK]; s-n is QUEUE_LENGTH, can we directly delete it? evt = s-ptr.queue[s-head QUEUE_MASK] I

Re: [Qemu-devel] [PATCH] hmp: fix regression of HMP device_del auto-completion

2014-11-27 Thread Marcel Apfelbaum
On Thu, 2014-11-27 at 13:11 +0200, Marcel Apfelbaum wrote: On Wed, 2014-11-26 at 13:05 -0500, Luiz Capitulino wrote: On Wed, 26 Nov 2014 13:50:01 +0200 Marcel Apfelbaum marce...@redhat.com wrote: The commits: - 6a1fa9f5 (monitor: add del completion for peripheral device) -

Re: [Qemu-devel] [PATCH v1 RFC 0/9] Update tests/qemu-iotests cases for multi-platform support

2014-11-27 Thread Kevin Wolf
Am 27.11.2014 um 12:08 hat Michael Mueller geschrieben: On Thu, 27 Nov 2014 10:30:33 +0100 Max Reitz mre...@redhat.com wrote: On 2014-11-13 at 11:36, Mao Chuan Li wrote: Currently the qemu-iotest framework is focused on the x86 platform. The suite should be usable by other

Re: [Qemu-devel] [PATCH for-2.2] qemu-timer: Avoid overflows when converting timeout to struct timespec

2014-11-27 Thread Peter Maydell
On 26 November 2014 at 03:09, Fam Zheng f...@redhat.com wrote: On Tue, 11/25 18:21, Peter Maydell wrote: In qemu_poll_ns(), when we convert an int64_t nanosecond timeout into a struct timespec, we may accidentally run into overflow problems if the timeout is very long. This happens because the

Re: [Qemu-devel] [PATCH] hmp: fix regression of HMP device_del auto-completion

2014-11-27 Thread Zhu Guihua
On Thu, 2014-11-27 at 13:11 +0200, Marcel Apfelbaum wrote: On Wed, 2014-11-26 at 13:05 -0500, Luiz Capitulino wrote: On Wed, 26 Nov 2014 13:50:01 +0200 Marcel Apfelbaum marce...@redhat.com wrote: The commits: - 6a1fa9f5 (monitor: add del completion for peripheral device) -

Re: [Qemu-devel] [PATCH] hmp: fix regression of HMP device_del auto-completion

2014-11-27 Thread Marcel Apfelbaum
On Thu, 2014-11-27 at 19:35 +0800, Zhu Guihua wrote: On Thu, 2014-11-27 at 13:11 +0200, Marcel Apfelbaum wrote: On Wed, 2014-11-26 at 13:05 -0500, Luiz Capitulino wrote: On Wed, 26 Nov 2014 13:50:01 +0200 Marcel Apfelbaum marce...@redhat.com wrote: The commits: - 6a1fa9f5

[Qemu-devel] [PATCH 1/2] balloon: call qdev_alias_all_properties for proxy dev in balloon class init

2014-11-27 Thread Denis V. Lunev
The idea is that all other virtio devices are calling this helper to merge properties of the proxy device. This is the only difference in between this helper and code in inside virtio_instance_init_common. The patch should not cause any harm as property list in generic balloon code is empty. This

[Qemu-devel] [PATCH 2/2] balloon: add a feature bit to let Guest OS deflate balloon on oom

2014-11-27 Thread Denis V. Lunev
Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often the case that these control tools does not have enough time to react on fast

Re: [Qemu-devel] [PATCH 2/2] balloon: add a feature bit to let Guest OS deflate balloon on oom

2014-11-27 Thread Andrey Korolyov
On Thu, Nov 27, 2014 at 2:45 PM, Denis V. Lunev d...@openvz.org wrote: Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often

[Qemu-devel] [PATCH v2 0/2] balloon: add a feature bit to let Guest OS deflate virtio_balloon on OOM

2014-11-27 Thread Denis V. Lunev
Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often the case that these control tools does not have enough time to react on fast

Re: [Qemu-devel] [PATCH] hmp: fix regression of HMP device_del auto-completion

2014-11-27 Thread Zhu Guihua
On Thu, 2014-11-27 at 13:41 +0200, Marcel Apfelbaum wrote: On Thu, 2014-11-27 at 19:35 +0800, Zhu Guihua wrote: On Thu, 2014-11-27 at 13:11 +0200, Marcel Apfelbaum wrote: On Wed, 2014-11-26 at 13:05 -0500, Luiz Capitulino wrote: On Wed, 26 Nov 2014 13:50:01 +0200 Marcel Apfelbaum

Re: [Qemu-devel] [PATCH v4 5/6] hw/arm/sysbus-fdt: helpers for platform bus nodes addition

2014-11-27 Thread Shannon Zhao
On 2014/10/31 21:53, Eric Auger wrote: This new C module will be used by ARM machine files to generate platform bus node and their dynamic sysbus device tree nodes. Dynamic sysbus device node addition is done in a machine init done notifier. arm_register_platform_bus_fdt_creator does the

[Qemu-devel] [Bug] : write back operation in ld /st [aarch64] inst

2014-11-27 Thread Gaurav Sharma
As per arm specs, if the src and dest register are same, write back operation is suppressed. [Specs] if memop == MemOp_LOAD wback n == t n != 31 then c = ConstrainUnpredictable(); assert c IN {Constraint_WBSUPPRESS, Constraint_UNKNOWN, Constraint_UNDEF, Constraint_NOP}; case c of when

Re: [Qemu-devel] [PATCH] hmp: fix regression of HMP device_del auto-completion

2014-11-27 Thread Marcel Apfelbaum
On Thu, 2014-11-27 at 20:08 +0800, Zhu Guihua wrote: On Thu, 2014-11-27 at 13:41 +0200, Marcel Apfelbaum wrote: On Thu, 2014-11-27 at 19:35 +0800, Zhu Guihua wrote: On Thu, 2014-11-27 at 13:11 +0200, Marcel Apfelbaum wrote: On Wed, 2014-11-26 at 13:05 -0500, Luiz Capitulino wrote:

Re: [Qemu-devel] [PATCH 2/2] balloon: add a feature bit to let Guest OS deflate balloon on oom

2014-11-27 Thread Denis V. Lunev
On 27/11/14 14:50, Andrey Korolyov wrote: On Thu, Nov 27, 2014 at 2:45 PM, Denis V. Lunev d...@openvz.org wrote: Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon

Re: [Qemu-devel] [PATCH v4 5/6] hw/arm/sysbus-fdt: helpers for platform bus nodes addition

2014-11-27 Thread Eric Auger
On 11/27/2014 01:07 PM, Shannon Zhao wrote: On 2014/10/31 21:53, Eric Auger wrote: This new C module will be used by ARM machine files to generate platform bus node and their dynamic sysbus device tree nodes. Dynamic sysbus device node addition is done in a machine init done notifier.

Re: [Qemu-devel] [PATCH 2/2] balloon: add a feature bit to let Guest OS deflate balloon on oom

2014-11-27 Thread Michael S. Tsirkin
On Thu, Nov 27, 2014 at 03:50:11PM +0400, Andrey Korolyov wrote: On Thu, Nov 27, 2014 at 2:45 PM, Denis V. Lunev d...@openvz.org wrote: Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for

Re: [Qemu-devel] [RfC PATCH] hid: handle full ptr queues in post_load

2014-11-27 Thread Gonglei
On 2014/11/27 19:22, Gonglei wrote: On 2014/11/27 19:19, Gerd Hoffmann wrote: On Do, 2014-11-27 at 19:16 +0800, Gonglei wrote: On 2014/11/27 19:04, Gerd Hoffmann wrote: Hi, +evt = s-ptr.queue[(s-head+s-n) QUEUE_MASK]; s-n is QUEUE_LENGTH, can we directly delete it? evt =

[Qemu-devel] [RFC 0/6] memory: make dirty_memory[] accesses atomic

2014-11-27 Thread Stefan Hajnoczi
The dirty_memory[] bitmap is used for live migration, TCG self-modifying code detection, and VGA emulation. Up until now the bitmap was always accessed under the QEMU global mutex. This series makes all dirty_memory[] accesses atomic to prepare the way for threads writing to guest memory without

[Qemu-devel] [RFC 2/6] bitmap: add atomic test and clear

2014-11-27 Thread Stefan Hajnoczi
The new bitmap_test_and_clear_atomic() function clears a range and returns whether or not the bits were set. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- include/qemu/bitmap.h | 2 ++ util/bitmap.c | 26 ++ 2 files changed, 28 insertions(+) diff --git

[Qemu-devel] [RFC 4/6] migration: move dirty bitmap sync to ram_addr.h

2014-11-27 Thread Stefan Hajnoczi
The dirty memory bitmap is managed by ram_addr.h and copied to migration_bitmap[] periodically during live migration. Move the code to sync the bitmap to ram_addr.h where related code lives. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- arch_init.c | 46

[Qemu-devel] [RFC 1/6] bitmap: add atomic set functions

2014-11-27 Thread Stefan Hajnoczi
Use atomic_or() for atomic bitmaps where several threads may set bits at the same time. This avoids the race condition between threads loading an element, bitwise ORing, and then storing the element. Most bitmap users don't need atomicity so introduce new functions. Signed-off-by: Stefan

[Qemu-devel] [RFC 5/6] memory: replace cpu_physical_memory_reset_dirty() with test-and-clear

2014-11-27 Thread Stefan Hajnoczi
The cpu_physical_memory_reset_dirty() function is sometimes used together with cpu_physical_memory_get_dirty(). This is not atomic since two separate accesses to the dirty memory bitmap are made. Turn cpu_physical_memory_reset_dirty() into the atomic cpu_physical_memory_test_and_clear_dirty().

[Qemu-devel] [RFC 3/6] memory: use atomic ops for setting dirty memory bits

2014-11-27 Thread Stefan Hajnoczi
Use set_bit_atomic() and bitmap_set_atomic() so that multiple threads can dirty memory without race conditions. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- I had to get creative to stay under 80 characters per line. I'm open to suggestions if you prefer me to format it another way.

[Qemu-devel] [RFC 6/6] memory: make cpu_physical_memory_sync_dirty_bitmap() fully atomic

2014-11-27 Thread Stefan Hajnoczi
The fast path of cpu_physical_memory_sync_dirty_bitmap() directly manipulates the dirty bitmap. Use atomic_xchg() to make the test-and-clear atomic. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- include/exec/ram_addr.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

Re: [Qemu-devel] [PATCH 2/2] balloon: add a feature bit to let Guest OS deflate balloon on oom

2014-11-27 Thread Michael S. Tsirkin
On Thu, Nov 27, 2014 at 02:45:42PM +0300, Denis V. Lunev wrote: Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often the case

Re: [Qemu-devel] [2.2 PATCH V2] virtio-net: fix unmap leak

2014-11-27 Thread Michael S. Tsirkin
On Thu, Nov 27, 2014 at 06:04:03PM +0800, Jason Wang wrote: virtio_net_handle_ctrl() and other functions that process control vq request call iov_discard_front() which will shorten the iov. This will lead unmapping in virtqueue_push() leaks mapping. Fixes this by keeping the original iov

Re: [Qemu-devel] [PATCH 2/2] balloon: add a feature bit to let Guest OS deflate balloon on oom

2014-11-27 Thread Denis V. Lunev
On 27/11/14 15:31, Michael S. Tsirkin wrote: On Thu, Nov 27, 2014 at 02:45:42PM +0300, Denis V. Lunev wrote: Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory

Re: [Qemu-devel] [PATCH] hmp: fix regression of HMP device_del auto-completion

2014-11-27 Thread Igor Mammedov
On Thu, 27 Nov 2014 13:41:07 +0200 Marcel Apfelbaum marce...@redhat.com wrote: On Thu, 2014-11-27 at 19:35 +0800, Zhu Guihua wrote: On Thu, 2014-11-27 at 13:11 +0200, Marcel Apfelbaum wrote: On Wed, 2014-11-26 at 13:05 -0500, Luiz Capitulino wrote: On Wed, 26 Nov 2014 13:50:01 +0200

Re: [Qemu-devel] [Bug] : write back operation in ld /st [aarch64] inst

2014-11-27 Thread Peter Maydell
On 27 November 2014 at 12:15, Gaurav Sharma gauravs.2...@gmail.com wrote: As per arm specs, if the src and dest register are same, write back operation is suppressed. [Specs] if memop == MemOp_LOAD wback n == t n != 31 then c = ConstrainUnpredictable(); assert c IN {Constraint_WBSUPPRESS,

Re: [Qemu-devel] [2.2 PATCH V2] virtio-net: fix unmap leak

2014-11-27 Thread Peter Maydell
On 27 November 2014 at 12:33, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Nov 27, 2014 at 06:04:03PM +0800, Jason Wang wrote: virtio_net_handle_ctrl() and other functions that process control vq request call iov_discard_front() which will shorten the iov. This will lead unmapping in

[Qemu-devel] [PATCH 2/2] balloon: add a feature bit to let Guest OS deflate balloon on oom

2014-11-27 Thread Denis V. Lunev
Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often the case that these control tools does not have enough time to react on fast

[Qemu-devel] [PATCH v3 0/2] balloon: add a feature bit to let Guest OS deflate virtio_balloon on OOM

2014-11-27 Thread Denis V. Lunev
Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often the case that these control tools does not have enough time to react on fast

[Qemu-devel] [PATCH 1/2] balloon: call qdev_alias_all_properties for proxy dev in balloon class init

2014-11-27 Thread Denis V. Lunev
The idea is that all other virtio devices are calling this helper to merge properties of the proxy device. This is the only difference in between this helper and code in inside virtio_instance_init_common. The patch should not cause any harm as property list in generic balloon code is empty. This

Re: [Qemu-devel] [2.2 PATCH V2 for-4.5] virtio-net: fix unmap leak

2014-11-27 Thread Stefano Stabellini
Konrad, I think we should have this fix in 4.5: without it vif=[ 'model=virtio-net' ] crashes QEMU. On Thu, 27 Nov 2014, Peter Maydell wrote: On 27 November 2014 at 12:33, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Nov 27, 2014 at 06:04:03PM +0800, Jason Wang wrote:

Re: [Qemu-devel] [PATCH 2/2] virtfs-proxy-helper: Fix handle leak to make Coverity happy

2014-11-27 Thread Markus Armbruster
arei.gong...@huawei.com writes: From: Gonglei arei.gong...@huawei.com Coverity report: (94) Event open_fn: Returning handle opened by function proxy_socket(char const *, uid_t, gid_t). [details] (95) Event var_assign: Assigning: sock = handle returned from proxy_socket(sock_name,

Re: [Qemu-devel] [Bug] : write back operation in ld /st [aarch64] inst

2014-11-27 Thread Gaurav Sharma
I was taking into consideration the behavior of afm, which it seems suppresses write back. However, i do get your point on this. Regards, Gaurav On Thu, Nov 27, 2014 at 6:10 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 27 November 2014 at 12:15, Gaurav Sharma gauravs.2...@gmail.com

Re: [Qemu-devel] [PATCH 1/2] virtfs-proxy-helper: Fix possible socket leak.

2014-11-27 Thread Markus Armbruster
arei.gong...@huawei.com writes: From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Markus Armbruster arm...@redhat.com

[Qemu-devel] [BUG] Redhat-6.4_64bit-guest kernel panic with cpu-passthrough and guest numa

2014-11-27 Thread Gonglei (Arei)
Hi, Running a redhat-6.4-64bit (kernel 2.6.32-358.el6.x86_64) or elder guest on qemu-2.1, with kvm enabled and -cpu host, non default cpu-topology and guest numa I'm seeing a reliable kernel panic from the guest shortly after boot. It is happening in find_busiest_group(). We also found it

Re: [Qemu-devel] [PATCH v4 5/6] hw/arm/sysbus-fdt: helpers for platform bus nodes addition

2014-11-27 Thread Shannon Zhao
On 2014/11/27 20:25, Eric Auger wrote: On 11/27/2014 01:07 PM, Shannon Zhao wrote: On 2014/10/31 21:53, Eric Auger wrote: This new C module will be used by ARM machine files to generate platform bus node and their dynamic sysbus device tree nodes. Dynamic sysbus device node addition is done

Re: [Qemu-devel] [BUG] Redhat-6.4_64bit-guest kernel panic with cpu-passthrough and guest numa

2014-11-27 Thread Gonglei (Arei)
Cc'ing Paolo and BenoƮt. Best regards, -Gonglei -Original Message- From: Gonglei (Arei) Sent: Thursday, November 27, 2014 8:58 PM To: qemu-devel@nongnu.org Subject: [BUG] Redhat-6.4_64bit-guest kernel panic with cpu-passthrough and guest numa Hi, Running a redhat-6.4-64bit

Re: [Qemu-devel] [Bug] : write back operation in ld /st [aarch64] inst

2014-11-27 Thread Peter Maydell
On 27 November 2014 at 12:49, Gaurav Sharma gauravs.2...@gmail.com wrote: I was taking into consideration the behavior of afm, which it seems suppresses write back. The Fast Models are just one implementation -- like every other implementation, they have to choose a kind of unpredictable

Re: [Qemu-devel] [PATCH v4 5/6] hw/arm/sysbus-fdt: helpers for platform bus nodes addition

2014-11-27 Thread Alexander Graf
On 27.11.14 13:56, Shannon Zhao wrote: On 2014/11/27 20:25, Eric Auger wrote: On 11/27/2014 01:07 PM, Shannon Zhao wrote: On 2014/10/31 21:53, Eric Auger wrote: This new C module will be used by ARM machine files to generate platform bus node and their dynamic sysbus device tree nodes.

  1   2   3   >