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

2018-11-14 Thread Fam Zheng
On Sun, 11/11 18:20, Brad Smith wrote: > ping. Queued. Will send a pull request soon. Fam > > On 10/30/2018 10:57 PM, Fam Zheng wrote: > > Upgrade OpenBSD to 6.4 using auto_install. Especially, drop SDL1, > > include SDL2. > > > > Also do the build in $

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

2018-11-07 Thread Fam Zheng
On Thu, 10/11 15:21, Fam Zheng wrote: > v5: Address Max's comments (Thanks for reviewing): > - Clean up after test done. > - Add rev-by to patch 1 and 2. Ping? Fam

Re: [Qemu-devel] [PATCH 0/2] target/arm: fix some ATS* bugs

2018-11-06 Thread Fam Zheng
On Tue, 11/06 01:50, no-re...@patchew.org wrote: > ERROR: unknown option --with-gtkabi=3.0 Patchew is testing old series branches of which are heavily lagging behind. This configure option in the mingw docker testing is recently dropped, so it's a false positive. Fam > Try

Re: [Qemu-devel] [PATCH] docker: Use a stable snapshot for Debian Sid

2018-11-02 Thread Fam Zheng
On Fri, Nov 2, 2018 at 3:20 PM Philippe Mathieu-Daudé wrote: > > Hi Fam, > > Thanks for picking this. > > On Fri, Nov 2, 2018 at 7:48 AM Fam Zheng wrote: > > On Thu, 11/01 19:37, Philippe Mathieu-Daudé wrote: > > > The Debian Sid repository is not garanteed to

Re: [Qemu-devel] [PATCH] docker: Use a stable snapshot for Debian Sid

