Re: [Qemu-devel] [Qemu-block] [PATCH v3 2/2] aio: Do aio_notify_accept only during blocking aio_poll

2018-09-09 Thread Fam Zheng
On Fri, 09/07 17:51, Kevin Wolf wrote: > Am 09.08.2018 um 15:22 hat Fam Zheng geschrieben: > > Furthermore, blocking aio_poll is only allowed on home thread > > (in_aio_context_home_thread), because otherwise two blocking > > aio_poll()'s can steal each other's ctx->

[Qemu-devel] [PULL 1/5] docker: Sort Fedora packages

2018-09-09 Thread Fam Zheng
eview." Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20180818015344.797-2-f4...@amsat.org> Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/fedora.docker | 102 - 1 file changed, 84 insertions(+), 18 deletions(-) diff --git a/tests/docker/dockerfiles/

[Qemu-devel] [PULL 4/5] docker: Sort CentOS packages

2018-09-09 Thread Fam Zheng
Message-Id: <20180818015344.797-5-f4...@amsat.org> Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/centos7.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/dockerfiles/centos7.docker b/tests/docker/dockerfiles/centos7.docker index 83462b7205..0

[Qemu-devel] [PULL 3/5] docker: Sort Ubuntu packages

2018-09-09 Thread Fam Zheng
eview." Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20180818015344.797-4-f4...@amsat.org> Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/ubuntu.docker | 61 ++ 1 file changed, 52 insertions(+), 9 deletions(-) diff --git a/tests/docker/dockerfiles/

[Qemu-devel] [PULL 0/5] Docker patches

2018-09-09 Thread Fam Zheng
The following changes since commit 19b599f7664b2ebfd0f405fb79c14dd241557452: Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-08-27-v2' into staging (2018-08-27 16:44:20 +0100) are available in the Git repository at: git://github.com/famz/qemu.git tags/docker-pull-request

[Qemu-devel] [PATCH v2 1/4] virtio: update MemoryRegionCaches when guest negotiates features

2018-09-05 Thread Fam Zheng
. This happens with OpenBSD 6.3. Reported-by: Fam Zheng Fixes: 97cd965c070152bc626c7507df9fb356bbe1cd81 Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini Signed-off-by: Fam Zheng --- hw/virtio/virtio.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH v2 2/4] slirp: Add sanity check for str option length

2018-09-05 Thread Fam Zheng
lso from the protocol where one byte represents the string length. This gives an early error before the warning which is harder to notice or diagnose. Reported-by: Thomas Huth Signed-off-by: Fam Zheng --- net/slirp.c | 9 + slirp/bootp.c | 32 ++-- 2 fi

[Qemu-devel] [PATCH v2 0/4] tests: VM build in OpenBSD 6.3

2018-09-05 Thread Fam Zheng
(patch 1; patches 2+3; patch 4) can go to individual maintainers if desired. Fam Zheng (3): slirp: Add sanity check for str option length slirp: Implement RFC2132 TFTP server name tests: vm: auto_install OpenBSD Paolo Bonzini (1): virtio: update MemoryRegionCaches when guest negotiates

[Qemu-devel] [PATCH v2 4/4] tests: vm: auto_install OpenBSD

2018-09-05 Thread Fam Zheng
Upgrade OpenBSD to 6.3 using auto_install. Especially, drop SDL1, include SDL2. Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 6 ++-- tests/vm/openbsd | 81 -- 2 files changed, 74 insertions(+), 13 deletions(-) diff --git a/tests/vm/basevm.py

[Qemu-devel] [PATCH v2 3/4] slirp: Implement RFC2132 TFTP server name

2018-09-05 Thread Fam Zheng
This new usernet option can be used to add data for option 66 (tftp server name) in the BOOTP reply, which is useful in PXE based automatic OS install such as OpenBSD. Signed-off-by: Fam Zheng --- net/slirp.c | 12 ++-- qapi/net.json| 5 - qemu-options.hx | 7

Re: [Qemu-devel] [PATCH] tests: vm: auto_install OpenBSD

2018-09-05 Thread Fam Zheng
On Wed, 09/05 16:24, Gerd Hoffmann wrote: > On Wed, Sep 05, 2018 at 08:54:39AM -0400, Brad Smith wrote: > > On 8/27/2018 5:05 AM, Gerd Hoffmann wrote: > > > > > On Fri, Aug 24, 2018 at 10:36:30AM -0400, Brad Smith wrote: > > > > I very much appreciate the effort to bump up to 6.3 as I was going >

Re: [Qemu-devel] [PATCH 1/5] Fix segmentation fault when qemu_signal_init fails

2018-09-05 Thread Fam Zheng
On Wed, 09/05 19:20, Fei Li wrote: > > > On 09/05/2018 04:36 PM, Daniel P. Berrangé wrote: > > On Wed, Sep 05, 2018 at 12:17:24PM +0800, Fei Li wrote: > > > Thanks for the review! :) > > > > > > > > > On 09/04/2018 07:26 PM, Daniel P. Berrangé wrote: > > > > On Tue, Sep 04, 2018 at 07:08:18PM

Re: [Qemu-devel] [Qemu-stable] [PATCH v2] job: Fix nested aio_poll() hanging in job_txn_apply

