[Qemu-devel] [PATCH V3 2/2] block/nfs: fix naming of runtime opts

2017-02-01 Thread Peter Lieven
, but the 2.8 release is the only version that had the wrong naming. Furthermore release 2.8 suffered from a NULL pointer dereference during URI parsing. Fixes: 94d6a7a76e9df9919629428f6c598e2b97d9426c Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven <p...@kamp.de> --- block/nfs.

Re: [Qemu-devel] [PATCH V2 2/2] block/nfs: fix naming of runtime opts

2017-02-01 Thread Peter Lieven
Am 01.02.2017 um 02:06 schrieb Max Reitz: > On 31.01.2017 16:56, Peter Lieven wrote: >> commit 94d6a7a accidently left the naming of runtime opts and QAPI >> scheme inconsistent. As one consequence passing of parameters in the >> URI is broken. Sync the naming of the run

[Qemu-devel] [PATCH V2 2/2] block/nfs: fix naming of runtime opts

2017-01-31 Thread Peter Lieven
, but the 2.8 release is the only version that had the wrong naming. Furthermore release 2.8 suffered from a NULL pointer deference during URI parsing. Fixes: 94d6a7a76e9df9919629428f6c598e2b97d9426c Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Eric Blak

[Qemu-devel] [PATCH V2 0/2] fix segfault and naming of runtime opts

2017-01-31 Thread Peter Lieven
ric] Peter Lieven (2): block/nfs: fix NULL pointer dereference in URI parsing block/nfs: fix naming of runtime opts block/nfs.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) -- 1.9.1

[Qemu-devel] [PATCH V2 1/2] block/nfs: fix NULL pointer dereference in URI parsing

2017-01-31 Thread Peter Lieven
parse_uint_full wants to put the parsed value into the variable passed via its second argument which is NULL. Fixes: 94d6a7a76e9df9919629428f6c598e2b97d9426c Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Eric Blake <ebl...@redhat.com> --- blo

[Qemu-devel] [PATCH] qga: ignore EBUSY when freezing a filesystem

2017-01-31 Thread Peter Lieven
the current implementation fails if we try to freeze an already frozen filesystem. This can happen if a filesystem is mounted more than once (e.g. with a bind mount). Suggested-by: Christian Theune <c...@flyingcircus.io> Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven <p..

[Qemu-devel] [PATCH] block/iscsi: statically link qemu_iscsi_opts

2017-01-24 Thread Peter Lieven
commit f57b4b5f moved qemu_iscsi_opts into vl.c. This made them invisible for qemu-img, qemu-nbd etc. Fixes: f57b4b5fb127b60e1aade2684a8b16bc4f630b29 Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven <p...@kamp.de> --- MAINTAINERS | 1 + block/Makefile.objs | 1 + block

Re: [Qemu-devel] [PATCH] block/iscsi: statically link qemu_iscsi_opts

2017-01-24 Thread Peter Lieven
Am 24.01.2017 um 13:52 schrieb Paolo Bonzini: On 24/01/2017 13:49, Peter Lieven wrote: +#ifdef CONFIG_LIBISCSI The #ifdef is not needed here. Right, can you drop it or shall I send a V2? Peter Paolo +static QemuOptsList qemu_iscsi_opts = { +.name = "iscsi",

Re: [Qemu-devel] qemu-img: complains about missing iscsi option group

2017-01-24 Thread Peter Lieven
Am 24.01.2017 um 12:24 schrieb Paolo Bonzini: On 19/01/2017 18:03, Daniel P. Berrange wrote: Move the iscsi option registration out of vl.c and back into a shared file in block/ such that all programs see the options, not just the emulators. Any preference which file? It seems no other block

Re: [Qemu-devel] qemu-img: complains about missing iscsi option group

2017-01-24 Thread Peter Lieven
Am 24.01.2017 um 12:29 schrieb Paolo Bonzini: On 24/01/2017 12:25, Peter Lieven wrote: Am 24.01.2017 um 12:24 schrieb Paolo Bonzini: On 19/01/2017 18:03, Daniel P. Berrange wrote: Move the iscsi option registration out of vl.c and back into a shared file in block/ such that all programs see

Re: [Qemu-devel] [PATCH V2] qemu-img: optimize is_allocated_sectors_min

2017-01-23 Thread Peter Lieven
Am 21.01.2017 um 20:58 schrieb Max Reitz: On 19.01.2017 17:35, Peter Lieven wrote: the current implementation always splits requests if a buffer begins or ends with zeroes independent of the length of the zero area. Change this to really only split off zero areas that have at least a length

[Qemu-devel] [PATCH 2/2] block/nfs: fix naming of runtime opts

2017-01-20 Thread Peter Lieven
-by: Peter Lieven <p...@kamp.de> --- block/nfs.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index baaecff..464d547 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -359,27 +359,27 @@ static QemuOptsList runtim

[Qemu-devel] [PATCH 1/2] block/nfs: fix NULL pointer dereference in URI parsing

2017-01-20 Thread Peter Lieven
parse_uint_full wants to put the parsed value into the variabled passed via its second argument which is NULL. Fixes: 94d6a7a76e9df9919629428f6c598e2b97d9426c Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven <p...@kamp.de> --- block/nfs.c | 3 ++- 1 file changed, 2 insertions