2018-11-02 Thread Fam Zheng
On Thu, 11/01 19:37, Philippe Mathieu-Daudé wrote: > The Debian Sid repository is not garanteed to be stable, as his > 'unstable' name suggest :) > To allow quick testing, packages are pushed various time a day, > which my be annoying when trying to use it for stable development > (which is not

Re: [Qemu-devel] [PATCH] block/nvme: optimize the performance of nvme driver based on vfio-pci

2018-11-02 Thread Fam Zheng
On Thu, 11/01 18:38, Li Feng wrote: > When the IO size is larger than 2 pages, we move the the pointer one by > one in the pagelist, this is inefficient. > > This is a simple benchmark result: > > Before: > $ qemu-io -c 'write 0 1G' nvme://:00:04.0/1 > > wrote 1073741824/1073741824 bytes at

Re: [Qemu-devel] [PATCH] tests/vm: Use subprocess.Popen() with to uncompress XZ files

2018-11-01 Thread Fam Zheng
On Sat, 10/13 02:30, Philippe Mathieu-Daudé wrote: > Avoiding the file copy greatly speeds the process up. > > Comparison with network file already cached, stopping after build_image(): > > Before: > $ time make vm-build-freebsd > real1m38.153s > user1m16.871s > sys 0m19.325s

[Qemu-devel] [PATCH v3] file-posix: Use error API properly

2018-11-01 Thread Fam Zheng
. Suggested-by: Markus Armbruster Signed-off-by: Fam Zheng --- v3: Use error_setg_errno. [Eric] v2: Add Error ** to raw_normalize_devicepath. [Markus] Use error_printf for splitting multi-sentence message. [Markus] --- block/file-posix.c | 39 --- 1 file

Re: [Qemu-devel] [PATCH v2] file-posix: Use error API properly

2018-11-01 Thread Fam Zheng
On Wed, 10/31 15:51, Markus Armbruster wrote: > Fam Zheng writes: > > > Use error_report for situations that affect user operation (i.e. we're > > actually returning error), and warn_report/warn_report_err when some > > less critical error happened but the user o

Re: [Qemu-devel] [PATCH] iotests: 082: Update output

2018-10-31 Thread Fam Zheng
On Wed, 10/31 16:04, Fam Zheng wrote: > Commit 9cbef9d68e (qemu-option: improve qemu_opts_print_help() output) > affected qemu-img help output, and broke this test case. > > Update the output reference to fix it. > > Signed-off-by: Fam Zheng > > --- > > I'm

[Qemu-devel] [PATCH] iotests: 082: Update output

2018-10-31 Thread Fam Zheng
Commit 9cbef9d68e (qemu-option: improve qemu_opts_print_help() output) affected qemu-img help output, and broke this test case. Update the output reference to fix it. Signed-off-by: Fam Zheng --- I'm once again looking at enabling iotests on patchew (via vm based tests), but immediately got

[Qemu-devel] [PATCH v2] file-posix: Use error API properly

2018-10-30 Thread Fam Zheng
. Suggested-by: Markus Armbruster Signed-off-by: Fam Zheng --- v2: Add Error ** to raw_normalize_devicepath. [Markus] Use error_printf for splitting multi-sentence message. [Markus] --- block/file-posix.c | 39 --- 1 file changed, 16 insertions(+), 23 deletions

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

2018-10-30 Thread Fam Zheng
Upgrade OpenBSD to 6.4 using auto_install. Especially, drop SDL1, include SDL2. Also do the build in $HOME since both /var/tmp and /tmp are tmpfs with limited capacities. Signed-off-by: Fam Zheng --- v4: Use 6.4. [Brad] --- tests/vm/basevm.py | 6 ++-- tests/vm/openbsd | 85

[Qemu-devel] [PULL 7/9] tests/vm: Let kvm_available() work in cross environments

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-7-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- scripts/qemu.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/qemu.py b/scripts/qemu.py

[Qemu-devel] [PULL 8/9] tests/vm: Do not use -enable-kvm if HOST != TARGET architecture

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-8-f4...@amsat.org> Reviewed-by: Richard Henderson 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

[Qemu-devel] [PULL 0/9] Testing patches

2018-10-26 Thread Fam Zheng
The following changes since commit 808ebd66e467f77c0d1f8c6346235f81e9c99cf2: Merge remote-tracking branch 'remotes/riscv/tags/riscv-for-master-3.1-sf0' into staging (2018-10-25 17:41:03 +0100) are available in the Git repository at: git://github.com/famz/qemu.git tags/testing-pull-request

[Qemu-devel] [PULL 4/9] tests/vm: Do not use the -smp option with a single cpu

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-4-f4...@amsat.org> Reviewed-by: Richard Henderson 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

[Qemu-devel] [PULL 5/9] tests/vm: Display remaining seconds to wait for a VM to start

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-5-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/vm/basev

[Qemu-devel] [PULL 2/9] tests/vm: Extract the kvm_available() handy function

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-2-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- scripts/qemu.py| 4 tests/vm/basevm.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-)

[Qemu-devel] [PULL 6/9] tests/vm: Add a BaseVM::arch property

2018-10-26 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 4 +++- tests/vm/centos | 1 + tests/vm/freebsd | 1 + tests/vm/netbsd | 1 + tests/vm/openbsd | 1 + tests/vm/ubuntu.i386 | 1 + 6 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py

[Qemu-devel] [PULL 9/9] tests/vm: Do not abuse parallelism when HOST != TARGET architecture

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-9-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/vm/bas

[Qemu-devel] [PULL 3/9] tests/vm: Do not abuse parallelism when KVM is not available

2018-10-26 Thread Fam Zheng
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20181013004034.6968-3-f4...@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/vm/bas

[Qemu-devel] [PULL 1/9] tests: docker: update test-mingw for GTK+ 2.0 removal

2018-10-26 Thread Fam Zheng
viewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Fam Zheng --- tests/docker/test-mingw | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/docker/test-mingw b/tests/docker/test-mingw index 7cca7e16a6..b078f22879 100755 --- a/tests/docker/test-mingw +++ b

Re: [Qemu-devel] [PATCH v3 0/8] tests/vm: Improvements when KVM is not available

2018-10-22 Thread Fam Zheng
On Sat, 10/13 02:40, Philippe Mathieu-Daudé wrote: > Hi Fam, > > Few patches I added while testing the VM tests without KVM access. > I doubt many people want to suffer using TCG for VM testing, but > it was handy to debug/support aarch64 VM tests. > > Also this could be a useful TCG stress

[Qemu-devel] [PATCH] file-posix: Use error API properly

2018-10-22 Thread Fam Zheng
Use error_report for situations that affect user operation (i.e. we're actually returning error), and warn_report/warn_report_err when some less critical error happened but the user operation can still carry on. Suggested-by: Markus Armbruster Signed-off-by: Fam Zheng --- block/file-posix.c

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

2018-10-22 Thread Fam Zheng
On Sun, 10/21 21:25, Samuel Thibault wrote: > Hello, > > Fam Zheng, le ven. 14 sept. 2018 15:26:16 +0800, a ecrit: > > 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 > >

Re: [Qemu-devel] [PATCH] tests: docker: update test-mingw for GTK+ 2.0 removal

2018-10-22 Thread Fam Zheng
On Thu, 10/18 20:10, Paolo Bonzini wrote: > --with-gtkabi does not exist anymore; remove it from the configure invocation. > > Signed-off-by: Paolo Bonzini > --- > tests/docker/test-mingw | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/tests/docker/test-mingw

[Qemu-devel] [PULL 0/2] Block patches

2018-10-11 Thread Fam Zheng
The following changes since commit 75e50c80e051423a6f55a34ee4a1eec842444a5b: Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-10-10' into staging (2018-10-11 10:43:37 +0100) are available in the Git repository at: git://github.com/famz/qemu.git tags/block-pull-request for

[Qemu-devel] [PULL 1/2] iothread: fix crash with invalid properties

2018-10-11 Thread Fam Zheng
ned-off-by: Marc-André Lureau Message-Id: <20180821100716.13803-1-marcandre.lur...@redhat.com> Signed-off-by: Fam Zheng --- iothread.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/iothread.c b/iothread.c index aff1281257..2fb1cdf55d 100644 --- a/iothrea

[Qemu-devel] [PULL 2/2] nvme: correct locking around completion

2018-10-11 Thread Fam Zheng
From: Paolo Bonzini 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 Message-Id: <20180814062739.19640-1-pbonz...@redhat.com> Signed-of

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

2018-10-11 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 Reviewed-by: Max Reitz --- block/file-posix.c | 37 + 1 file

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

2018-10-11 Thread Fam Zheng
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: Skip effectiveless OFD lock operations file-posix: Drop s->lock_fd tests: Add unit tests for image locking block/file-posi

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

2018-10-11 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 Reviewed-by: Max Reitz --- block/file-posix.c | 54 +- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/block/file

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

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

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

2018-10-10 Thread Fam Zheng
On Wed, 10/10 13:19, Paolo Bonzini wrote: > On 09/10/2018 21:37, John Snow wrote: > > > > > > On 08/14/2018 02:27 AM, 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

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

2018-10-10 Thread Fam Zheng
On Wed, 10/10 13:19, Paolo Bonzini wrote: > On 09/10/2018 21:37, John Snow wrote: > > > > > > On 08/14/2018 02:27 AM, 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

Re: [Qemu-devel] [PATCH v2 2/3] tests/vm: Do not abuse parallelism when KVM is not available

2018-10-10 Thread Fam Zheng
On Mon, 10/01 01:23, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > v2: Add get_default_jobs (Fam suggestion) > --- > tests/vm/basevm.py | 13 ++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py

Re: [Qemu-devel] [PATCH] util: aio-posix: fix a typo

2018-10-08 Thread Fam Zheng
On Sun, 10/07 19:16, Li Qiang wrote: > Cc: qemu-triv...@nongnu.org > Signed-off-by: Li Qiang Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH v3] vmdk: align end of file to a sector boundary

2018-10-07 Thread Fam Zheng
On Fri, 10/05 10:00, yuchenlin wrote: > Ping? Hi, This was merged as 51b3c6b73acae1e3fd3c7d441fc86dd17356695f. Fam > > On 2018-09-13 16:34, Fam Zheng wrote: > > On Thu, 09/13 16:29, yuchen...@synology.com wrote: > > > From: yuchenlin > > > > > > T

Re: [Qemu-devel] [PATCH RFC v4 7/7] qemu_thread_create: propagate the error to callers to handle

2018-09-28 Thread Fam Zheng
On Wed, Sep 26, 2018 at 7:13 PM Fei Li wrote: > > > > On 09/26/2018 06:36 PM, Fam Zheng wrote: > > On Wed, 09/26 18:02, Fei Li wrote: > >> diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c > >> index 289af4fab5..8b044e2798 100644 > >> -

Re: [Qemu-devel] [Qemu-stable] [PATCH] block-backend: Set werror/rerror defaults in blk_new()

2018-09-28 Thread Fam Zheng
hared_perm = shared_perm; > blk_set_enable_write_cache(blk, true); > > +blk->on_read_error = BLOCKDEV_ON_ERROR_REPORT; > +blk->on_write_error = BLOCKDEV_ON_ERROR_ENOSPC; > + > block_acct_init(>stats); > > notifier_list_init(>remove_bs_notifiers); > -- > 2.13.6 > > Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH] hw/scsi/mptendian: Avoid taking address of fields in packed structs