2018-09-03 Thread Fam Zheng
On Fri, 08/24 10:43, Fam Zheng wrote: > All callers have acquired ctx already. Doing that again results in > aio_poll() hang. This fixes the problem that a BDRV_POLL_WHILE() in the > callback cannot make progress because ctx is recursively locked, for > example, when drive-bac

Re: [Qemu-devel] [PATCH v3] slirp: Implement RFC2132 TFTP server name

2018-08-27 Thread Fam Zheng
On Mon, 08/27 16:36, Fam Zheng wrote: > This new usernet option can be used to add data for option 66 (tftp > server name) in the BOOTP reply, which is useful in PXE based automatic > OS install such as OpenBSD. > > Signed-off-by: Fam Zheng > --- > > v3: Add doc to

Re: [Qemu-devel] [PATCH] tests: vm: auto_install OpenBSD

2018-08-27 Thread Fam Zheng
ase upgrade to a version that does." > fi Are you suggesting we use 6.2 for now? Fam > > On 8/23/2018 9:21 PM, Fam Zheng wrote: > > Upgrade OpenBSD to 6.3 using auto_install. Especially, drop SDL1, > > include SDL2. > > > > One limitation of this patch is that we need a temporary HTTP server on > > host 80 port for auto_install, because slirp cannot do guest forward on > > "host addr".

[Qemu-devel] [PATCH v3] slirp: Implement RFC2132 TFTP server name

2018-08-27 Thread Fam Zheng
This new usernet option can be used to add data for option 66 (tftp server name) in the BOOTP reply, which is useful in PXE based automatic OS install such as OpenBSD. Signed-off-by: Fam Zheng --- v3: Add doc to qemu-options.hx. [Thomas] v2: - Adjust parameter order and field placement

Re: [Qemu-devel] [PATCH v2] slirp: Implement RFC2132 TFTP server name

2018-08-27 Thread Fam Zheng
On Mon, 08/27 08:51, Thomas Huth wrote: > On 2018-08-27 04:22, Fam Zheng wrote: > > This new usernet option can be used to add data for option 66 (tftp > > server name) in the BOOTP reply, which is useful in PXE based automatic > > OS install such as OpenBSD. > > &

[Qemu-devel] [PATCH v2] slirp: Implement RFC2132 TFTP server name

2018-08-26 Thread Fam Zheng
This new usernet option can be used to add data for option 66 (tftp server name) in the BOOTP reply, which is useful in PXE based automatic OS install such as OpenBSD. Signed-off-by: Fam Zheng --- v2: - Adjust parameter order and field placement to be closer to other tftp options. [Samuel

Re: [Qemu-devel] [PATCH] slirp: Implement RFC2132 TFTP server name

2018-08-26 Thread Fam Zheng
On Sat, 08/25 18:53, Samuel Thibault wrote: > Hello, > > Fam Zheng, le ven. 24 août 2018 21:53:12 +0800, a ecrit: > >const char *vnameserver, const char > > *vnameserver6, > >const char *smb_exp

Re: [Qemu-devel] [PATCH] slirp: Implement RFC2132 TFTP server name

2018-08-26 Thread Fam Zheng
On Fri, 08/24 11:21, Eric Blake wrote: > On 08/24/2018 08:53 AM, Fam Zheng wrote: > > This new usernet option can be used to add data for option 66 (tftp > > server name) in the BOOTP reply, which is useful in PXE based automatic > > OS install such as OpenBSD. > > &

[Qemu-devel] [PATCH] slirp: Implement RFC2132 TFTP server name

2018-08-24 Thread Fam Zheng
This new usernet option can be used to add data for option 66 (tftp server name) in the BOOTP reply, which is useful in PXE based automatic OS install such as OpenBSD. Signed-off-by: Fam Zheng --- net/slirp.c | 7 +-- qapi/net.json| 5 - slirp/bootp.c| 8 slirp

Re: [Qemu-devel] [PATCH] tests/vm: Increase timeout waiting for VM to boot to 5 minutes

2018-08-24 Thread Fam Zheng
On Fri, 08/24 13:45, Peter Maydell wrote: > On 24 August 2018 at 13:02, Peter Maydell wrote: > > On 23 August 2018 at 15:11, Fam Zheng wrote: > >> On Thu, 08/23 12:21, Peter Maydell wrote: > >>> The VM tests currently have a timeout of 2 minutes for trying

Re: [Qemu-devel] [PATCH] tests: vm: auto_install OpenBSD

2018-08-24 Thread Fam Zheng
On Fri, 08/24 10:06, Peter Maydell wrote: > On 24 August 2018 at 09:52, Fam Zheng wrote: > > On Fri, 08/24 09:22, Daniel P. Berrangé wrote: > >> On Fri, Aug 24, 2018 at 09:21:26AM +0800, Fam Zheng wrote: > >> > Upgrade OpenBSD to 6.3 using auto_install. Especially,

Re: [Qemu-devel] [PATCH] tests: vm: auto_install OpenBSD

2018-08-24 Thread Fam Zheng
On Fri, 08/24 09:22, Daniel P. Berrangé wrote: > On Fri, Aug 24, 2018 at 09:21:26AM +0800, Fam Zheng wrote: > > Upgrade OpenBSD to 6.3 using auto_install. Especially, drop SDL1, > > include SDL2. > > > > One limitation of this patch is that we need a temporary HTTP

Re: [Qemu-devel] [RFC PATCH 4/5] block: Drop AioContext lock in bdrv_drain_poll_top_level()

2018-08-24 Thread Fam Zheng
On Fri, 08/17 19:02, Kevin Wolf wrote: > Simimlar to AIO_WAIT_WHILE(), bdrv_drain_poll_top_level() needs to > release the AioContext lock of the node to be drained before calling > aio_poll(). Otherwise, callbacks called by aio_poll() would possibly > take the lock a second time and run into a

Re: [Qemu-devel] [RFC PATCH 3/5] job: Drop AioContext lock around aio_poll()

2018-08-24 Thread Fam Zheng
On Fri, 08/17 19:02, Kevin Wolf wrote: > Simimlar to AIO_WAIT_WHILE(), job_finish_sync() needs to release the > AioContext lock of the job before calling aio_poll(). Otherwise, > callbacks called by aio_poll() would possibly take the lock a second > time and run into a deadlock with a nested

Re: [Qemu-devel] [RFC PATCH 2/5] tests: Acquire AioContext around job_finish_sync()

2018-08-24 Thread Fam Zheng
On Fri, 08/17 19:02, Kevin Wolf wrote: > All callers in QEMU proper hold the AioContext lock when calling > job_finish_sync(). The tests should do the same. > > Signed-off-by: Kevin Wolf A similar patch is needed for job_finalize() too, I think. Fam > --- > include/qemu/job.h | 6 ++

[Qemu-devel] [PATCH v2] job: Fix nested aio_poll() hanging in job_txn_apply

2018-08-23 Thread Fam Zheng
ric Blake Signed-off-by: Fam Zheng --- v2: Add Eric's r-b and some more details in commit message. --- job.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/job.c b/job.c index e36ebaafd8..a3bec7fb22 100644 --- a/job.c +++ b/job.c @@ -136,21 +136,13 @@ st

[Qemu-devel] [PATCH] tests: vm: auto_install OpenBSD

2018-08-23 Thread Fam Zheng
Upgrade OpenBSD to 6.3 using auto_install. Especially, drop SDL1, include SDL2. One limitation of this patch is that we need a temporary HTTP server on host 80 port for auto_install, because slirp cannot do guest forward on "host addr". Signed-off-by: Fam Zheng --- tests/vm/base

Re: [Qemu-devel] [PATCH] virtio: update MemoryRegionCaches when guest negotiates features

2018-08-23 Thread Fam Zheng
this we end up with an assertion failure. > This happens with OpenBSD 6.3. > > Reported-by: Fam Zheng > Fixes: 97cd965c070152bc626c7507df9fb356bbe1cd81 > Cc: qemu-sta...@nongnu.org > Signed-off-by: Paolo Bonzini Tested-by: Fam Zheng

Re: [Qemu-devel] [PATCH] tests/vm: Increase timeout waiting for VM to boot to 5 minutes

2018-08-23 Thread Fam Zheng
sly time out. > Increase the timeout from 2 to 5 minutes. > > Signed-off-by: Peter Maydell Acked-by: Fam Zheng Again, please apply this yourself. :) Thanks, Fam