[Qemu-devel] [PATCH 0/2] block/nfs: fix segfault and naming of runtime opts

2017-01-20 Thread Peter Lieven
commit 94d6a7a accidently left the naming of runtime opts and QAPI scheme inconsistent. Furthermore a NULL pointer dereference resulted in a segfault when parsing URI parameters. Peter Lieven (2): block/nfs: fix NULL pointer dereference in URI parsing block/nfs: fix naming of runtime opts

Re: [Qemu-devel] [PATCH v6 0/2] allow blockdev-add for NFS

2017-01-19 Thread Peter Lieven
Am 19.01.2017 um 18:08 schrieb Kevin Wolf: Am 19.01.2017 um 16:58 hat Peter Lieven geschrieben: Am 19.01.2017 um 16:55 schrieb Kevin Wolf: Am 19.01.2017 um 16:44 hat Peter Lieven geschrieben: Am 19.01.2017 um 16:42 schrieb Kevin Wolf: Am 19.01.2017 um 16:34 hat Peter Lieven geschrieben: Am

Re: [Qemu-devel] qemu-img: complains about missing iscsi option group

2017-01-19 Thread Peter Lieven
Am 19.01.2017 um 17:38 schrieb Daniel P. Berrange: On Thu, Jan 19, 2017 at 05:30:20PM +0100, Peter Lieven wrote: Hi all, since commit f57b4b5 (blockdev: prepare iSCSI block driver for dynamic loading) qemu-img complains about a missing option group several times. ~/git/qemu$ ./qemu-img

[Qemu-devel] [PATCH] bitmap: assert that start and nr are non negative

2017-01-19 Thread Peter Lieven
commit e1123a3b introduced a data corruption regression in the iscsi driver because it passed -1 as nr to bitmap_set and bitmap_clear. Add an assertion to catch such flaws earlier. Suggested-by: Fam Zheng <f...@redhat.com> Signed-off-by: Peter Lieven <p...@kamp.de> --- util/

[Qemu-devel] [PATCH V2] qemu-img: optimize is_allocated_sectors_min

2017-01-19 Thread Peter Lieven
the current implementation always splits requests if a buffer begins or ends with zeroes independent of the length of the zero area. Change this to really only split off zero areas that have at least a length of 'min' bytes. Signed-off-by: Peter Lieven <p...@kamp.de> --- qemu-img.

Re: [Qemu-devel] [PATCH v6 0/2] allow blockdev-add for NFS

2017-01-19 Thread Peter Lieven
Am 19.01.2017 um 16:55 schrieb Kevin Wolf: Am 19.01.2017 um 16:44 hat Peter Lieven geschrieben: Am 19.01.2017 um 16:42 schrieb Kevin Wolf: Am 19.01.2017 um 16:34 hat Peter Lieven geschrieben: Am 19.01.2017 um 16:20 schrieb Kevin Wolf: Am 19.01.2017 um 15:59 hat Eric Blake geschrieben: On 01

Re: [Qemu-devel] [PATCH] qemu-img: optimize is_allocated_sectors_min

2017-01-19 Thread Peter Lieven
Please ignore this one The code was suboptimal. Will send v2. Peter Am 19.01.2017 um 16:56 schrieb Peter Lieven: the current implementation always splits requests if a buffer begins or ends with zeroes independent of the length of the zero area. Change this to really only split off zero areas

[Qemu-devel] qemu-img: complains about missing iscsi option group

2017-01-19 Thread Peter Lieven
Hi all, since commit f57b4b5 (blockdev: prepare iSCSI block driver for dynamic loading) qemu-img complains about a missing option group several times. ~/git/qemu$ ./qemu-img info iscsi://172.21.200.56:3260/iqn.2001-05.com.equallogic:0-8a0906-69d384e0a-aa3004e55e15878d-00lieven-data/0

Re: [Qemu-devel] [PATCH v6 0/2] allow blockdev-add for NFS

2017-01-19 Thread Peter Lieven
Am 19.01.2017 um 16:20 schrieb Kevin Wolf: Am 19.01.2017 um 15:59 hat Eric Blake geschrieben: On 01/19/2017 08:30 AM, Peter Lieven wrote: qemu-img: Could not open 'nfs://172.21.200.61/vcore-dev-cdrom/templates/VC_debian8-20170116.qcow2,linux?readahead=131072': Block protocol 'nfs' doesn't

[Qemu-devel] [PATCH] qemu-img: optimize is_allocated_sectors_min

2017-01-19 Thread Peter Lieven
the current implementation always splits requests if a buffer begins or ends with zeroes independent of the length of the zero area. Change this to really only split off zero areas that have at least a length of 'min' bytes. Signed-off-by: Peter Lieven <p...@kamp.de> --- qemu-img.

Re: [Qemu-devel] [PATCH v6 0/2] allow blockdev-add for NFS

2017-01-19 Thread Peter Lieven
Am 19.01.2017 um 16:42 schrieb Kevin Wolf: Am 19.01.2017 um 16:34 hat Peter Lieven geschrieben: Am 19.01.2017 um 16:20 schrieb Kevin Wolf: Am 19.01.2017 um 15:59 hat Eric Blake geschrieben: On 01/19/2017 08:30 AM, Peter Lieven wrote: qemu-img: Could not open 'nfs://172.21.200.61/vcore-dev