2018-09-28 Thread Fam Zheng
On Fri, 09/28 11:25, Peter Maydell wrote: > On 28 September 2018 at 09:15, Fam Zheng wrote: > > On Thu, 09/27 14:48, Peter Maydell wrote: > >> NB: tested with qemu-system-x86_64 -cpu host -enable-kvm -m 4096 > >> -device mptsas1068 -drive id=mydisk,if=none,file=harddi

Re: [Qemu-devel] [PATCH] hw/scsi/mptendian: Avoid taking address of fields in packed structs

2018-09-28 Thread Fam Zheng
he guest I have (an x86 ubuntu) seems to detect the controller > but not find any disks attached to it. Maybe my command line is wrong? But do you see a /dev/sda in guest (or does it boot at all)? Anyway the patch looks correct, so Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH RFC v4 7/7] qemu_thread_create: propagate the error to callers to handle

2018-09-26 Thread Fam Zheng
On Wed, 09/26 18:02, Fei Li wrote: > diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c > index 289af4fab5..8b044e2798 100644 > --- a/util/qemu-thread-posix.c > +++ b/util/qemu-thread-posix.c > @@ -15,6 +15,7 @@ > #include "qemu/atomic.h" > #include "qemu/notify.h" > #include

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

2018-09-26 Thread Fam Zheng
t, add a new Error parameter to make > the call trace to propagate the err to the final caller. > > Signed-off-by: Fei Li Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH] iothread: fix crash with invalid properties

2018-09-26 Thread Fam Zheng
On Wed, 09/26 12:33, Marc-André Lureau wrote: > Hi > > On Wed, Sep 26, 2018 at 12:13 PM Fam Zheng wrote: > > > > On Tue, 08/21 12:07, Marc-André Lureau wrote: > > > -object iothread,id=foo,? will crash qemu: > > > > > > qemu-system-x86_64:qemu-

Re: [Qemu-devel] [PATCH] iothread: fix crash with invalid properties