Re: [Qemu-devel] [PATCH v2 0/3] ui: remove deprecated UI frontends

2018-08-23 Thread Fam Zheng
On Wed, 08/22 14:15, Daniel P. Berrangé wrote: > We deprecated GTK2 and SDL1.2 in the 2.12.0 release, so they are able to > be removed entirely in the 3.1.0 release. The min GTK3 version can also > be bumped up based the distros we aim to support. > > Note that before this can merge, the openbsd

Re: [Qemu-devel] virtio_stw_phys_cached crash

2018-08-23 Thread Fam Zheng
On Wed, 08/22 19:45, Paolo Bonzini wrote: > On 22/08/2018 16:57, Fam Zheng wrote: > > On master (13b7b188501) and v3.0.0, booting the OpenBSD install63.iso with a > > virtio-net (slirp backend) device gives this assertion failure: > > > > (gdb) bt > > #0 0x7

[Qemu-devel] virtio_stw_phys_cached crash

2018-08-22 Thread Fam Zheng
On master (13b7b188501) and v3.0.0, booting the OpenBSD install63.iso with a virtio-net (slirp backend) device gives this assertion failure: (gdb) bt #0 0x7f6f25703feb in raise () at /lib64/libc.so.6 #1 0x7f6f256ee5c1 in abort () at /lib64/libc.so.6 #2 0x7f6f256ee491 in

Re: [Qemu-devel] [PATCH] job: Fix nested aio_poll() hanging in job_txn_apply

2018-08-21 Thread Fam Zheng
On Tue, 08/21 11:15, Eric Blake wrote: > On 08/21/2018 01:45 AM, Fam Zheng wrote: > > All callers have acquired ctx already. Doing that again results in > > aio_poll() hang. This fixes the problem that a BDRV_POLL_WHILE() in the > > callback cannot make progress because ctx

[Qemu-devel] [PATCH] job: Fix nested aio_poll() hanging in job_txn_apply