Re: [Qemu-devel] [PATCH v6 0/2] allow blockdev-add for NFS

2017-01-19 Thread Peter Lieven
Am 19.01.2017 um 16:42 schrieb Kevin Wolf: Am 19.01.2017 um 16:34 hat Peter Lieven geschrieben: Am 19.01.2017 um 16:20 schrieb Kevin Wolf: Am 19.01.2017 um 15:59 hat Eric Blake geschrieben: On 01/19/2017 08:30 AM, Peter Lieven wrote: qemu-img: Could not open 'nfs://172.21.200.61/vcore-dev

Re: [Qemu-devel] [PATCH v6 0/2] allow blockdev-add for NFS

2017-01-19 Thread Peter Lieven
Am 18.01.2017 um 10:59 schrieb Kevin Wolf: Am 17.01.2017 um 16:14 hat Peter Lieven geschrieben: Am 31.10.2016 um 18:20 schrieb Kevin Wolf: Am 31.10.2016 um 16:05 hat Ashijeet Acharya geschrieben: Previously posted series patches: v5: https://lists.gnu.org/archive/html/qemu-devel/2016-10

Re: [Qemu-devel] [PATCH v6 0/2] allow blockdev-add for NFS

2017-01-17 Thread Peter Lieven
Am 31.10.2016 um 18:20 schrieb Kevin Wolf: Am 31.10.2016 um 16:05 hat Ashijeet Acharya geschrieben: Previously posted series patches: v5: https://lists.gnu.org/archive/html/qemu-devel/2016-10/msg07580.html v4: https://lists.gnu.org/archive/html/qemu-devel/2016-10/msg07449.html v3:

Re: [Qemu-devel] [Qemu-stable] [PATCH] block/iscsi: avoid data corruption with cache=writeback

2017-01-17 Thread Peter Lieven
Am 17.01.2017 um 12:28 schrieb Fam Zheng: On Mon, 01/16 16:17, Peter Lieven wrote: nb_cls_shrunk in iscsi_allocmap_update can become -1 if the request starts and ends within the same cluster. This results in passing -1 to bitmap_set and bitmap_clear and they don't handle negative values

Re: [Qemu-devel] [Qemu-stable] Data corruption in Qemu 2.7.1

2017-01-17 Thread Peter Lieven
Am 17.01.2017 um 07:40 schrieb Fam Zheng: On Fri, 01/13 11:44, Peter Lieven wrote: Hi, i currently facing a problem in our testing environment where I see file system corruption with 2.7.1 on iSCSI and Local Storage (LVM). Trying to bisect, but has anyone observed this before? The information

[Qemu-devel] [PATCH] block/iscsi: avoid data corruption with cache=writeback

2017-01-16 Thread Peter Lieven
: e1123a3b40a1a9a625a29c8ed4debb7e206ea690 Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven <p...@kamp.de> --- block/iscsi.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 6aeeb9e..1860f1b 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -499,14 +

[Qemu-devel] Data corruption in Qemu 2.7.1

2017-01-13 Thread Peter Lieven
Hi, i currently facing a problem in our testing environment where I see file system corruption with 2.7.1 on iSCSI and Local Storage (LVM). Trying to bisect, but has anyone observed this before? Thanks, Peter

Re: [Qemu-devel] [PATCH v2 5/9] block: Pass unaligned discard requests to drivers

2016-11-21 Thread Peter Lieven
Am 19.11.2016 um 23:05 schrieb Max Reitz: On 18.11.2016 02:13, Eric Blake wrote: On 11/17/2016 05:44 PM, Max Reitz wrote: Since the SCSI specification says nothing about a minimum discard granularity, and only documents the preferred alignment, it is best if the block layer gives the driver

[Qemu-devel] qemu 2.6.2: e1000 network card hanging after live migration

2016-11-14 Thread Peter Lieven
Hi, I have observed a virtual server with an e1000 network card loosing network connectivity after live migration (not reproducible so far). In the log of the vServer I found several messages like: kernel: [13833656.832108] e1000 :00:05.0 eth2: Reset adapter When I restarted the vServer

Re: [Qemu-devel] [Qemu-stable] [PATCH 2/2] block: Pass unaligned discard requests to drivers

2016-11-11 Thread Peter Lieven
quest is to silently ignore that > portion of the discard request; but for devices that can pass > the partial request all the way down to hardware, this can > result in the hardware coalescing requests and discarding > aligned pages after all. > > Reported by: Peter Lieven &l

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

2016-11-08 Thread Peter Lieven
Am 25.10.2016 um 18:12 schrieb Eric Blake: On 10/25/2016 09:36 AM, Paolo Bonzini wrote: On 25/10/2016 16:35, Eric Blake wrote: So your argument is that we should always pass down every unaligned less-than-optimum discard request all the way to the hardware, rather than dropping it higher in

Re: [Qemu-devel] [PATCH v2 1/2] block/nfs: Introduce runtime_opts in NFS

2016-10-25 Thread Peter Lieven
Am 25.10.2016 um 16:02 schrieb Kevin Wolf: Peter, there is a question for you hidden somewhere below. Am 24.10.2016 um 21:27 hat Ashijeet Acharya geschrieben: Make NFS block driver use various fine grained runtime_opts. Set .bdrv_parse_filename() to nfs_parse_filename() and introduce two new

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