2018-09-26 Thread Fam Zheng
On Tue, 08/21 12:07, Marc-André Lureau wrote: > -object iothread,id=foo,? will crash qemu: > > qemu-system-x86_64:qemu-thread-posix.c:128: qemu_cond_destroy: Assertion > `cond->initialized' failed. > > Use thread_id != -1 to check if iothread_complete() finished > successfully and the

[Qemu-devel] [PATCH v2] virtio: Return true from virtio_queue_empty if broken

2018-09-25 Thread Fam Zheng
irtio_queue_empty will now return 1 as soon as the vdev is marked as broken, after a "virtio: zero sized buffers are not allowed" error. To be consistent, update virtio_queue_empty_rcu as well. Signed-off-by: Fam Zheng --- v2: - Drop ATS condition from the patch description sin

[Qemu-devel] [PULL 4/5] tests/vm: Use -cpu max rather than -cpu host

2018-09-25 Thread Fam Zheng
From: Peter Maydell -cpu max works with any accelerator, so we don't need to use it only conditionally if not using KVM. Just use it all the time. Signed-off-by: Peter Maydell Message-Id: <2018082014.23476-1-peter.mayd...@linaro.org> Signed-off-by: Fam Zheng --- tests/vm/basevm.

[Qemu-devel] [PULL 5/5] vmdk: align end of file to a sector boundary

2018-09-25 Thread Fam Zheng
/Os. Signed-off-by: yuchenlin Message-Id: <20180913082952.3675-1-yuchen...@synology.com> Reviewed-by: Fam Zheng Signed-off-by: Fam Zheng --- block/vmdk.c | 21 + 1 file changed, 21 insertions(+) diff --git a/block/vmdk.c b/block/vmdk.c index a9d0084e36..2c9e86d98f

[Qemu-devel] [PULL 2/5] aio-posix: compute timeout before polling

2018-09-25 Thread Fam Zheng
. Fixes: 70232b5253a3c4e03ed1ac47ef9246a8ac66c6fa Signed-off-by: Paolo Bonzini Message-Id: <20180912171040.1732-3-pbonz...@redhat.com> Reviewed-by: Fam Zheng Signed-off-by: Fam Zheng --- util/aio-posix.c | 59 +++ util/trace-events | 4 ++-- 2

[Qemu-devel] [PULL 3/5] aio-posix: do skip system call if ctx->notifier polling succeeds

2018-09-25 Thread Fam Zheng
o that the bug fix of commit 70232b5253 still stands. Fixes: 70232b5253a3c4e03ed1ac47ef9246a8ac66c6fa Signed-off-by: Paolo Bonzini Message-Id: <20180912171040.1732-4-pbonz...@redhat.com> Reviewed-by: Fam Zheng Signed-off-by: Fam Zheng --- util/aio-posix.c | 7 --- 1 file changed

[Qemu-devel] [PULL 1/5] aio-posix: fix concurrent access to poll_disable_cnt

2018-09-25 Thread Fam Zheng
polling iteration. There are no particular needs for ordering, since the polling loop is terminated anyway by aio_notify at the end of aio_set_fd_handler. Signed-off-by: Paolo Bonzini Message-Id: <20180912171040.1732-2-pbonz...@redhat.com> Reviewed-by: Fam Zheng Signed-off-by: Fam

[Qemu-devel] [PULL 0/5] Block and testing patches

2018-09-25 Thread Fam Zheng
The following changes since commit c5e4e49258e9b89cb34c085a419dd9f862935c48: Merge remote-tracking branch 'remotes/xanclic/tags/pull-block-2018-09-25' into staging (2018-09-25 16:47:35 +0100) are available in the Git repository at: git://github.com/famz/qemu.git tags/staging-pull-request

Re: [Qemu-devel] [PATCH] tests/vm: Use -cpu max rather than -cpu host

2018-09-25 Thread Fam Zheng
On Tue, 09/25 15:54, Peter Maydell wrote: > Ping? Will send a pull request soon, thanks. Fam > > thanks > -- PMM > > On 20 August 2018 at 16:55, Peter Maydell wrote: > > -cpu max works with any accelerator, so we don't need > > to use it only conditionally if not using KVM. Just use > > it

Re: [Qemu-devel] [PATCH 2/2] MAINTAINERS: Remove myself as block maintainer

2018-09-25 Thread Fam Zheng
On Tue, 09/25 09:37, Markus Armbruster wrote: > Do we want to have a dedicated VHDX driver submaintainer again? Fam, > you're maintaining VMDK, could you cover VHDX as well? I don't know a lot VHDX internals. Considering my capacity at the moment I'd rather not take this one. Fam

Re: [Qemu-devel] [PATCH 2/2] MAINTAINERS: Remove myself as block maintainer

2018-09-24 Thread Fam Zheng
om/codyprime/qemu-kvm-jtc.git block > > > > CURL > > -M: Jeff Cody > > L: qemu-bl...@nongnu.org > > S: Supported > > F: block/curl.c > > -T: git git://github.com/codyprime/qemu-kvm-jtc.git block > > Likewise. > > > GLUSTER > > -M: Jeff Cody > > L: qemu-bl...@nongnu.org > > S: Supported > > F: block/gluster.c > > -T: git git://github.com/codyprime/qemu-kvm-jtc.git block > > Likewise. > > > Null Block Driver > > M: Fam Zheng > Block drivers without an M: naturally fall under the overall maintainership of block layer (Kevin), so IMO keeping the statuses is fine. Maybe CURL can be degraded to Maintained, though. Fam

[Qemu-devel] [PATCH] file-posix: Include filename in locking error message

2018-09-24 Thread Fam Zheng
ge. Hoist the error_append_hint to the caller of raw_check_lock_bytes where file name is known, and include it in the error hint. Signed-off-by: Fam Zheng --- block/file-posix.c | 10 +++-- tests/qemu-iotests/153.out | 76 +++--- tests/qemu-iotests/182.out

Re: [Qemu-devel] [PATCH RFC v3 7/7] qemu_thread_create: propagate the error to callers to handle

2018-09-20 Thread Fam Zheng
On Thu, 09/20 18:19, Fei Li wrote: > > > On 09/19/2018 11:51 PM, Fam Zheng wrote: > > On Wed, 09/19 21:35, Fei Li wrote: > > > Make qemu_thread_create() return a Boolean to indicate if it succeeds > > > rather than failing with an error. And add an Error paramete

Re: [Qemu-devel] [PATCH RFC v3 7/7] qemu_thread_create: propagate the error to callers to handle

2018-09-20 Thread Fam Zheng
On Wed, 09/19 23:51, Fam Zheng wrote: > > diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c > > index d7a4bbd91f..e7cbb0c368 100644 > > --- a/hw/rdma/rdma_backend.c > > +++ b/hw/rdma/rdma_backend.c > > @@ -165,7 +165,8 @@ static void start_comp_thread(Rd

Re: [Qemu-devel] [PATCH RFC v3 0/7] qemu_thread_create: propagate errors to callers to check

2018-09-19 Thread Fam Zheng
On Wed, 09/19 21:35, Fei Li wrote: > Hi, > > This idea comes from BiteSizedTasks, and this patch series implement > the error checking of qemu_thread_create: make qemu_thread_create > return a flag to indicate if it succeeded rather than failing with an > error; make all callers check it. Looks

Re: [Qemu-devel] [PATCH RFC v3 7/7] qemu_thread_create: propagate the error to callers to handle

2018-09-19 Thread Fam Zheng
On Wed, 09/19 21:35, Fei Li wrote: > Make qemu_thread_create() return a Boolean to indicate if it succeeds > rather than failing with an error. And add an Error parameter to hold > the error message and let the callers handle it. > > Signed-off-by: Fei Li > --- > cpus.c |

Re: [Qemu-devel] [PATCH RFC v3 6/7] qemu_thread_join: fix segmentation fault

2018-09-19 Thread Fam Zheng
-win32.c > +++ b/util/qemu-thread-win32.c > @@ -366,7 +366,7 @@ void *qemu_thread_join(QemuThread *thread) > HANDLE handle; > > data = thread->data; > -if (data->mode == QEMU_THREAD_DETACHED) { > +if (data == NULL || data->mode == QEMU_THREAD_DETACHED) { > return NULL; > } > > -- > 2.13.7 > Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH RFC v3 3/7] qemu_init_vcpu: add a new Error parameter to propagate

2018-09-19 Thread Fam Zheng
t/tilegx/cpu.c > @@ -92,7 +92,9 @@ static void tilegx_cpu_realizefn(DeviceState *dev, Error > **errp) > } > > cpu_reset(cs); > -qemu_init_vcpu(cs); > +if (!qemu_init_vcpu(cs, errp)) { > +return; > +} > > tcc->parent_realize(dev, errp); > } > diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c > index 2edaef1aef..5482d6ea3f 100644 > --- a/target/tricore/cpu.c > +++ b/target/tricore/cpu.c > @@ -96,7 +96,9 @@ static void tricore_cpu_realizefn(DeviceState *dev, Error > **errp) > set_feature(env, TRICORE_FEATURE_13); > } > cpu_reset(cs); > -qemu_init_vcpu(cs); > +if (!qemu_init_vcpu(cs, errp)) { > +return; > +} > > tcc->parent_realize(dev, errp); > } > diff --git a/target/unicore32/cpu.c b/target/unicore32/cpu.c > index 68f978d80b..1f6a33b6f3 100644 > --- a/target/unicore32/cpu.c > +++ b/target/unicore32/cpu.c > @@ -96,7 +96,9 @@ static void uc32_cpu_realizefn(DeviceState *dev, Error > **errp) > return; > } > > -qemu_init_vcpu(cs); > +if (!qemu_init_vcpu(cs, errp)) { > +return; > +} > > ucc->parent_realize(dev, errp); > } > diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c > index 590813d4f7..177694454f 100644 > --- a/target/xtensa/cpu.c > +++ b/target/xtensa/cpu.c > @@ -131,7 +131,9 @@ static void xtensa_cpu_realizefn(DeviceState *dev, Error > **errp) > > cs->gdb_num_regs = xcc->config->gdb_regmap.num_regs; > > -qemu_init_vcpu(cs); > +if (!qemu_init_vcpu(cs, errp)) { > +return; > +} > > xcc->parent_realize(dev, errp); > } > -- > 2.13.7 > Reviewed-by: Fam Zheng

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

2018-09-19 Thread Fam Zheng
On Wed, 09/19 21:35, Fei Li wrote: > Currently, when qemu_signal_init() fails it only returns a non-zero > value but without propagating any Error. But its callers need a > non-null err when runs error_report_err(err), or else 0->msg occurs. > > To avoid such segmentation fault, add a new Error

Re: [Qemu-devel] [PATCH RFC v3 2/7] ui/vnc.c: polish vnc_init_func

2018-09-19 Thread Fam Zheng
ps; > register_displaychangelistener(>dcl); > @@ -4079,7 +4081,11 @@ int vnc_init_func(void *opaque, QemuOpts *opts, Error > **errp) > char *id = (char *)qemu_opts_id(opts); > > assert(id); > -vnc_display_init(id); > +vnc_display_init(id, _err); > +if (local_err) { > +error_reportf_err(local_err, "Failed to init VNC server: "); > +exit(1); > +} > vnc_display_open(id, _err); > if (local_err != NULL) { > error_reportf_err(local_err, "Failed to start VNC server: "); > -- > 2.13.7 > Reviewed-by: Fam Zheng

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

2018-09-18 Thread Fam Zheng
On Tue, 08/21 08:58, Fam Zheng wrote: > v4: Fix test on systems without OFD. [Patchew] Ping? > > 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 imag

Re: [Qemu-devel] [PATCH 0/3] aio-posix: polling mode bug fixes

2018-09-18 Thread Fam Zheng
On Wed, 09/12 19:10, Paolo Bonzini wrote: > Patch 1 fixes a too-strict assertion that could fire when aio_poll > is called in parallel with aio_set_fd_handler. > > Patch 2 and 3 reinstate the performance benefits of polling, which were > essentially disabled by commit 70232b5253 ("aio-posix:

Re: [Qemu-devel] [RFC PATCH] scsi-block: Deprecate rotation_rate

2018-09-17 Thread Fam Zheng
On Mon, 09/17 10:55, Thomas Huth wrote: > On 2018-09-17 10:31, Fam Zheng wrote: > > This option is added together with scsi-disk but is never honoured, > > becuase we don't emulate the VPD page for scsi-block. We could intercept > > and inject the user specified value

[Qemu-devel] [RFC PATCH] scsi-block: Deprecate rotation_rate

2018-09-17 Thread Fam Zheng
, not for performance. If emulated rotation rate is desired, scsi-hd is more suitable. Signed-off-by: Fam Zheng --- RFC to discuss about if we want to keep the option. Another possibility is, naturally, to actually write code to make use of the option. --- hw/scsi/scsi-disk.c | 6 ++ 1 file

Re: [Qemu-devel] [PATCH v2 11/17] block-backend: Decrease in_flight only after callback

2018-09-14 Thread Fam Zheng
On Thu, 09/13 18:59, Kevin Wolf wrote: > Am 13.09.2018 um 17:10 hat Paolo Bonzini geschrieben: > > On 13/09/2018 14:52, Kevin Wolf wrote: > > > + if (qemu_get_current_aio_context() == qemu_get_aio_context()) { > > > + /* If we are in the main thread, the callback is allowed to unref > > > + * the

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

2018-09-14 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 Reviewed-by: Thomas Huth Tested-by: Gerd Hoffmann --- net/slirp.c | 12 ++-- qapi

[Qemu-devel] [PATCH v3 0/2] slirp: Add support for RFC2132 TFTP server name

2018-09-14 Thread Fam Zheng
Post separatedly from the OpenBSD series for some more focus since the rest are already queued. Fam Zheng (2): slirp: Add sanity check for str option length slirp: Implement RFC2132 TFTP server name net/slirp.c | 21 +++-- qapi/net.json| 5 - qemu-options.hx

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

2018-09-14 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 Reviewed-by: Thomas Huth Cc: qemu-sta...@nongnu.org Signed-off-by: Fam Zheng Tested-by: Gerd Hoffmann --- net/slir

Re: [Qemu-devel] Can I convert backing file to internal snapshot?

2018-09-14 Thread Fam Zheng
On Fri, 09/14 12:23, lampahome wrote: > Can I convert from internap snapshot to external snapshot? > If there's 3 snapshots in one qcow2, can I convert them all to external > snapshots? Qcow2 doesn't track internal snapshot dependencies like external snapshot, so there is no direct way to create

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

2018-09-13 Thread Fam Zheng
On Thu, 09/13 16:46, Fei Li wrote: > > > On 09/12/2018 03:55 PM, Fam Zheng wrote: > > On Fri, 09/07 21:38, Fei Li wrote: > > > Currently, when qemu_signal_init() fails it only returns a non-zero > > > value but without propagating any Error. But its callers ne

Re: [Qemu-devel] [PATCH v3] vmdk: align end of file to a sector boundary

2018-09-13 Thread Fam Zheng
ter_sector is aligned > to sector, the last one should be like this, too. Third, it ease > reading with sector based I/Os. > > Signed-off-by: yuchenlin Reviewed-by: Fam Zheng

Re: [Qemu-devel] [Qemu-block] [PATCH 1/3] aio-posix: fix concurrent access to poll_disable_cnt

2018-09-13 Thread Fam Zheng
On Thu, 09/13 10:29, Paolo Bonzini wrote: > On 13/09/2018 08:56, Fam Zheng wrote: > >> +/* No need to order poll_disable_cnt writes against other updates; > >> + * the counter is only used to avoid wasting time and latency on > >> + * iterate

Re: [Qemu-devel] [PATCH v2] vmdk: align end of file to a sector boundary

2018-09-13 Thread Fam Zheng
On Thu, 09/13 15:47, yuchenlin wrote: > On 2018-09-13 10:54, Fam Zheng wrote: > > On Thu, 09/13 10:31, yuchen...@synology.com wrote: > > > From: yuchenlin > > > > > > There is a rare case which the size of last compressed cluster > > > is larger tha

Re: [Qemu-devel] [PATCH 3/3] aio-posix: do skip system call if ctx->notifier polling succeeds

2018-09-13 Thread Fam Zheng
er) { > +node->io_poll(node->opaque)) { > *timeout = 0; > -progress = true; > +if (node->opaque != >notifier) { > +progress = true; > +} > } > > /* Caller handles freeing deleted nodes. Don't do it here. */ > -- > 2.17.1 > Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH 2/3] aio-posix: compute timeout before polling

2018-09-13 Thread Fam Zheng
g.txt for syntax documentation. > > # util/aio-posix.c > -run_poll_handlers_begin(void *ctx, int64_t max_ns) "ctx %p max_ns %"PRId64 > -run_poll_handlers_end(void *ctx, bool progress) "ctx %p progress %d" > +run_poll_handlers_begin(void *ctx, int64_t max_ns, int64_t timeout) "ctx %p > max_ns %"PRId64 " timeout %"PRId64 > +run_poll_handlers_end(void *ctx, bool progress, int64_t timeout) "ctx %p > progress %d new timeout %"PRId64 > poll_shrink(void *ctx, int64_t old, int64_t new) "ctx %p old %"PRId64" new > %"PRId64 > poll_grow(void *ctx, int64_t old, int64_t new) "ctx %p old %"PRId64" new > %"PRId64 > > -- > 2.17.1 > > Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH 1/3] aio-posix: fix concurrent access to poll_disable_cnt

2018-09-13 Thread Fam Zheng
c_read(>poll_disable_cnt)); > > trace_run_poll_handlers_end(ctx, progress); > > @@ -552,7 +556,7 @@ static bool run_poll_handlers(AioContext *ctx, int64_t > max_ns) > */ > static bool try_poll_mode(AioContext *ctx, bool blocking) > { > - if (blocking && ctx->poll_max_ns && ctx->poll_disable_cnt == 0) { > +if (blocking && ctx->poll_max_ns && > !atomic_read(>poll_disable_cnt)) { > /* See qemu_soonest_timeout() uint64_t hack */ > int64_t max_ns = MIN((uint64_t)aio_compute_timeout(ctx), > (uint64_t)ctx->poll_ns); > -- > 2.17.1 > > Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH 2/2] virtio-scsi/virtio-blk: Disable poll handlers when stopping vq handler

2018-09-13 Thread Fam Zheng
On Wed, 09/12 14:42, Paolo Bonzini wrote: > On 12/09/2018 13:50, Fam Zheng wrote: > >> I think it's okay if it is invoked. The sequence is first you stop the > >> vq, then you drain the BlockBackends, then you switch AioContext. All > >> th

Re: [Qemu-devel] [PATCH v2] vmdk: align end of file to a sector boundary

2018-09-12 Thread Fam Zheng
On Thu, 09/13 10:31, yuchen...@synology.com wrote: > From: yuchenlin > > There is a rare case which the size of last compressed cluster > is larger than the cluster size, which will cause the file is > not aligned at the sector boundary. The code looks good to me. Can you also explain why it is

Re: [Qemu-devel] [PATCH 2/2] virtio-scsi/virtio-blk: Disable poll handlers when stopping vq handler

2018-09-12 Thread Fam Zheng
On Wed, 09/12 13:11, Paolo Bonzini wrote: > On 12/09/2018 03:31, Fam Zheng wrote: > >>> > >>> ctx is qemu_aio_context here, so there's no interaction with IOThread. > >> In this case, it should be okay to have the reentrancy, what is the bug > >> th

Re: [Qemu-devel] [PATCH] vmdk: align end of file to a sector boundary

2018-09-12 Thread Fam Zheng
On Tue, 08/28 11:17, yuchen...@synology.com wrote: > From: yuchenlin > > There is a rare case which the size of last compressed cluster > is larger than the cluster size, which will cause the file is > not aligned at the sector boundary. > > Signed-off-by: yuchenlin > --- > block/vmdk.c | 18

Re: [Qemu-devel] [PATCH] vmdk: align end of file to a sector boundary

2018-09-12 Thread Fam Zheng
On Wed, 09/12 17:52, yuchenlin wrote: > > Fam Zheng 於 2018-09-12 17:34 寫道: > > On Tue, 08/28 11:17, yuchen...@synology.com wrote: > From: yuchenlin > > > > There is a rare case which the size of last > > compressed cluster > is larger than the cluster

Re: [Qemu-devel] [PATCH] vmdk: align end of file to a sector boundary

2018-09-12 Thread Fam Zheng
On Tue, 08/28 11:17, yuchen...@synology.com wrote: > From: yuchenlin > > There is a rare case which the size of last compressed cluster > is larger than the cluster size, which will cause the file is > not aligned at the sector boundary. I don't understand. Doesn't it mean that if you force the

Re: [Qemu-devel] [PATCH v2 4/4] qemu_thread_create: propagate the error to callers to handle

2018-09-12 Thread Fam Zheng
On Fri, 09/07 21:39, Fei Li wrote: > Make qemu_thread_create() return a Boolean to indicate if it succeeds > rather than failing with an error. And add an Error parameter to hold > the error message and let the callers handle it. > > Besides, directly return if thread->data is NULL to avoid the >

Re: [Qemu-devel] [PATCH v2 2/4] ui/vnc.c: polish vnc_init_func

2018-09-12 Thread Fam Zheng
On Fri, 09/07 21:39, Fei Li wrote: > Add a new Error parameter for vnc_display_init() to handle errors > in its caller: vnc_init_func(), just like vnc_display_open() does. > And let the call trace propagate the Error. > > Besides, make vnc_start_worker_thread() return a bool to indicate > whether

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

2018-09-12 Thread Fam Zheng
On Fri, 09/07 21:38, Fei Li wrote: > Currently, when qemu_signal_init() fails it only returns a non-zero > value but without propagating any Error. But its callers need a > non-null err when runs error_report_err(err), or else 0->msg occurs. > > To avoid such segmentation fault, add a new Error

Re: [Qemu-devel] Can I convert backing file to internal snapshot?

2018-09-12 Thread Fam Zheng
On Wed, 09/12 15:35, lampahome wrote: > I have two qcow2 A & B, and A is backing file of B. > > Can I convert both A to one image and containing data of both? > > ex: > one new image will contain data of A and B. When I check it by qemu-img > info, I can see one snapshot in the new image. I

Re: [Qemu-devel] [PATCH] util/async: use qemu_aio_coroutine_enter in co_schedule_bh_cb

2018-09-12 Thread Fam Zheng
On Wed, 09/05 11:33, Sergio Lopez wrote: > AIO Coroutines shouldn't by managed by an AioContext different than the > one assigned when they are created. aio_co_enter avoids entering a > coroutine from a different AioContext, calling aio_co_schedule instead. > > Scheduled coroutines are then

Re: [Qemu-devel] [PATCH] util/async: use qemu_aio_coroutine_enter in co_schedule_bh_cb

2018-09-12 Thread Fam Zheng
*opaque) > > /* Protected by write barrier in qemu_aio_coroutine_enter */ > atomic_set(>scheduled, NULL); > -qemu_coroutine_enter(co); > +qemu_aio_coroutine_enter(ctx, co); > aio_context_release(ctx); > } > } > -- > 2.17.0 > Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH 2/2] virtio-scsi/virtio-blk: Disable poll handlers when stopping vq handler

2018-09-11 Thread Fam Zheng
On Tue, 09/11 17:30, Paolo Bonzini wrote: > On 11/09/2018 16:12, Fam Zheng wrote: > > On Tue, 09/11 13:32, Paolo Bonzini wrote: > >> On 10/09/2018 16:56, Fam Zheng wrote: > >>> We have this unwanted call stack: > >>> > >>> > ... >

Re: [Qemu-devel] [PATCH 2/2] virtio-scsi/virtio-blk: Disable poll handlers when stopping vq handler

2018-09-11 Thread Fam Zheng
On Tue, 09/11 13:32, Paolo Bonzini wrote: > On 10/09/2018 16:56, Fam Zheng wrote: > > We have this unwanted call stack: > > > > > ... > > > #13 0x5586602b7793 in virtio_scsi_handle_cmd_vq > > > #14 0x5586602b8d66 in virtio_scsi_data_plane

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

2018-09-11 Thread Fam Zheng
On Tue, 09/11 11:00, Gerd Hoffmann wrote: > On Thu, Sep 06, 2018 at 01:43:36PM +0800, Fam Zheng wrote: > > In this new version: > > > > - Include the virtio fix by Paolo so that it's easier to test this > > series. > > - Improve the slirp patch on inp

Re: [Qemu-devel] [PATCH 14/14] test-bdrv-drain: Test nested poll in bdrv_drain_poll_top_level()

2018-09-11 Thread Fam Zheng
would cause a possible AIO_WAIT_WHILE() in > the callback to hang. > > Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH 13/14] block: Remove aio_poll() in bdrv_drain_poll variants

2018-09-11 Thread Fam Zheng
ll(), which waits for block jobs to reach a quiescent > state. > > Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH 12/14] blockjob: Lie better in child_job_drained_poll()

2018-09-11 Thread Fam Zheng
won't > deadlock because they ignore the job, and outer drains will wait for the > job to really reach a quiescent state because the callback is already > running. > > Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng

  1   2   3   4   5   6   7   8   9   10   >