2018-08-21 Thread Fam Zheng
Signed-off-by: Fam Zheng --- job.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/job.c b/job.c index fa671b431a..b07c5d0ffc 100644 --- a/job.c +++ b/job.c @@ -136,21 +136,13 @@ static void job_txn_del_job(Job *job) } } -static int job_txn_apply(JobTxn

Re: [Qemu-devel] [RFC PATCH 0/5] Fix some jobs/drain/aio_poll related hangs

2018-08-21 Thread Fam Zheng
On Fri, 08/17 19:02, Kevin Wolf wrote: > I'm running out of time and will be offline for the next two weeks, so > I'm just sending out what I have right now. This is probably not ready > to be merged yet, but if need be, someone else can pick it up. Otherwise > I'll do that myself when I return.

Re: [Qemu-devel] [PATCH v3 0/3] file-posix: Simplifications on image locking

2018-08-20 Thread Fam Zheng
On Fri, 08/17 17:35, no-re...@patchew.org wrote: > ERROR:/tmp/qemu-test/src/tests/test-image-locking.c:69:check_locked_bytes: > assertion failed (perm_expected == !!qemu_lock_fd_test(fd, 100 + i, 1, > true)): (1 == 0) This image doesn't have OFD locking support in its glibc. Will add a check in

[Qemu-devel] [PATCH v4 0/3] file-posix: Simplifications on image locking

2018-08-20 Thread Fam Zheng
the regression caused by v2). Fam Zheng (3): file-posix: Skip effectiveless OFD lock operations file-posix: Drop s->lock_fd tests: Add unit tests for image locking block/file-posix.c | 83 tests/Makefile.include | 2 + tests/test-image-locking.c |

[Qemu-devel] [PATCH v4 1/3] file-posix: Skip effectiveless OFD lock operations

2018-08-20 Thread Fam Zheng
changes. This patch is an easy fix to this and the change is regardlessly reasonable, so do it. Signed-off-by: Fam Zheng --- v3: Don't misuse s->perm and s->shared_perm. v2: For s == NULL, unlock all bits. [Kevin] --- block/file-posix.c | 54 +-

[Qemu-devel] [PATCH v4 2/3] file-posix: Drop s->lock_fd

2018-08-20 Thread Fam Zheng
The lock_fd field is not strictly necessary because transferring locked bytes from old fd to the new one shouldn't fail anyway. This spares the user one fd per image. Signed-off-by: Fam Zheng --- block/file-posix.c | 37 + 1 file changed, 13 insertions(+), 24

Re: [Qemu-devel] [PATCH 0/4] docker: Sort packages

2018-08-20 Thread Fam Zheng
On Fri, 08/17 22:53, Philippe Mathieu-Daudé wrote: > Trivial cleanup patches. > > Per the Docker recommendation, "this helps to avoid duplication of > packages and make the list much easier to update. This also makes PRs > a lot easier to read and review." > > Regards, > > Phil. > > Philippe

Re: [Qemu-devel] [PATCH] docker: Clean dangling tarball files

2018-08-20 Thread Fam Zheng
On Sat, 08/18 00:03, Philippe Mathieu-Daudé wrote: > When a container fails, it leaves a dangling tarball which name is > based on a timestamp. Further uses of make won't clean those files, > neither calling the 'docker-clean' target. > > Use the .DELETE_ON_ERROR built-in target to let make

[Qemu-devel] [PATCH v4 3/3] tests: Add unit tests for image locking

2018-08-20 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/Makefile.include | 2 + tests/test-image-locking.c | 154 + 2 files changed, 156 insertions(+) create mode 100644 tests/test-image-locking.c diff --git a/tests/Makefile.include b/tests/Makefile.include index

Re: [Qemu-devel] [PATCH] tests/vm: Clean out old working directories on build

2018-08-20 Thread Fam Zheng
er: not actually tested yet, but obviously it will > get tested as part of applying it to master, which I'd > like to do so my pullrequest tests don't keep getting > tripped up by this bug. Reviewed-by: Fam Zheng Please merge this yourself if it helps your pull request handling workflo

Re: [Qemu-devel] [PATCH v2 00/60] json: Fixes, error reporting improvements, cleanups

2018-08-20 Thread Fam Zheng
On Mon, 08/20 10:31, Markus Armbruster wrote: > no-re...@patchew.org writes: > > > Hi, > > > > This series seems to have some coding style problems. See output below for > > more information: > [...] > > Checking PATCH 4/60: qmp-cmd-test: Split off qmp-test... > > WARNING: added, moved or deleted

Re: [Qemu-devel] [PATCH 2/2] qemu-img: Add dd seek= option

2018-08-19 Thread Fam Zheng
On Thu, 08/16 04:20, Max Reitz wrote: > No, the real issue is that dd is still not implemented just as a > frontend to convert. Which it should be. I'm not sure dd was a very > good idea from the start, and now it should ideally be a frontend to > convert. > > (My full opinion on the matter: dd

Re: [Qemu-devel] [PATCH v2 0/9] synchronization profiler

2018-08-18 Thread Fam Zheng
On Fri, 08/17 19:14, no-re...@patchew.org wrote: > This series failed docker-clang@ubuntu build test. Please find the testing > commands and > their output below. If you have Docker installed, you can probably reproduce > it > locally. > > Type: series > Message-id:

Re: [Qemu-devel] vm-tests images disks filling up?

2018-08-17 Thread Fam Zheng
On Fri, 08/17 11:26, Peter Maydell wrote: > I just ran into a build failure using the tests/vm/ BSD build tests, > because the NetBSD build image's disk filled up. > > Looking more closely there seemed to be 9 stale build trees in > the VM's /var/tmp/qemu-test.* , which is why the disk was full >