2016-10-25 Thread Peter Lieven
Am 25.10.2016 um 15:59 schrieb Eric Blake: On 10/25/2016 07:42 AM, Peter Lieven wrote: But hey, that firmware is seriously weird. :) Yes, so you would not change the new implementation? Even if the discard is e.g. 1MB it could theretically be that internally the device has a finer granularity

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

2016-10-25 Thread Peter Lieven
Am 25.10.2016 um 14:19 schrieb Paolo Bonzini: On 25/10/2016 14:12, Peter Lieven wrote: Am 25.10.2016 um 14:09 schrieb Paolo Bonzini: On 25/10/2016 14:03, Peter Lieven wrote: Am 01.08.2016 um 11:22 schrieb Paolo Bonzini: On 28/07/2016 04:39, Eric Blake wrote: On 07/27/2016 01:25 AM, Fam

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

2016-10-25 Thread Peter Lieven
Am 25.10.2016 um 14:09 schrieb Paolo Bonzini: On 25/10/2016 14:03, Peter Lieven wrote: Am 01.08.2016 um 11:22 schrieb Paolo Bonzini: On 28/07/2016 04:39, Eric Blake wrote: On 07/27/2016 01:25 AM, Fam Zheng wrote: On Thu, 07/21 13:34, Eric Blake wrote: +max_write_zeroes

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

2016-10-25 Thread Peter Lieven
Am 01.08.2016 um 11:22 schrieb Paolo Bonzini: On 28/07/2016 04:39, Eric Blake wrote: On 07/27/2016 01:25 AM, Fam Zheng wrote: On Thu, 07/21 13:34, Eric Blake wrote: +max_write_zeroes = max_write_zeroes / alignment * alignment; Not using QEMU_ALIGN_DOWN despite patch 3? Looks like I

Re: [Qemu-devel] [PATCH 00/15] optimize Qemu RSS usage

2016-10-18 Thread Peter Lieven
Am 12.10.2016 um 23:18 schrieb Michael R. Hines: Peter, Greetings from DigitalOcean. We're experiencing the same symptoms without this patch. We have, collectively, many gigabytes of un-planned-for RSS being used per-hypervisor that we would like to get rid of =). Without explicitly trying

Re: [Qemu-devel] [Qemu-block] block/nfs: Fine grained runtime options in nfs

2016-10-18 Thread Peter Lieven
Am 17.10.2016 um 21:34 schrieb Ashijeet Acharya: On Tue, Oct 18, 2016 at 12:59 AM, Eric Blake wrote: On 10/17/2016 01:00 PM, Ashijeet Acharya wrote: One more relatively easy question though, will we include @port as an option in runtime_opts while converting NFS to use

Re: [Qemu-devel] [Qemu-stable] [ANNOUNCE] QEMU 2.6.1 Stable released

2016-09-30 Thread Peter Lieven
Am 28.09.2016 um 21:52 schrieb Michael Roth: Quoting Peter Lieven (2016-09-27 06:30:27) Am 27.09.2016 um 12:28 schrieb Peter Lieven: Am 16.09.2016 um 15:56 schrieb Peter Lieven: Am 13.09.2016 um 20:04 schrieb Michael Roth: Quoting Peter Lieven (2016-09-13 10:52:04

Re: [Qemu-devel] [PATCH V9 1/7] oslib-posix: add helpers for stack alloc and free

2016-09-27 Thread Peter Lieven
Am 27.09.2016 um 13:59 schrieb Kevin Wolf: Am 27.09.2016 um 11:58 hat Peter Lieven geschrieben: the allocated stack will be adjusted to the minimum supported stack size by the OS and rounded up to be a multiple of the system pagesize. Additionally an architecture dependent guard page is added

Re: [Qemu-devel] [PATCH v2] block/iscsi: Adding iser support in Libiscsi-QEMU

2016-09-27 Thread Peter Lieven
says ?iser needs to be added to the URI. Why is it necessary to define a new "iser" protocol block driver? PaoloB asked to add this option also, in Libiscsi the URI parser checks for 'iser://' as a different protocol or '?iser' as URI option. I will add it into the commit message.

Re: [Qemu-devel] [Qemu-stable] [ANNOUNCE] QEMU 2.6.1 Stable released

2016-09-27 Thread Peter Lieven
Am 27.09.2016 um 12:28 schrieb Peter Lieven: Am 16.09.2016 um 15:56 schrieb Peter Lieven: Am 13.09.2016 um 20:04 schrieb Michael Roth: Quoting Peter Lieven (2016-09-13 10:52:04) Am 13.09.2016 um 17:42 schrieb Stefan Hajnoczi<stefa...@redhat.com>: On Thu, Sep 08, 2016 at 03:58:26PM

Re: [Qemu-devel] [Qemu-stable] [ANNOUNCE] QEMU 2.6.1 Stable released

2016-09-27 Thread Peter Lieven
Am 16.09.2016 um 15:56 schrieb Peter Lieven: Am 13.09.2016 um 20:04 schrieb Michael Roth: Quoting Peter Lieven (2016-09-13 10:52:04) Am 13.09.2016 um 17:42 schrieb Stefan Hajnoczi<stefa...@redhat.com>: On Thu, Sep 08, 2016 at 03:58:26PM -0500, Michael Roth wrote: Quoting Stefan Ha

[Qemu-devel] [PATCH V9 2/7] coroutine-sigaltstack: rename coroutine struct appropriately

2016-09-27 Thread Peter Lieven
The name of the sigaltstack coroutine struct was misleading. Signed-off-by: Peter Lieven <p...@kamp.de> --- util/coroutine-sigaltstack.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/util/coroutine-sigaltstack.c b/util/coroutine-sigaltstack.c index a

[Qemu-devel] [PATCH V9 1/7] oslib-posix: add helpers for stack alloc and free

2016-09-27 Thread Peter Lieven
the allocated stack will be adjusted to the minimum supported stack size by the OS and rounded up to be a multiple of the system pagesize. Additionally an architecture dependent guard page is added to the stack to catch stack overflows. Signed-off-by: Peter Lieven <p...@kamp.de> --- i

[Qemu-devel] [PATCH V9 6/7] oslib-posix: add a configure switch to debug stack usage

2016-09-27 Thread Peter Lieven
this adds a knob to track the maximum stack usage of stacks created by qemu_alloc_stack. Signed-off-by: Peter Lieven <p...@kamp.de> --- configure | 19 +++ util/oslib-posix.c | 35 +++ 2 files changed, 54 insertions(+) diff

[Qemu-devel] [PATCH V9 5/7] coroutine-sigaltstack: use helper for allocating stack memory

2016-09-27 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> --- util/coroutine-sigaltstack.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/util/coroutine-sigaltstack.c b/util/coroutine-sigaltstack.c index a5bcb7e..f6fc49a 100644 --- a/util/coroutine-sigaltstack.c +++

[Qemu-devel] [PATCH V9 4/7] coroutine-ucontext: use helper for allocating stack memory

2016-09-27 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> --- util/coroutine-ucontext.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/util/coroutine-ucontext.c b/util/coroutine-ucontext.c index 31254ab..6621f3f 100644 --- a/util/coroutine-ucontext.c +++ b/util/cor

[Qemu-devel] [PATCH V9 0/7] coroutine: mmap stack memory and stack size

2016-09-27 Thread Peter Lieven
Richard] - Patch 1: use mmap+mprotect instead of mmap+mmap [Richard] - Patch 5: u_int32_t -> uint32_t [Richard] - Patch 5: only available if stack grows down Peter Lieven (7): oslib-posix: add helpers for stack alloc and free coroutine-sigaltstack: rename coroutine struct appropriate

[Qemu-devel] [PATCH V9 7/7] coroutine: reduce stack size to 60kB

2016-09-27 Thread Peter Lieven
in qemu_alloc_stack will catch a potential stack overflow introduced by this commit. The 60kB + guard page will result in an allocation of 64kB per coroutine on systems where a page is 4kB. Signed-off-by: Peter Lieven <p...@kamp.de> --- include/qemu/coroutine_int.h | 2 +- 1 file chan

[Qemu-devel] [PATCH V9 3/7] coroutine: add a macro for the coroutine stack size

2016-09-27 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Richard Henderson <r...@twiddle.net> --- include/qemu/coroutine_int.h | 2 ++ util/coroutine-sigaltstack.c | 2 +- util/coroutine-ucontext.c| 2 +- util/coroutine-win32

Re: [Qemu-devel] [PATCH V8 1/6] oslib-posix: add helpers for stack alloc and free

2016-09-26 Thread Peter Lieven
Am 26.09.2016 um 15:44 schrieb Kevin Wolf: Am 26.09.2016 um 13:44 hat Peter Lieven geschrieben: the allocated stack will be adjusted to the minimum supported stack size by the OS and rounded up to be a multiple of the system pagesize. Additionally an architecture dependent guard page is added

[Qemu-devel] [PATCH V8 5/6] oslib-posix: add a configure switch to debug stack usage

2016-09-26 Thread Peter Lieven
this adds a knob to track the maximum stack usage of stacks created by qemu_alloc_stack. Signed-off-by: Peter Lieven <p...@kamp.de> --- configure | 19 +++ util/oslib-posix.c | 40 +++- 2 files changed, 58 insertions(+), 1 de

[Qemu-devel] [PATCH V8 1/6] oslib-posix: add helpers for stack alloc and free

2016-09-26 Thread Peter Lieven
the allocated stack will be adjusted to the minimum supported stack size by the OS and rounded up to be a multiple of the system pagesize. Additionally an architecture dependent guard page is added to the stack to catch stack overflows. Signed-off-by: Peter Lieven <p...@kamp.de> --- i

[Qemu-devel] [PATCH V8 2/6] coroutine: add a macro for the coroutine stack size

2016-09-26 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Richard Henderson <r...@twiddle.net> --- include/qemu/coroutine_int.h | 2 ++ util/coroutine-sigaltstack.c | 2 +- util/coroutine-ucontext.c| 2 +- util/coroutine-win32

[Qemu-devel] [PATCH V8 3/6] coroutine-ucontext: use helper for allocating stack memory

2016-09-26 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> --- util/coroutine-ucontext.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/util/coroutine-ucontext.c b/util/coroutine-ucontext.c index 31254ab..6621f3f 100644 --- a/util/coroutine-ucontext.c +++ b/util/cor