[Qemu-devel] [PATCH v3 3/3] tests: Add unit tests for image locking

2018-08-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/Makefile.include | 2 + tests/test-image-locking.c | 152 + 2 files changed, 154 insertions(+) create mode 100644 tests/test-image-locking.c diff --git a/tests/Makefile.include b/tests/Makefile.include index

[Qemu-devel] [PATCH v3 2/3] file-posix: Drop s->lock_fd

2018-08-16 Thread Fam Zheng
The lock_fd field is not strictly necessary because transferring locked bytes from old fd to the new one shouldn't fail anyway. This spares the user one fd per image. Signed-off-by: Fam Zheng --- block/file-posix.c | 37 + 1 file changed, 13 insertions(+), 24

[Qemu-devel] [PATCH v3 1/3] file-posix: Skip effectiveless OFD lock operations

2018-08-16 Thread Fam Zheng
changes. This patch is an easy fix to this and the change is regardlessly reasonable, so do it. Signed-off-by: Fam Zheng --- v3: Don't misuse s->perm and s->shared_perm. v2: For s == NULL, unlock all bits. [Kevin] --- block/file-posix.c | 54 +-

[Qemu-devel] [PATCH v3 0/3] file-posix: Simplifications on image locking

2018-08-16 Thread Fam Zheng
The first patch reduces chances of QEMU crash in unusual (but not unlikely) cases especially when used by Libvirt (see commit message). The second patch halves fd for images. The third adds some more test for patch one (would have caught the regression caused by v2). Fam Zheng (3): file-posix

Re: [Qemu-devel] [PATCH 1/3] qsp: QEMU's Synchronization Profiler

2018-08-15 Thread Fam Zheng
On Thu, 08/16 00:29, Emilio G. Cota wrote: > On Wed, Aug 15, 2018 at 19:55:14 -0400, Emilio G. Cota wrote: > > On Wed, Aug 15, 2018 at 00:53:23 -0400, Emilio G. Cota wrote: > > > On Wed, Aug 15, 2018 at 11:09:42 +0800, Fam Zheng wrote: > > > > On Mon, 08/

Re: [Qemu-devel] [PULL 00/17] Block and testing patches

2018-08-15 Thread Fam Zheng
On Wed, 08/15 16:35, Peter Maydell wrote: > On 15 August 2018 at 04:12, Fam Zheng wrote: > > The following changes since commit 38441756b70eec5807b5f60dad11a93a91199866: > > > > Update version for v3.0.0 release (2018-08-14 16:38:43 +0100) > > > > test

Re: [Qemu-devel] [PATCH 1/3] qsp: QEMU's Synchronization Profiler

2018-08-15 Thread Fam Zheng
On Wed, 08/15 00:53, Emilio G. Cota wrote: > > > +#define QSP_GEN_VOID(type_, qsp_t_, func_, impl_) \ > > > +void func_(type_ *obj, const char *file, unsigned line) \ > > > +{ \ > > > +

[Qemu-devel] [PULL 17/17] aio-posix: Improve comment around marking node deleted

2018-08-14 Thread Fam Zheng
The counter is for qemu_lockcnt_inc/dec sections (read side), qemu_lockcnt_lock/unlock is for the write side. Suggested-by: Paolo Bonzini Signed-off-by: Fam Zheng Message-Id: <20180803063917.30292-1-f...@redhat.com> Signed-off-by: Fam Zheng --- util/aio-posix.c | 2 +- 1 file chan

[Qemu-devel] [PULL 11/17] tests: vm: Add vm-clean-all

2018-08-14 Thread Fam Zheng
The images are big. Add a rule to clean up easily. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Fam Zheng Message-Id: <20180716020008.31468-1-f...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Fam Zheng --- tests/vm/Makefile.i

[Qemu-devel] [PULL 16/17] tests/vm: Add vm-build-all/vm-clean-all in help text

2018-08-14 Thread Fam Zheng
Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Fam Zheng Message-Id: <20180727083445.21436-1-f...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Signed-off-by: Fam Zheng --- tests/vm/Makefile.include | 3 +++ 1 file changed, 3 insertions(+) diff --git a

[Qemu-devel] [PULL 06/17] aio: Do aio_notify_accept only during blocking aio_poll

2018-08-14 Thread Fam Zheng
l()'s can steal each other's ctx->notifier event and cause hanging just like described above. Cc: qemu-sta...@nongnu.org Suggested-by: Paolo Bonzini Signed-off-by: Fam Zheng Message-Id: <20180809132259.18402-3-f...@redhat.com> Signed-off-by: Fam Zheng --- util/aio-posix.c | 4 ++-- uti

[Qemu-devel] [PULL 15/17] tests/vm: Use make's --output-sync option

2018-08-14 Thread Fam Zheng
From: Peter Maydell Use make's --output-sync option when running tests inside VMs, so that if we're building with parallelization the output doesn't get scrambled. Signed-off-by: Peter Maydell Message-Id: <20180803085230.30574-6-peter.mayd...@linaro.org> Signed-off-by: Fam Zheng --- te

[Qemu-devel] [PULL 04/17] nvme: simplify plug/unplug