[Qemu-devel] [PATCH V8 4/6] coroutine-sigaltstack: use helper for allocating stack memory

2016-09-26 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> --- util/coroutine-sigaltstack.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/util/coroutine-sigaltstack.c b/util/coroutine-sigaltstack.c index 9c2854c..d9c7f66 100644 --- a/util/coroutine-sigaltstack.c +++

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

2016-09-26 Thread Peter Lieven
able if stack grows down Peter Lieven (6): oslib-posix: add helpers for stack alloc and free coroutine: add a macro for the coroutine stack size coroutine-ucontext: use helper for allocating stack memory coroutine-sigaltstack: use helper for allocating stack memory oslib-posix: add a configu

[Qemu-devel] [PATCH V8 6/6] coroutine: reduce stack size to 60kB

2016-09-26 Thread Peter Lieven
in qemu_alloc_stack will catch a potential stack overflow introduced by this commit. The 60kB + guard page will result in an allocation of 64kB per coroutine on systems where a page is 4kB. Signed-off-by: Peter Lieven <p...@kamp.de> --- include/qemu/coroutine_int.h | 2 +- 1 file chan

Re: [Qemu-devel] [Qemu-stable] [ANNOUNCE] QEMU 2.6.1 Stable released

2016-09-16 Thread Peter Lieven
Am 13.09.2016 um 20:04 schrieb Michael Roth: Quoting Peter Lieven (2016-09-13 10:52:04) Am 13.09.2016 um 17:42 schrieb Stefan Hajnoczi <stefa...@redhat.com>: On Thu, Sep 08, 2016 at 03:58:26PM -0500, Michael Roth wrote: Quoting Stefan Hajnoczi (2016-09-05 12:54:35) On Fri, Aug 26

Re: [Qemu-devel] [PATCH] net: limit allocation in nc_sendv_compat

2016-09-16 Thread Peter Lieven
Am 30.06.2016 um 15:39 schrieb Stefan Hajnoczi: On Thu, Jun 30, 2016 at 11:49:40AM +0200, Peter Lieven wrote: we only need to allocate enough memory to hold the packet. This might be less than NET_BUFSIZE. Additionally fail early if the packet is larger than NET_BUFSIZE. Signed-off-by: Peter

Re: [Qemu-devel] [PULL 00/42] Block layer patches

2016-09-16 Thread Peter Lieven
6f712b (pid=52939) /basic/order:FAIL GTester: last random seed: R02S4261fe2d21feaee583cdd9f2a2433f5a (pid=52940) FAIL: tests/test-coroutine Peter (Lieven), this is yours. I'll drop the coroutine series from the pull request and send a v2

Re: [Qemu-devel] [Qemu-stable] [ANNOUNCE] QEMU 2.6.1 Stable released

2016-09-13 Thread Peter Lieven
> Am 13.09.2016 um 20:04 schrieb Michael Roth <mdr...@linux.vnet.ibm.com>: > > Quoting Peter Lieven (2016-09-13 10:52:04) >> >> >>>> Am 13.09.2016 um 17:42 schrieb Stefan Hajnoczi <stefa...@redhat.com>: >>>> >>>> On Th

Re: [Qemu-devel] [Qemu-stable] [ANNOUNCE] QEMU 2.6.1 Stable released

2016-09-13 Thread Peter Lieven
> Am 13.09.2016 um 17:42 schrieb Stefan Hajnoczi <stefa...@redhat.com>: > >> On Thu, Sep 08, 2016 at 03:58:26PM -0500, Michael Roth wrote: >> Quoting Stefan Hajnoczi (2016-09-05 12:54:35) >>>> On Fri, Aug 26, 2016 at 01:45:56PM +0200, Peter Lieven wrote:

Re: [Qemu-devel] [Qemu-stable] [PATCH v2 for 2.7] ui: fix refresh of VNC server surface

2016-08-29 Thread Peter Lieven
s not send a SET_PIXEL_FORMAT message. Which my client does and this masked the issue for me. The set pixel format routine invalidates the whole display which results in a vnc_dpy_switch which masks the guest fb dirty. Why this invalidation takes place I do not understand, but this can be sorted

Re: [Qemu-devel] [Qemu-stable] [ANNOUNCE] QEMU 2.6.1 Stable released

2016-08-26 Thread Peter Lieven
Am 25.08.2016 um 19:23 schrieb Michael Roth: Quoting Peter Lieven (2016-08-25 01:38:13) Am 17.08.2016 um 21:30 schrieb Michael Roth: Hi everyone, I am pleased to announce that the QEMU v2.6.1 stable release is now available: http://wiki.qemu.org/download/qemu-2.6.1.tar.bz2 v2.6.1 is now

Re: [Qemu-devel] [Qemu-stable] [PATCH v2 for 2.7] ui: fix refresh of VNC server surface

2016-08-26 Thread Peter Lieven
Am 25.08.2016 um 14:46 schrieb Daniel P. Berrange: On Thu, Aug 25, 2016 at 09:15:52AM +0200, Peter Lieven wrote: Am 24.08.2016 um 17:49 schrieb Daniel P. Berrange: On Wed, Aug 24, 2016 at 04:46:31PM +0100, Peter Maydell wrote: On 23 August 2016 at 07:50, Peter Lieven <p...@kamp.de> wrot