2018-08-14 Thread Fam Zheng
From: Paolo Bonzini bdrv_io_plug/bdrv_io_unplug take care of keeping a nesting count, so change s->plugged to just a bool. Signed-off-by: Paolo Bonzini Message-Id: <20180813144320.12382-2-pbonz...@redhat.com> Signed-off-by: Fam Zheng --- block/nvme.c | 20 ++-- 1 fil

[Qemu-devel] [PULL 09/17] tests: Allow overriding archive path with SRC_ARCHIVE

2018-08-14 Thread Fam Zheng
In VM based tests, the source archive is created in host, we don't have to run archive-source.sh again, as it complicates the Makefile and scripts. Signed-off-by: Fam Zheng Message-Id: <20180712012829.20231-4-f...@redhat.com> Tested-by: Philippe Mathieu-Daudé Signed-off-by: Fam

[Qemu-devel] [PULL 14/17] tests/vm: Bump guest RAM up from 2G to 4G

2018-08-14 Thread Fam Zheng
the setting up from 2G to 4G to give us some more headroom. Signed-off-by: Peter Maydell Message-Id: <20180803085230.30574-5-peter.mayd...@linaro.org> Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/te

[Qemu-devel] [PULL 05/17] aio-posix: Don't count ctx->notifier as progress when polling

2018-08-14 Thread Fam Zheng
The same logic exists in fd polling. This change is especially important to avoid busy loop once we limit aio_notify_accept() to blocking aio_poll(). Cc: qemu-sta...@nongnu.org Signed-off-by: Fam Zheng Message-Id: <20180809132259.18402-2-f...@redhat.com> Signed-off-by: Fam Zheng --- ut

[Qemu-devel] [PULL 13/17] tests/vm: Propagate V=1 down into the make inside the VM

2018-08-14 Thread Fam Zheng
: <20180803085230.30574-4-peter.mayd...@linaro.org> Signed-off-by: Fam Zheng --- docs/devel/testing.rst| 1 + tests/vm/Makefile.include | 1 + tests/vm/basevm.py| 5 - tests/vm/freebsd | 4 ++-- tests/vm/netbsd | 4 ++-- tests/vm/openbsd | 4 ++-- tests/vm/ubunt

[Qemu-devel] [PULL 08/17] tests: Add an option for snapshot (default: off)

2018-08-14 Thread Fam Zheng
Not using snapshot has the benefit of automatically persisting useful test harnesses, such as docker images and ccache database. Although it will lose some cleanness, it is imaginably useful for patchew. Signed-off-by: Fam Zheng Message-Id: <20180712012829.20231-2-f...@redhat.com>

[Qemu-devel] [PULL 07/17] docker: Install more packages in centos7

2018-08-14 Thread Fam Zheng
This makes test-block work. Signed-off-by: Fam Zheng Message-Id: <20180711065813.14894-1-f...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/centos7.docker | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/docker/docke

[Qemu-devel] [PULL 10/17] tests: Add centos VM testing

2018-08-14 Thread Fam Zheng
This one does docker testing in the VM. It is intended to replace the native docker testing on patchew testers. Signed-off-by: Fam Zheng Message-Id: <20180712012829.20231-5-f...@redhat.com> Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Fam

[Qemu-devel] [PULL 03/17] nvme: Fix nvme_init error handling

2018-08-14 Thread Fam Zheng
ose(). A third problem is nvme_close() misses g_free() and event_notifier_cleanup(). Fix all of them. Cc: qemu-sta...@nongnu.org Signed-off-by: Fam Zheng Message-Id: <20180712025420.4932-1-f...@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng --- block/nv

[Qemu-devel] [PULL 12/17] tests/vm: Pass the jobs parallelism setting to 'make check'

2018-08-14 Thread Fam Zheng
From: Peter Maydell Our test suite works for parallel execution too, and this can noticeably speed up a test run; pass the 'jobs' setting to it as well as to the build proper. Signed-off-by: Peter Maydell Message-Id: <20180803085230.30574-3-peter.mayd...@linaro.org> Signed-off-by: Fam

[Qemu-devel] [PULL 02/17] tests/vm: Add flex and bison to the vm image

2018-08-14 Thread Fam Zheng
make[1]: flex: Command not found Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20180628153535.1411-5-f4...@amsat.org> Signed-off-by: Fam Zheng --- tests/vm/ubuntu.i386 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386

[Qemu-devel] [PULL 01/17] tests/vm: Only use -cpu 'host' if KVM is available

2018-08-14 Thread Fam Zheng
:25: recipe for target 'tests/vm/ubuntu.i386.img' failed make: *** [tests/vm/ubuntu.i386.img] Error 2 Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20180628153535.1411-4-f4...@amsat.org> Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 3 ++- 1 file changed, 2 insertions(+), 1 de

[Qemu-devel] [PULL 00/17] Block and testing patches

2018-08-14 Thread Fam Zheng
and me Fam Zheng (10): nvme: Fix nvme_init error handling aio-posix: Don't count ctx->notifier as progress when polling aio: Do aio_notify_accept only during blocking aio_poll docker: Install more packages in centos7 te

Re: [Qemu-devel] [PATCH 1/3] qsp: QEMU's Synchronization Profiler

2018-08-14 Thread Fam Zheng
On Mon, 08/13 13:11, Emilio G. Cota wrote: > + --enable-sync-profiler) sync_profiler="yes" > + ;; Curious, not asking for a change: can this be made a runtime option instead of compile time, since there's no library dependencies? That should make this somewhat easier to use. > + > +#define