Re: [Qemu-devel] [Qemu-stable] [PATCH v2 for 2.7] ui: fix refresh of VNC server surface

2016-08-25 Thread Peter Lieven
Am 24.08.2016 um 17:49 schrieb Daniel P. Berrange: On Wed, Aug 24, 2016 at 04:46:31PM +0100, Peter Maydell wrote: On 23 August 2016 at 07:50, Peter Lieven <p...@kamp.de> wrote: Am 16.08.2016 um 18:30 schrieb Daniel P. Berrange: In previous commit

Re: [Qemu-devel] [Qemu-stable] [ANNOUNCE] QEMU 2.6.1 Stable released

2016-08-25 Thread Peter Lieven
Am 17.08.2016 um 21:30 schrieb Michael Roth: Hi everyone, I am pleased to announce that the QEMU v2.6.1 stable release is now available: http://wiki.qemu.org/download/qemu-2.6.1.tar.bz2 v2.6.1 is now tagged in the official qemu.git repository, and the stable-2.6 branch has been updated

[Qemu-devel] [PATCH V7 1/6] oslib-posix: add helpers for stack alloc and free

2016-08-23 Thread Peter Lieven
so that the usable stack size is effectively reduced by the size of one page. This is equivalent to how the glibc stack allocation routines behave. Signed-off-by: Peter Lieven <p...@kamp.de> --- include/sysemu/os-posix.h | 27 ++ util/oslib-posix.c

[Qemu-devel] [PATCH V7 5/6] oslib-posix: add a configure switch to debug stack usage

2016-08-23 Thread Peter Lieven
this adds a knob to track the maximum stack usage of stacks created by qemu_alloc_stack. Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> --- configure | 19 +++ util/oslib-posix.c | 36 +++

[Qemu-devel] [PATCH V7 2/6] coroutine: add a macro for the coroutine stack size

2016-08-23 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Richard Henderson <r...@twiddle.net> --- include/qemu/coroutine_int.h | 2 ++ util/coroutine-sigaltstack.c | 2 +- util/coroutine-ucontext.c| 2 +- util/coroutine-win32

[Qemu-devel] [PATCH V7 3/6] coroutine-ucontext: use helper for allocating stack memory

2016-08-23 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Richard Henderson <r...@twiddle.net> --- util/coroutine-ucontext.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/util/coroutine-ucontext.

[Qemu-devel] [PATCH V7 6/6] coroutine: reduce stack size to 64kB

2016-08-23 Thread Peter Lieven
in qemu_alloc_stack will catch a potential stack overflow introduced by this commit. Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Eric Blake <ebl...@redhat.com> --- include/qemu/coroutine_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

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

2016-08-23 Thread Peter Lieven
tacks smaller than _SC_THREAD_STACK_MIN [Richard] - Patch 1: use mmap+mprotect instead of mmap+mmap [Richard] - Patch 5: u_int32_t -> uint32_t [Richard] - Patch 5: only available if stack grows down Peter Lieven (6): oslib-posix: add helpers for stack alloc and free coroutine: add a macro fo

[Qemu-devel] [PATCH V7 4/6] coroutine-sigaltstack: use helper for allocating stack memory

2016-08-23 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Richard Henderson <r...@twiddle.net> --- util/coroutine-sigaltstack.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/util/coroutine-sigaltstack.

Re: [Qemu-devel] [PATCH V6 1/6] oslib-posix: add helpers for stack alloc and free