Re: [Qemu-devel] [PATCH v2] file-posix: Skip effectiveless OFD lock operations

2018-08-14 Thread Fam Zheng
On Tue, 08/14 10:22, Kevin Wolf wrote: > Am 14.08.2018 um 10:12 hat Fam Zheng geschrieben: > > On Mon, 08/13 15:42, Kevin Wolf wrote: > > > Am 13.08.2018 um 04:39 hat Fam Zheng geschrieben: > > > > If we know we've already locked the bytes, don't do it again; similar

Re: [Qemu-devel] [PATCH v2] file-posix: Skip effectiveless OFD lock operations

2018-08-14 Thread Fam Zheng
On Mon, 08/13 15:42, Kevin Wolf wrote: > Am 13.08.2018 um 04:39 hat Fam Zheng geschrieben: > > If we know we've already locked the bytes, don't do it again; similarly > > don't unlock a byte if we haven't locked it. This doesn't change the > > behavior, but fixes a corner

[Qemu-devel] [PATCH] luks: Allow share-rw=on

2018-08-14 Thread Fam Zheng
on virtual devices. Suggested-by: Daniel P. Berrangé Signed-off-by: Fam Zheng --- block/crypto.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/crypto.c b/block/crypto.c index 146d81c90a..33ee01bebd 100644 --- a/block/crypto.c +++ b/block/crypto.c @@ -627,7 +627,9

Re: [Qemu-devel] [PATCH v2] nvme: correct locking around completion

2018-08-14 Thread Fam Zheng
On Tue, 08/14 08:27, Paolo Bonzini wrote: > nvme_poll_queues is already protected by q->lock, and > AIO callbacks are invoked outside the AioContext lock. > So remove the acquire/release pair in nvme_handle_event. > > Signed-off-by: Paolo Bonzini > --- > block/nvme.c | 2 -- > 1 file changed, 2

Re: [Qemu-devel] [PATCH v3 0/2] Fix aio_notify_accept()

2018-08-13 Thread Fam Zheng
On Thu, 08/09 21:22, Fam Zheng wrote: > v3: Fix commit message's bug description. [Paolo] If there's no objection, I'm queuing this for 3.1. Fam

Re: [Qemu-devel] [PATCH] nvme: simplify plug/unplug

2018-08-13 Thread Fam Zheng
On Mon, 08/13 16:43, Paolo Bonzini wrote: > bdrv_io_plug/bdrv_io_unplug take care of keeping a nesting count, > so change s->plugged to just a bool. > > Signed-off-by: Paolo Bonzini Queued, thanks. Fam

Re: [Qemu-devel] [PATCH 0/3] expose VIRTIO_SCSI_F_T10_PI for vhost-scsi and vhost-user-scsi

2018-08-13 Thread Fam Zheng
| 3 +++ > hw/scsi/vhost-user-scsi.c | 28 ++- > include/hw/virtio/vhost-scsi-common.h | 1 + > include/hw/virtio/vhost-user-scsi.h | 1 - > 5 files changed, 17 insertions(+), 19 deletions(-) Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH] nvme: simplify code around completion

2018-08-13 Thread Fam Zheng
On Mon, 08/13 16:43, Paolo Bonzini wrote: > nvme_poll_queues is already protected by q->lock, and > AIO callbacks are invoked outside the AioContext lock. > So remove the acquire/release pair in nvme_handle_event. > > Remove unnecessary variable in in nvme_poll_cb. > > Signed-off-by: Paolo

[Qemu-devel] [PATCH v2] file-posix: Skip effectiveless OFD lock operations

2018-08-12 Thread Fam Zheng
changes. This patch is an easy fix to this and the change is regardlessly reasonable, so do it. Signed-off-by: Fam Zheng --- v2: For s == NULL, unlock all bits. [Kevin] --- block/file-posix.c | 41 +++-- 1 file changed, 31 insertions(+), 10 deletions(-) diff

Re: [Qemu-devel] [PATCH] file-posix: Skip effectiveless OFD lock operations

2018-08-12 Thread Fam Zheng
On Fri, 08/10 14:14, Kevin Wolf wrote: > Am 18.07.2018 um 10:43 hat Fam Zheng geschrieben: > > If we know we've already locked the bytes, don't do it again; similarly > > don't unlock a byte if we haven't locked it. This doesn't change the > > behavior, but fixes a corner

[Qemu-devel] [PATCH v3 1/2] aio-posix: Don't count ctx->notifier as progress when polling

2018-08-09 Thread Fam Zheng
The same logic exists in fd polling. This change is especially important to avoid busy loop once we limit aio_notify_accept() to blocking aio_poll(). Cc: qemu-sta...@nongnu.org Signed-off-by: Fam Zheng --- util/aio-posix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH v3 2/2] aio: Do aio_notify_accept only during blocking aio_poll

2018-08-09 Thread Fam Zheng
l()'s can steal each other's ctx->notifier event and cause hanging just like described above. Cc: qemu-sta...@nongnu.org Suggested-by: Paolo Bonzini Signed-off-by: Fam Zheng --- util/aio-posix.c | 4 ++-- util/aio-win32.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/

[Qemu-devel] [PATCH v3 0/2] Fix aio_notify_accept()

2018-08-09 Thread Fam Zheng
o_poll(iothread->ctx, true) in the IOThread. This can cause IOThread hanging. Fam Zheng (2): aio-posix: Don't count ctx->notifier as progress when polling aio: Do aio_notify_accept only during blocking aio_poll util/aio-posix.c | 7 --- util/aio-win32.c | 3 ++- 2 files changed, 6 inse

Re: [Qemu-devel] [PATCH v2 2/2] aio: Do aio_notify_accept only during blocking aio_poll

2018-08-07 Thread Fam Zheng
On Tue, 08/07 12:15, Paolo Bonzini wrote: > On 07/08/2018 11:16, Fam Zheng wrote: > > main thread IO Thread > > === > > bdrv_drained_begin() > >

[Qemu-devel] [PATCH v2 2/2] aio: Do aio_notify_accept only during blocking aio_poll

2018-08-07 Thread Fam Zheng
e_thread), because otherwise two blocking aio_poll()'s can steal each other's ctx->notifier event and cause hanging just like described above. Suggested-by: Paolo Bonzini Signed-off-by: Fam Zheng --- util/aio-posix.c | 4 ++-- util/aio-win32.c | 3 ++- 2 files changed, 4 insertions(+), 3

[Qemu-devel] [PATCH v2 0/2] Fix aio_notify_accept()

2018-08-07 Thread Fam Zheng
can cause IOThread hanging. Fam Zheng (2): aio-posix: Don't count ctx->notifier as progress when polling aio: Do aio_notify_accept only during blocking aio_poll util/aio-posix.c | 7 --- util/aio-win32.c | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) -- 2.17.1

[Qemu-devel] [PATCH v2 1/2] aio-posix: Don't count ctx->notifier as progress when polling

2018-08-07 Thread Fam Zheng
The same logic exists in fd polling. This change is especially important to avoid busy loop once we limit aio_notify_accept() to blocking aio_poll(). Cc: qemu-sta...@nongnu.org Signed-off-by: Fam Zheng --- util/aio-posix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [RFC PATCH] async: Fix aio_notify_accept

2018-08-06 Thread Fam Zheng
On Fri, 08/03 19:08, Paolo Bonzini wrote: > On 03/08/2018 17:49, Fam Zheng wrote: > > void aio_notify_accept(AioContext *ctx) > > { > > -if (atomic_xchg(>notified, false)) { > > +/* If ctx->notify_me >= 2, another aio_poll() is waiting which may &g

[Qemu-devel] [RFC PATCH] async: Fix aio_notify_accept

2018-08-03 Thread Fam Zheng
>From main loop, bdrv_set_aio_context() can call IOThread's aio_poll(). That breaks aio_notify() because the ctx->notifier event can get cleared too early by this which causes IOThread hanging. See https://bugzilla.redhat.com/show_bug.cgi?id=1562750 for details. Signed-off-by: Fam

Re: [Qemu-devel] [PATCH 0/5] tests/vm: various minor improvements

2018-08-03 Thread Fam Zheng
On Fri, 08/03 09:52, Peter Maydell wrote: > The setup I had for my BSD VMs broke today, so I thought I'd > have a look at using the tests/vm/ support for building QEMU > inside BSD VMs rather than re-rolling my own. This patchset > fixes some rough edges I ran into along the way: > * fixes

Re: [Qemu-devel] [PATCH 0/5] tests/vm: various minor improvements

2018-08-03 Thread Fam Zheng
On Fri, 08/03 09:52, Peter Maydell wrote: > The setup I had for my BSD VMs broke today, so I thought I'd > have a look at using the tests/vm/ support for building QEMU > inside BSD VMs rather than re-rolling my own. This patchset > fixes some rough edges I ran into along the way: > * fixes

Re: [Qemu-devel] [PATCH] qemu-img.c: Add examples section

2018-08-03 Thread Fam Zheng
On Thu, 08/02 22:34, Programmingkid wrote: > > > On Aug 2, 2018, at 10:10 PM, Fam Zheng wrote: > > > > On Thu, 08/02 20:50, John Arbuckle wrote: > >> Add an examples section to the help output. > >> > >> Signed-off-by: John Arbuckle >

[Qemu-devel] [PATCH] aio-posix: Improve comment around marking node deleted

2018-08-03 Thread Fam Zheng
The counter is for qemu_lockcnt_inc/dec sections (read side), qemu_lockcnt_lock/unlock is for the write side. Suggested-by: Paolo Bonzini Signed-off-by: Fam Zheng --- util/aio-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/aio-posix.c b/util/aio-posix.c index

Re: [Qemu-devel] Node deletion in aio_set_fd_handler

2018-08-03 Thread Fam Zheng
On Fri, 08/03 08:13, Paolo Bonzini wrote: > On 03/08/2018 04:42, Fam Zheng wrote: > > Paolo, is this else branch dead code (or bug?): > > > > /* If the lock is held, just mark the node as deleted */ > > if (qemu_lockcnt_count(>list_lock)) { >

[Qemu-devel] Node deletion in aio_set_fd_handler

2018-08-02 Thread Fam Zheng
Paolo, is this else branch dead code (or bug?): /* If the lock is held, just mark the node as deleted */ if (qemu_lockcnt_count(>list_lock)) { node->deleted = 1; node->pfd.revents = 0; } else { /* Otherwise, delete it for real. We can't

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