2016-08-23 Thread Peter Lieven
Am 22.08.2016 um 17:19 schrieb Richard Henderson: On 08/22/2016 06:04 AM, Peter Lieven wrote: +static size_t adjust_stack_size(size_t sz) +{ +#ifdef _SC_THREAD_STACK_MIN +/* avoid stacks smaller than _SC_THREAD_STACK_MIN */ +sz = MAX(MAX(sysconf(_SC_THREAD_STACK_MIN), 0), sz); +#endif

Re: [Qemu-devel] [Qemu-stable] [PATCH v2 for 2.7] ui: fix refresh of VNC server surface

2016-08-23 Thread Peter Lieven
Am 16.08.2016 um 18:30 schrieb Daniel P. Berrange: In previous commit commit c7628bff4138ce906a3620d12e0820c1cf6c140d Author: Gerd Hoffmann Date: Fri Oct 30 12:10:09 2015 +0100 vnc: only alloc server surface with clients connected the VNC server was changed

Re: [Qemu-devel] [Qemu-stable] [PATCH 0/2] virtio: fix VirtQueue->inuse field

2016-08-23 Thread Peter Lieven
Am 17.08.2016 um 15:58 schrieb Stefan Hajnoczi: On Mon, Aug 15, 2016 at 01:54:14PM +0100, Stefan Hajnoczi wrote: The VirtQueue->inuse field is not always updated correctly. These patches fix it. Originally this series was called "virtio-balloon: fix stats vq migration" but Ladi Prosek posted

[Qemu-devel] [PATCH V6 5/6] oslib-posix: add a configure switch to debug stack usage

2016-08-22 Thread Peter Lieven
this adds a knob to track the maximum stack usage of stacks created by qemu_alloc_stack. Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> --- configure | 19 +++ util/oslib-posix.c | 37

[Qemu-devel] [PATCH V6 3/6] coroutine-ucontext: use helper for allocating stack memory

2016-08-22 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Richard Henderson <r...@twiddle.net> --- util/coroutine-ucontext.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/util/coroutine-ucontext.

[Qemu-devel] [PATCH V6 4/6] coroutine-sigaltstack: use helper for allocating stack memory

2016-08-22 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Richard Henderson <r...@twiddle.net> --- util/coroutine-sigaltstack.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/util/coroutine-sigaltstack.

[Qemu-devel] [PATCH V6 1/6] oslib-posix: add helpers for stack alloc and free

2016-08-22 Thread Peter Lieven
so that the usable stack size is effectively reduced by the size of one page. This is equivalent to how the glibc stack allocation routines behave. Signed-off-by: Peter Lieven <p...@kamp.de> --- include/sysemu/os-posix.h | 27 +++ util/oslib-posix.c

[Qemu-devel] [PATCH V6 6/6] coroutine: reduce stack size to 64kB

2016-08-22 Thread Peter Lieven
in qemu_alloc_stack will catch a potential stack overflow introduced by this commit. Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Eric Blake <ebl...@redhat.com> --- include/qemu/coroutine_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[Qemu-devel] [PATCH V6 2/6] coroutine: add a macro for the coroutine stack size

2016-08-22 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Richard Henderson <r...@twiddle.net> --- include/qemu/coroutine_int.h | 2 ++ util/coroutine-sigaltstack.c | 2 +- util/coroutine-ucontext.c| 2 +- util/coroutine-win32

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

2016-08-22 Thread Peter Lieven
ad of mmap+mmap [Richard] - Patch 5: u_int32_t -> uint32_t [Richard] - Patch 5: only available if stack grows down Peter Lieven (6): oslib-posix: add helpers for stack alloc and free coroutine: add a macro for the coroutine stack size coroutine-ucontext: use helper for allocating stack

Re: [Qemu-devel] [PATCH V5 1/6] oslib-posix: add helpers for stack alloc and free

2016-08-08 Thread Peter Lieven
Am 08.08.2016 um 12:37 schrieb Stefan Hajnoczi: > On Tue, Jul 12, 2016 at 06:23:01PM +0200, Peter Lieven wrote: >> the allocated stack will be adjusted to the minimum supported stack size >> by the OS and rounded up to be a multiple of the system pagesize. >> Additionally an a

[Qemu-devel] [RESEND PATCH V5 2/6] coroutine: add a macro for the coroutine stack size

2016-08-04 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Richard Henderson <r...@twiddle.net> --- include/qemu/coroutine_int.h | 2 ++ util/coroutine-sigaltstack.c | 2 +- util/coroutine-ucontext.c| 2 +- util/coroutine-win32

[Qemu-devel] [RESEND PATCH V5 5/6] oslib-posix: add a configure switch to debug stack usage

2016-08-04 Thread Peter Lieven
this adds a knob to track the maximum stack usage of stacks created by qemu_alloc_stack. Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> --- configure | 19 +++ util/oslib-posix.c | 37

[Qemu-devel] [RESEND PATCH V5 1/6] oslib-posix: add helpers for stack alloc and free

2016-08-04 Thread Peter Lieven
the allocated stack will be adjusted to the minimum supported stack size by the OS and rounded up to be a multiple of the system pagesize. Additionally an architecture dependent guard page is added to the stack to catch stack overflows. Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by

[Qemu-devel] [RESEND PATCH V5 3/6] coroutine-ucontext: use helper for allocating stack memory

2016-08-04 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Richard Henderson <r...@twiddle.net> --- util/coroutine-ucontext.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/util/coroutine-ucontext.

[Qemu-devel] [RESEND PATCH V5 4/6] coroutine-sigaltstack: use helper for allocating stack memory

2016-08-04 Thread Peter Lieven
Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Richard Henderson <r...@twiddle.net> --- util/coroutine-sigaltstack.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/util/coroutine-sigaltstack.

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

2016-08-04 Thread Peter Lieven
architecture dependend guard page [Richard] - Patch 1: avoid stacks smaller than _SC_THREAD_STACK_MIN [Richard] - Patch 1: use mmap+mprotect instead of mmap+mmap [Richard] - Patch 5: u_int32_t -> uint32_t [Richard] - Patch 5: only available if stack grows down Peter Lieven (6): oslib-pos

[Qemu-devel] [RESEND PATCH V5 6/6] coroutine: reduce stack size to 64kB

2016-08-04 Thread Peter Lieven
in qemu_alloc_stack will catch a potential stack overflow introduced by this commit. Signed-off-by: Peter Lieven <p...@kamp.de> Reviewed-by: Eric Blake <ebl...@redhat.com> --- include/qemu/coroutine_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

Re: [Qemu-devel] [PATCH] block/iscsi: Adding iser support in Libiscsi-QEMU

2016-07-28 Thread Peter Lieven
Am 27.07.2016 um 12:02 schrieb Roy Shterman: iSER is a new transport layer supported in Libiscsi, iSER provides a zero-copy RDMA capable interface that can improve performance. New API is introduced in abstracion of the Libiscsi transport layer. In order to use the new iSER transport, one need

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

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

<    1   2   3   4   5   6   7   8   9   10   >