[Qemu-devel] [RFC PATCH 5/8] file-posix: Implement bdrv_co_map_range

2018-03-29 Thread Fam Zheng
Signed-off-by: Fam Zheng <f...@redhat.com> --- block/file-posix.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c index b13bc89423..4e615d937e 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -1656,6 +1656,17 @@ stat

[Qemu-devel] [RFC PATCH 3/8] block: Introduce bdrv_co_copy_range

2018-03-29 Thread Fam Zheng
This tries to do offloaded data copying in the same procotol (but possibly a different BDS), or fall back to a bounce buffer if not supported. Signed-off-by: Fam Zheng <f...@redhat.com> --- block/io.c| 148 ++ include/block/b

[Qemu-devel] [RFC PATCH 0/8] qemu-img convert with copy offloading

2018-03-29 Thread Fam Zheng
be an alternative way to implement format drivers in the future, once we make block/io.c use it in preadv/pwritev paths. Fam Zheng (8): block: Introduce bdrv_co_map_range API qcow2: Implement bdrv_co_map_range block: Introduce bdrv_co_copy_range file-posix: Implement bdrv_co_copy_range file-posix

[Qemu-devel] [RFC PATCH 1/8] block: Introduce bdrv_co_map_range API

2018-03-29 Thread Fam Zheng
ying "file", then the block layer will drill down until it reaches a protocol layer that can do offloaded copying. Signed-off-by: Fam Zheng <f...@redhat.com> --- block/io.c| 44 include/block/block.h | 8 +++- incl

[Qemu-devel] [RFC PATCH 2/8] qcow2: Implement bdrv_co_map_range

2018-03-29 Thread Fam Zheng
Extract the common code from qcow2_co_block_status, then use it to implement qcow2_co_map_range. The major difference is the allocation logic, enabled by BDRV_REQ_ALLOCATE. Signed-off-by: Fam Zheng <f...@redhat.com> --- block/qcow2.c

Re: [Qemu-devel] [PATCH v3 1/1] hw/scsi: support SCSI-2 passthrough without PI

2018-03-27 Thread Fam Zheng
x.vnet.ibm.com> > --- > > Changes in v3: > - moved the scsi_version initialization from realize functions to > reset functions, allowing the scsi_version to be redefined again after > each reboot. Reviewed-by: Fam Zheng <f...@redhat.com>

Re: [Qemu-devel] [PATCH v2 1/1] hw/scsi: support SCSI-2 passthrough without PI

2018-03-27 Thread Fam Zheng
ocksize; > - > -assert(max_transfer); > -stl_be_p(>buf[8], max_transfer); > -/* Also take care of the opt xfer len. */ > -stl_be_p(>buf[12], > - MIN_NON_ZERO(max_transfer, ldl_be_p(>buf[12]))); > +if (r-&g

[Qemu-devel] [PATCH v2] scsi-disk: Don't enlarge min_io_size to max_io_size

2018-03-27 Thread Fam Zheng
Some backends report big max_io_sectors. Making min_io_size the same value in this case will make it impossible for guest to align memory, therefore the disk may not be usable at all. Do not enlarge them when they are zero. Reported-by: David Gibson <dgib...@redhat.com> Signed-off-by: Fam

Re: [Qemu-devel] [PATCH] scsi-disk: Don't enlarge min_io_size to max_io_size

2018-03-27 Thread Fam Zheng
On Tue, 03/27 14:44, David Gibson wrote: > On Mon, 26 Mar 2018 15:26:39 +0800 > Fam Zheng <f...@redhat.com> wrote: > > > On Thu, 03/22 09:19, Daniel Henrique Barboza wrote: > > > Hi, > > > > > > On 03/22/2018 04:38 AM, Fam Zheng wrote: > &g

Re: [Qemu-devel] [PATCH v2 4/5] qdict: remove useless cast

2018-03-26 Thread Fam Zheng
On Fri, 03/23 15:32, Laurent Vivier wrote: > Re-run Coccinelle script scripts/coccinelle/qobject.cocci > > Signed-off-by: Laurent Vivier <lviv...@redhat.com> This time for the right revision of the patch: Acked-by: Fam Zheng <f...@redhat.com>

Re: [Qemu-devel] [PATCH 3/4] qdict: remove useless cast

2018-03-26 Thread Fam Zheng
On Thu, 03/22 17:12, Laurent Vivier wrote: > Re-run Coccinelle script scripts/coccinelle/qobject.cocci > > Signed-off-by: Laurent Vivier <lviv...@redhat.com> Acked-by: Fam Zheng <f...@redhat.com>

[Qemu-devel] [PATCH] docker: Inline "prep_fail" in run script

2018-03-26 Thread Fam Zheng
We don't source common.rc where prep_fail is defined, so spell out the commands and do what was intended. Signed-off-by: Fam Zheng <f...@redhat.com> --- tests/docker/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/run b/tests/docker/run index 9dd3

Re: [Qemu-devel] Patchew failure ? (was: Re: [PATCH 00/14] Generalize Dallas/Maxim I2C RTC devices v2)

2018-03-26 Thread Fam Zheng
On Mon, 03/26 10:34, Thomas Huth wrote: > On 24.03.2018 23:08, no-re...@patchew.org wrote: > > Hi, > > > > This series failed docker-build@min-glib build test. Please find the > > testing commands and > > their output below. If you have Docker installed, you can probably > > reproduce it > >

Re: [Qemu-devel] [PATCH] scsi-disk: Don't enlarge min_io_size to max_io_size

2018-03-26 Thread Fam Zheng
On Thu, 03/22 09:19, Daniel Henrique Barboza wrote: > Hi, > > On 03/22/2018 04:38 AM, Fam Zheng wrote: > > Some backends report big max_io_sectors. Making min_io_size the same > > value in this case will make it impossible for guest to align memory, > > therefore the di

Re: [Qemu-devel] [PATCH v2] vmdk: return ERROR when cluster sector is larger than vmdk limitation

2018-03-22 Thread Fam Zheng
er_offset(BlockDriverState *bs, > return zeroed ? VMDK_ZEROED : VMDK_UNALLOC; > } > > +if (extent->next_cluster_sector >= VMDK_EXTENT_MAX_SECTORS) { > +return VMDK_ERROR; > +} > + > cluster_sector = extent->next_cluster_

[Qemu-devel] [PATCH] scsi-disk: Don't enlarge min_io_size to max_io_size

2018-03-22 Thread Fam Zheng
not assume max_io_sectors is a good value for opt_io_size and min_io_size, use 512 instead. Reported-by: David Gibson <dgib...@redhat.com> Signed-off-by: Fam Zheng <f...@redhat.com> --- hw/scsi/scsi-disk.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/scsi/scsi

Re: [Qemu-devel] [PATCH] vmdk: return ENOTSUP before offset overflow

2018-03-21 Thread Fam Zheng
On Thu, 03/22 10:40, yuchen...@synology.com wrote: > From: yuchenlin > > VMDK has a hard limitation of extent size, which is due to the size of grain > table entry is 32 bits. It means it can only point to a grain located at > offset = 2^32. To prevent offset overflow and

[Qemu-devel] [PATCH] tests: Fix ubuntu.i386 image initialization

2018-03-21 Thread Fam Zheng
it conditionally here. Reported-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Fam Zheng <f...@redhat.com> --- tests/vm/basevm.py | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 686d88decf..3a2d508c35 100755 --

Re: [Qemu-devel] [PATCH] scsi: turn "is this a SCSI device?" into a conditional hint

2018-03-21 Thread Fam Zheng
On Wed, 03/21 11:58, Paolo Bonzini wrote: > diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c > index 7414fe2d67..b3de5df324 100644 > --- a/hw/scsi/scsi-generic.c > +++ b/hw/scsi/scsi-generic.c > @@ -500,9 +500,10 @@ static void scsi_generic_realize(SCSIDevice *s, Error > **errp) >

Re: [Qemu-devel] make vm-test [was: [PATCH] maintainers: Add myself as a OpenBSD maintainer]

2018-03-21 Thread Fam Zheng
On Wed, 03/21 08:14, Eric Blake wrote: > On 03/21/2018 03:11 AM, Fam Zheng wrote: > > > Thanks for this; today was my first day trying the various vm-build- > > > targets. > > > > > > Question: is this expected behavior? > > > > > > $

Re: [Qemu-devel] [PATCH for-2.12] rdma: Fix 32-bit compilation

2018-03-21 Thread Fam Zheng
On Wed, 03/21 11:20, Marcel Apfelbaum wrote: > On 21/03/2018 4:07, Fam Zheng wrote: > > On Tue, 03/20 12:30, Marcel Apfelbaum wrote: > >> Hi Eric, > >> > >> On 19/03/2018 23:53, Eric Blake wrote: > >>> Use the correct printf formats, so that a 32-bit

Re: [Qemu-devel] make vm-test [was: [PATCH] maintainers: Add myself as a OpenBSD maintainer]

2018-03-21 Thread Fam Zheng
On Mon, 03/19 17:06, Eric Blake wrote: > On 02/16/2018 11:44 AM, Philippe Mathieu-Daudé wrote: > > On 02/16/2018 02:41 PM, Kamil Rytarowski wrote: > > > On 16.02.2018 18:30, Philippe Mathieu-Daudé wrote: > > > > But before announcing the host OS being supported again, I'd rather see > > > >

Re: [Qemu-devel] [PATCH] postcopy-ram: add a stub for postcopy_request_shared_page

2018-03-20 Thread Fam Zheng
On Wed, 03/21 04:03, Michael S. Tsirkin wrote: > On Wed, Mar 21, 2018 at 09:25:30AM +0800, Fam Zheng wrote: > > On Tue, 03/20 12:34, no-re...@patchew.org wrote: > > > /tmp/qemu-test/src/migration/postcopy-ram.c:787:41: error: 'struct > > > PostCopyFD' dec

Re: [Qemu-devel] [PATCH for-2.12] rdma: Fix 32-bit compilation

2018-03-20 Thread Fam Zheng
On Tue, 03/20 12:30, Marcel Apfelbaum wrote: > Hi Eric, > > On 19/03/2018 23:53, Eric Blake wrote: > > Use the correct printf formats, so that a 32-bit compile doesn't > > spit out lots of warnings about %lx being incompatible with uint64_t. > > Broken since initial commit ef6d4ccd. > > > >

Re: [Qemu-devel] [PATCH for-2.12] rdma: Fix 32-bit compilation

2018-03-20 Thread Fam Zheng
On Tue, 03/20 12:30, Marcel Apfelbaum wrote: > Hi Eric, > > On 19/03/2018 23:53, Eric Blake wrote: > > Use the correct printf formats, so that a 32-bit compile doesn't > > spit out lots of warnings about %lx being incompatible with uint64_t. > > Broken since initial commit ef6d4ccd. > > > >

Re: [Qemu-devel] [PATCH] postcopy-ram: add a stub for postcopy_request_shared_page

2018-03-20 Thread Fam Zheng
On Tue, 03/20 12:34, no-re...@patchew.org wrote: > /tmp/qemu-test/src/migration/postcopy-ram.c:787:41: error: 'struct > PostCopyFD' declared inside parameter list will not be visible outside of > this definition or declaration [-Werror] > int postcopy_request_shared_page(struct PostCopyFD

Re: [Qemu-devel] SSD virtio-scsi passthrough

2018-03-16 Thread Fam Zheng
On Mon, Mar 12, 2018 at 4:16 PM, Nitin Gupta wrote: > Hi Stefan > > Thanks for your response , i tried the the command provided by you and it > did not work as well > somehow i find that after changing the controller to LSI in qemu command > it started working ,

Re: [Qemu-devel] [PATCH v2] scripts/checkpatch.pl: Bug fix

2018-03-16 Thread Fam Zheng
On Fri, 03/16 14:31, Su Hang wrote: > Because I generate my first patch on master, it should work. Nope. "git am" doesn't know to resolve the conflict automatically despite it being straightforward, unfortunately:

[Qemu-devel] [PATCH for-2.13 v3 2/2] tests: Use query-usernet instead of 'info usernet'

2018-03-16 Thread Fam Zheng
Signed-off-by: Fam Zheng <f...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> --- tests/vm/basevm.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 686d88decf..f51604e0ab 100755 --- a/tests/

[Qemu-devel] [PATCH for-2.13 v3 1/2] slirp: Add "query-usernet" QMP command

2018-03-16 Thread Fam Zheng
the data, just like other HMP info_* commands. The TCPS_* macros are now defined as a QAPI enum. Signed-off-by: Fam Zheng <f...@redhat.com> --- net/slirp.c | 26 +++ qapi/net.json| 201 +++ slirp/libslirp.h | 2

[Qemu-devel] [PATCH for-2.13 v3 0/2] slirp: Add query-usernet QMP command

2018-03-16 Thread Fam Zheng
x compiler error. [patchew] The command is a counterpart of HMP "info usernet" and is at least very useful for the VM tests. So add it. Fam Zheng (2): slirp: Add "query-usernet" QMP command tests: Use query-usernet instead of 'info usernet'

Re: [Qemu-devel] [PATCH v2] scripts/checkpatch.pl: Bug fix

2018-03-16 Thread Fam Zheng
On Fri, 03/16 10:58, Su Hang wrote: > (Sorry, I don't know this patch should base on which commit, > so I generate this patch based on > commit:fb8446d94ec7a3dc0c3a7e7da672406476f075ac, > I choose this by `git log -2 scripts/checkpath.pl`. > Sincerely say sorry, if I have misunderstand any

Re: [Qemu-devel] [PATCH] docker: fedora: test more components

2018-03-15 Thread Fam Zheng
On Thu, 03/15 14:47, Daniel P. Berrangé wrote: > On Tue, Mar 13, 2018 at 01:05:52PM +0100, Paolo Bonzini wrote: > > Install optional dependencies of QEMU to get better coverage. > > > > Signed-off-by: Paolo Bonzini > > --- > > tests/docker/dockerfiles/fedora.docker | 13

Re: [Qemu-devel] [PATCH v2] docker: dump 'config.log' if ./configure fails

2018-03-15 Thread Fam Zheng
On Thu, 03/15 15:27, Philippe Mathieu-Daudé wrote: > Suggested-by: Eric Blake > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Daniel P. Berrangé > --- > v2: > - avoid subshell using { ; } (Eric) > - use test_fail() instead of

Re: [Qemu-devel] [PATCH v7 00/23] Migration: postcopy failure recovery

2018-03-15 Thread Fam Zheng
On Thu, 03/15 16:41, Peter Xu wrote: > On Thu, Mar 15, 2018 at 04:19:37PM +0800, Fam Zheng wrote: > > On Mon, 03/12 12:45, Peter Xu wrote: > > > On Fri, Mar 09, 2018 at 10:59:03AM -0600, Eric Blake wrote: > > > > On 03/09/2018 10:54 AM, Eric Blake wrote: > > &g

Re: [Qemu-devel] [PATCH v7 00/23] Migration: postcopy failure recovery

2018-03-15 Thread Fam Zheng
On Mon, 03/12 12:45, Peter Xu wrote: > On Fri, Mar 09, 2018 at 10:59:03AM -0600, Eric Blake wrote: > > On 03/09/2018 10:54 AM, Eric Blake wrote: > > > On 03/09/2018 03:15 AM, Peter Xu wrote: > > > > Based-on: <20180309090006.10018-1-pet...@redhat.com> > > > > > > > > This series is based on the

Re: [Qemu-devel] [PATCH for 2.12] iotests: Avoid realpath

2018-03-15 Thread Fam Zheng
On Wed, 03/14 09:47, Eric Blake wrote: > > The remaining use was using realpath to convert a possibly > > relative filename into an absolute one before calling diff, > > but diff works just fine on the relative name. > > Hmm, this last change reverts commit 93e53fb6 that added realpath on purpose

Re: [Qemu-devel] [PATCH v2] dump-guest-memory: more descriptive lookup_type failure

2018-03-15 Thread Fam Zheng
GdbError("Symbols must be loaded prior to sourcing > dump-guest-memory.\n" > + "Symbols may be loaded by 'attach'ing a QEMU process > id or by " > + "'load'ing a QEMU binary.") > > TARGET_PAGE_SIZE = 0x1000 > TARGET_PAGE_MASK = 0xF000 > -- > 2.13.6 > > Reviewed-by: Fam Zheng <f...@redhat.com> Tested-by: Fam Zheng <f...@redhat.com>

Re: [Qemu-devel] Question: an IO hang problem

2018-03-15 Thread Fam Zheng
On Tue, 03/13 17:38, sochin.jiang wrote: > > Hi, guys, > > Recently, I encountered an IO hang problem in occasion which I cannot > reproduce it now. > > I analyzed this problem carefully, the critical stack is as following: > > > After reading the codes in linux-aio.c(see ioq_submit()

[Qemu-devel] [PATCH] block: Fix leak of ignore_children in error path

2018-03-14 Thread Fam Zheng
Reported-by: Max Reitz <mre...@redhat.com> Signed-off-by: Fam Zheng <f...@redhat.com> --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index 75a9fd49de..c1fda9fd57 100644 --- a/block.c +++ b/block.c @@ -3671,12 +36

[Qemu-devel] [PATCH] vvfat: Fix inherit_options flags

2018-03-14 Thread Fam Zheng
Overriding flags violates the precedence rules of bdrv_reopen_queue_child. Just like the read-only option, no-flush should be put into the options. The same is done in bdrv_temp_snapshot_options. Reported-by: Stefan Hajnoczi <stefa...@redhat.com Signed-off-by: Fam Zheng <f...@redh

[Qemu-devel] [PATCH v3 2/2] iotests: Add regression test for commit base locking

2018-03-13 Thread Fam Zheng
Signed-off-by: Fam Zheng <f...@redhat.com> --- tests/qemu-iotests/153 | 12 tests/qemu-iotests/153.out | 5 + 2 files changed, 17 insertions(+) diff --git a/tests/qemu-iotests/153 b/tests/qemu-iotests/153 index adfd02695b..a0fd815483 100755 --- a/tests/qemu-iotes

[Qemu-devel] [PATCH v3 1/2] block: Fix flags in reopen queue

2018-03-13 Thread Fam Zheng
cit options include 'read-only=false' (for an intermediate node used by a different job). Signed-off-by: Fam Zheng <f...@redhat.com> --- block.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/block.c b/block.c index 75a9fd49de..a121d2ebcc 100644 --- a/block.c +++ b/block.c @@ -2883,8

[Qemu-devel] [PATCH v3 0/2] block: Fix permission during reopen

2018-03-13 Thread Fam Zheng
v3: Fix test case. [Max] v2: Use update_flags_from_options. [Kevin] We write open the whole backing chain during reopen. It is not necessary and will cause image locking problems if the backing image is shared. Fam Zheng (2): block: Fix flags in reopen queue iotests: Add regression test

Re: [Qemu-devel] [PATCH] docker: fedora: test more components

2018-03-13 Thread Fam Zheng
On Tue, 03/13 13:05, Paolo Bonzini wrote: > Install optional dependencies of QEMU to get better coverage. > > Signed-off-by: Paolo Bonzini > --- > tests/docker/dockerfiles/fedora.docker | 13 ++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > diff --git

[Qemu-devel] [PATCH v2 1/2] block: Fix flags in reopen queue

2018-03-13 Thread Fam Zheng
cit options include 'read-only=false' (for an intermediate node used by a different job). Signed-off-by: Fam Zheng <f...@redhat.com> --- block.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/block.c b/block.c index 75a9fd49de..a121d2ebcc 100644 --- a/block.c +++ b/block.c @@ -2883,8

[Qemu-devel] [PATCH v2 2/2] iotests: Add regression test for commit base locking

2018-03-13 Thread Fam Zheng
Signed-off-by: Fam Zheng <f...@redhat.com> --- tests/qemu-iotests/153 | 8 tests/qemu-iotests/153.out | 4 2 files changed, 12 insertions(+) diff --git a/tests/qemu-iotests/153 b/tests/qemu-iotests/153 index adfd02695b..a7875e6899 100755 --- a/tests/qemu-iotests/153 +++ b

[Qemu-devel] [PATCH v2 0/2] block: Fix permission during reopen

2018-03-13 Thread Fam Zheng
v2: Use update_flags_from_options. [Kevin] We write open the whole backing chain during reopen. It is not necessary and will cause image locking problems if the backing image is shared. Fam Zheng (2): block: Fix flags in reopen queue iotests: Add regression test for commit base locking

Re: [Qemu-devel] [PATCH] tests: make docker-test-debug@fedora run sanitizers

2018-03-12 Thread Fam Zheng
On Mon, 03/12 18:17, Marc-André Lureau wrote: > Hi > > On Mon, Mar 12, 2018 at 6:11 PM, Fam Zheng <f...@redhat.com> wrote: > > On Mon, 03/12 15:11, Marc-André Lureau wrote: > >> Hi Fam, > >> > >> It would be great if patchew could run the debug

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

2018-03-12 Thread Fam Zheng
The following changes since commit b16a54da0696efc5d91b6c3597a37a317abb5de7: Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180312-pull-request' into staging (2018-03-12 14:06:23 +) are available in the Git repository at: git://github.com/famz/qemu.git tags/staging-pull-request

[Qemu-devel] [PULL 1/1] tests: make docker-test-debug@fedora run sanitizers

2018-03-12 Thread Fam Zheng
-André Lureau <marcandre.lur...@redhat.com> Message-Id: <20180312120849.20073-1-marcandre.lur...@redhat.com> Signed-off-by: Fam Zheng <f...@redhat.com> --- tests/docker/dockerfiles/fedora.docker | 2 +- tests/docker/test-debug| 6 +++--- 2 files changed, 4 in

Re: [Qemu-devel] [PATCH] tests: make docker-test-debug@fedora run sanitizers

2018-03-12 Thread Fam Zheng
On Mon, 03/12 15:11, Marc-André Lureau wrote: > Hi Fam, > > It would be great if patchew could run the debug/sanitizer build. > Unfortunately, except x86 target, the run is full of ASAN leaks or > warnings. > > Do you think patchew could learn to do regression testing? By that I > mean that

Re: [Qemu-devel] [PATCH] MAINTAINERS: add include/block/aio-wait.h

2018-03-12 Thread Fam Zheng
On Mon, 03/12 09:05, Eric Blake wrote: > On 03/12/2018 08:22 AM, Stefan Hajnoczi wrote: > > The include/block/aio-wait.h header file was added by commit > > 7719f3c968c59e1bcda7e177679dc765b59e578f ("block: extract > > AIO_WAIT_WHILE() from BlockDriverState") without updating MAINTAINERS. > > A

Re: [Qemu-devel] [PATCH] scsi: support NDOB (no data-out buffer) for WRITE SAME commands

2018-03-09 Thread Fam Zheng
On Thu, 03/08 16:51, Paolo Bonzini wrote: > A NDOB bit set to one specifies that the disk shall not transfer data > from the data-out buffer and shall process the command as if the data-out > buffer contained user data set to all zeroes. > > Signed-off-by: Paolo Bonzini >

[Qemu-devel] [PATCH 1/4] block: Pass "current_flags" in BdrvChildRole.inherit_options

2018-03-09 Thread Fam Zheng
So that the current flags can influence the returned flags in the coming patches. For now, 0 is passed everywhere and the parameter is not used. Signed-off-by: Fam Zheng <f...@redhat.com> --- block.c | 20 +--- block/block-backend.c | 3 ++- block/v

[Qemu-devel] [PATCH 2/4] block: Fix write flags in bdrv_backing_options

2018-03-09 Thread Fam Zheng
. Signed-off-by: Fam Zheng <f...@redhat.com> --- block.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index bedbe208e6..937f9fe159 100644 --- a/block.c +++ b/block.c @@ -997,7 +997,10 @@ static void bdrv_backing_options(int *child

[Qemu-devel] [PATCH 0/4] block: Fix permission during reopen

2018-03-09 Thread Fam Zheng
We write open the whole backing chain during reopen. It is not necessary and will cause image locking problems if the backing image is shared. Fam Zheng (4): block: Pass "current_flags" in BdrvChildRole.inherit_options block: Fix write flags in bdrv_backing_options block: Use

[Qemu-devel] [PATCH 4/4] iotests: Add regression test for commit base locking

2018-03-09 Thread Fam Zheng
Signed-off-by: Fam Zheng <f...@redhat.com> --- tests/qemu-iotests/153 | 6 ++ tests/qemu-iotests/153.out | 4 2 files changed, 10 insertions(+) diff --git a/tests/qemu-iotests/153 b/tests/qemu-iotests/153 index fa25eb24bd..5a82acebd3 100755 --- a/tests/qemu-iotests/153 +++ b

[Qemu-devel] [PATCH 3/4] block: Use the actual current_flags during reopen

2018-03-09 Thread Fam Zheng
This complies to the function contract and allows bdrv_backing_options to make the right decision. Signed-off-by: Fam Zheng <f...@redhat.com> --- block.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/block.c b/block.c index 937f9fe159..1e2b

Re: [Qemu-devel] [PATCH v2 0/2] slirp: Add query-usernet QMP command

2018-03-08 Thread Fam Zheng
Gentle ping.. On Mon, 02/26 15:58, Fam Zheng wrote: > v2: Fix compiler error. [patchew] > > The command is a counterpart of HMP "info usernet" and is at least very useful > for the VM tests. So add it. > > Fam Zheng (2): > slirp: Add "query-usernet"

Re: [Qemu-devel] block migration and dirty bitmap reset

2018-03-08 Thread Fam Zheng
On Thu, Mar 8, 2018 at 4:57 PM, Peter Lieven <p...@kamp.de> wrote: > > >> Am 08.03.2018 um 02:28 schrieb Fam Zheng <f...@redhat.com>: >> >>> On Wed, 03/07 09:06, Peter Lieven wrote: >>> Hi, >>> >>> while looking at the code I wonde

Re: [Qemu-devel] [PATCH v3 0/4] vl: introduce vm_shutdown()

2018-03-07 Thread Fam Zheng
ditions in virtio-blk/virtio-scsi dataplane code. > This patch series addresses them, see the commit description for details on > the > individual cases. Reviewed-by: Fam Zheng <f...@redhat.com>

Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] block/ssh: Implement .bdrv_refresh_filename()

2018-03-07 Thread Fam Zheng
On Wed, 03/07 12:50, John Snow wrote: > It's something I'd like to see patchew do, actually: > > "Here's a list of what's on the list that has no reviews or NACKs, and > needs some love" It's not hard to define a search condition for that: http://patchew.org/search-help

Re: [Qemu-devel] block migration and dirty bitmap reset

2018-03-07 Thread Fam Zheng
On Wed, 03/07 09:06, Peter Lieven wrote: > Hi, > > while looking at the code I wonder if the blk_aio_preadv and the > bdrv_reset_dirty_bitmap order must > be swapped in mig_save_device_bulk: > > qemu_mutex_lock_iothread(); > aio_context_acquire(blk_get_aio_context(bmds->blk)); >

Re: [Qemu-devel] [PATCH v11 00/28] x86: Secure Encrypted Virtualization (AMD)

2018-03-07 Thread Fam Zheng
On Thu, Mar 8, 2018 at 4:35 AM, Brijesh Singh wrote: > Hi, > > I have root caused and fixed the build issue seen with mingw32 compiler, > the patch is very trivial (see below). > > I am looking for direction on how to submit the fix, should I resubmit > the whole series or

Re: [Qemu-devel] [PATCH] build-sys: make help could have 'modules' target

2018-03-06 Thread Fam Zheng
On Tue, 03/06 17:17, Marc-André Lureau wrote: > Available when configure --enable-modules. > > Signed-off-by: Marc-André Lureau > --- > Makefile | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/Makefile b/Makefile > index 9a75c48ae0..5d9ef3b8fd 100644 >

Re: [Qemu-devel] [PATCH 1/1] scsi-disk.c: consider bl->max_transfer in INQUIRY emulation

2018-03-06 Thread Fam Zheng
> +opt_io_size = > +MIN_NON_ZERO(opt_io_size, max_io_sectors); > +} > /* required VPD size with unmap support */ > buflen = 0x40; > memset(outbuf + 4, 0, buflen - 4); > -- > 2.14.3 > Reviewed-by: Fam Zheng <f...@redhat.com>

Re: [Qemu-devel] [PATCH] trace: only permit standard C types and fixed size integer types

2018-03-06 Thread Fam Zheng
On Tue, 03/06 16:20, Daniel P. Berrangé wrote: > On Tue, Mar 06, 2018 at 08:05:18AM -0800, no-re...@patchew.org wrote: > > Hi, > > > > This series failed docker-mingw@fedora build test. Please find the testing > > commands and > > their output below. If you have Docker installed, you can

Re: [Qemu-devel] [PATCH] trace: only permit standard C types and fixed size integer types

2018-03-06 Thread Fam Zheng
On Tue, 03/06 16:22, Daniel P. Berrangé wrote: > RFE for patchew... > > Now we're sending separate email alerts for each build job, can we > make patchew include the job name in the subject line, so it is > immediately obvious which job failed without needing to read the > body. Yes, doable. Do

[Qemu-devel] [PATCH] README: Fix typo 'git-publish'

2018-03-05 Thread Fam Zheng
Reported-by: Alberto Garcia <be...@igalia.com> Signed-off-by: Fam Zheng <f...@redhat.com> --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 7833b97365..49a9fd09cd 100644 --- a/README +++ b/README @@ -73,7 +73,7 @@ The QEMU web

Re: [Qemu-devel] [Qemu-block] [PULL 6/6] README: Document 'git-publish' workflow

2018-03-05 Thread Fam Zheng
On Mon, 03/05 11:51, Alberto Garcia wrote: > On Mon 05 Mar 2018 10:40:06 AM CET, Stefan Hajnoczi wrote: > > +A 'git-profile' utility was created to make above process less > > +cumbersome, and is highly recommended for making regular > > contributions, > > A 'git-profile' utility ? Did you want

Re: [Qemu-devel] [PATCH] iotests: Mark all tests executable

2018-03-02 Thread Fam Zheng
On Fri, Mar 2, 2018 at 9:49 PM, Eric Blake wrote: > The majority of our iotests have the executable bit set; fix the > few outliers for consistency. > > Signed-off-by: Eric Blake > --- > > Let's see if patchew groks this one :) You've caught it! Patchew

Re: [Qemu-devel] [BUG] I/O thread segfault for QEMU on s390x

2018-03-01 Thread Fam Zheng
On Thu, Mar 1, 2018 at 10:33 PM, Farhan Ali wrote: > Hi, > > I have been noticing some segfaults for QEMU on s390x, and I have been > hitting this issue quite reliably (at least once in 10 runs of a test case). > The qemu version is 2.11.50, and I have systemd created

Re: [Qemu-devel] [PATCH v2 0/4] vl: introduce vm_shutdown()

2018-03-01 Thread Fam Zheng
On Thu, 03/01 14:54, Stefan Hajnoczi wrote: > On Thu, Mar 01, 2018 at 09:15:17AM +0800, Fam Zheng wrote: > > On Wed, 02/28 18:19, Stefan Hajnoczi wrote: > > > v2: > > > * Tackle the .ioeventfd_stop() vs vq handler race by removing the > > > ioeventfd >

Re: [Qemu-devel] [PULL 00/42] target-arm queue

2018-03-01 Thread Fam Zheng
On Thu, Mar 1, 2018 at 10:45 PM, Peter Maydell wrote: > On 1 March 2018 at 13:00, wrote: >> Hi, >> >> This series seems to have some coding style problems. See output below for >> more information: >> >> Type: series >> Message-id:

[Qemu-devel] [PULL 1/1] block/nvme: fix Coverity reports

2018-02-28 Thread Fam Zheng
From: Paolo Bonzini <pbonz...@redhat.com> 1) string not null terminated in sysfs_find_group_file 2) NULL pointer dereference and dead local variable in nvme_init. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Fam Zheng <f...@redhat.com> Message-Id: <20

[Qemu-devel] [PULL 0/1] Block patches 2018-03-01

2018-02-28 Thread Fam Zheng
The following changes since commit 6697439794f72b3501ee16bb95d16854f9981421: Merge remote-tracking branch 'remotes/kraxel/tags/usb-20180227-pull-request' into staging (2018-02-27 17:50:46 +) are available in the Git repository at: git://github.com/famz/qemu.git

Re: [Qemu-devel] [PATCH v2] iotests: Test creating overlay when guest running

2018-02-28 Thread Fam Zheng
On Wed, 02/14 09:26, Fam Zheng wrote: > Ping? Ping?

Re: [Qemu-devel] [PATCH v3 00/16] block/mirror: Add active-sync mirroring

2018-02-28 Thread Fam Zheng
on't forget write_zeroes and discard > - Patch 15: %s/passive/background/ > - Patch 16: Write some zeroes so we can see those are actively copied, > too (i.e. test the changes to patch 14 from v2) Reviewed-by: Fam Zheng <f...@redhat.com>

Re: [Qemu-devel] [PATCH v3 11/16] test-hbitmap: Add non-advancing iter_next tests

2018-02-28 Thread Fam Zheng
On Wed, 02/28 19:05, Max Reitz wrote: > Add a function that wraps hbitmap_iter_next() and always calls it in > non-advancing mode first, and in advancing mode next. The result should > always be the same. > > By using this function everywhere we called hbitmap_iter_next() before, > we should get

Re: [Qemu-devel] [PATCH v2 05/16] block/mirror: Convert to coroutines

2018-02-28 Thread Fam Zheng
On Wed, 02/28 18:07, Max Reitz wrote: > On 2018-02-28 15:13, Max Reitz wrote: > > On 2018-02-27 08:44, Fam Zheng wrote: > >> On Mon, 01/22 23:07, Max Reitz wrote: > >>> @@ -101,7 +105,7 @@ static BlockErrorAction > >>> mirror

Re: [Qemu-devel] [PATCH v2 0/4] vl: introduce vm_shutdown()

2018-02-28 Thread Fam Zheng
On Wed, 02/28 18:19, Stefan Hajnoczi wrote: > v2: > * Tackle the .ioeventfd_stop() vs vq handler race by removing the ioeventfd >from a BH in the IOThread [Fam] > > There are several race conditions in virtio-blk/virtio-scsi dataplane code. > This patch series addresses them, see the commit

[Qemu-devel] [PATCH] iotests: Skip test for ENOMEM error

2018-02-28 Thread Fam Zheng
The AFL image is to exercise the code validating image size, which doesn't work on 32 bit or when out of memory (there is a large allocation before the interesting point). So check that and skip the test, instead of faking the result. Signed-off-by: Fam Zheng <f...@redhat.com> --- test

Re: [Qemu-devel] [PATCH v3] iotests: Fix CID for VMDK afl image

2018-02-28 Thread Fam Zheng
On Wed, 02/28 18:50, Max Reitz wrote: > On 2018-02-02 06:23, Fam Zheng wrote: > > This reverts commit 76bf133c4 which updated the reference output, and > > fixed the reference image, because the code path we want to exercise is > > actually the invalid image size. > >

Re: [Qemu-devel] [Qemu-block] [PATCH] vl: introduce vm_shutdown()

2018-02-27 Thread Fam Zheng
On Tue, 02/27 15:30, Stefan Hajnoczi wrote: > On Fri, Feb 23, 2018 at 04:20:44PM +0800, Fam Zheng wrote: > > On Tue, 02/20 13:10, Stefan Hajnoczi wrote: > > > 1. virtio_scsi_handle_cmd_vq() racing with iothread_stop_all() hits the > > >virtio_scsi_ctx_check() assert

Re: [Qemu-devel] [PATCH v2 00/16] block/mirror: Add active-sync mirroring

2018-02-27 Thread Fam Zheng
On Sat, 02/24 16:42, Max Reitz wrote: > Pïng Looks good in general. I've left some small questions though. Fam

Re: [Qemu-devel] [PATCH v2 15/16] block/mirror: Add copy mode QAPI interface

2018-02-27 Thread Fam Zheng
On Mon, 01/22 23:08, Max Reitz wrote: > This patch allows the user to specify whether to use active or only > passive mode for mirror block jobs. Currently, this setting will remain I think you want s/passive/background/ in the whole patch. > constant for the duration of the entire block job. >

Re: [Qemu-devel] [PATCH v2 14/16] block/mirror: Add active mirroring

2018-02-27 Thread Fam Zheng
On Mon, 01/22 23:08, Max Reitz wrote: > @@ -1151,7 +1285,48 @@ static int coroutine_fn > bdrv_mirror_top_preadv(BlockDriverState *bs, > static int coroutine_fn bdrv_mirror_top_pwritev(BlockDriverState *bs, > uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags) > { > -return

Re: [Qemu-devel] [PATCH v2 12/16] block/mirror: Distinguish active from passive ops

2018-02-27 Thread Fam Zheng
On Mon, 01/22 23:08, Max Reitz wrote: > Currently, the mirror block job only knows passive operations. But once > we introduce active writes, we need to distinguish between the two; for > example, mirror_wait_for_free_in_flight_slot() should wait for a passive > operation because active writes

Re: [Qemu-devel] [PATCH v2 11/16] block/dirty-bitmap: Add bdrv_dirty_iter_next_area

2018-02-27 Thread Fam Zheng
On Mon, 01/22 23:08, Max Reitz wrote: > This new function allows to look for a consecutively dirty area in a > dirty bitmap. > > Signed-off-by: Max Reitz > --- > include/block/dirty-bitmap.h | 2 ++ > block/dirty-bitmap.c | 51 >

Re: [Qemu-devel] [PATCH v2 10/16] hbitmap: Add @advance param to hbitmap_iter_next()

2018-02-27 Thread Fam Zheng
On Mon, 01/22 23:08, Max Reitz wrote: > diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c > index 9091c639b3..2a2aa5bd43 100644 > --- a/tests/test-hbitmap.c > +++ b/tests/test-hbitmap.c > @@ -46,7 +46,7 @@ static void hbitmap_test_check(TestHBitmapData *data, > > i = first; >

Re: [Qemu-devel] [PATCH v2 06/16] block/mirror: Use CoQueue to wait on in-flight ops

2018-02-27 Thread Fam Zheng
On Mon, 01/22 23:07, Max Reitz wrote: > qemu_iovec_destroy(>qiov); > -g_free(op); > > -if (s->waiting_for_io) { > -qemu_coroutine_enter(s->common.co); > -} > +qemu_co_queue_restart_all(>waiting_requests); > +g_free(op); OK, this answers my question to patch 5.

Re: [Qemu-devel] [PATCH v2 05/16] block/mirror: Convert to coroutines

2018-02-26 Thread Fam Zheng
On Mon, 01/22 23:07, Max Reitz wrote: > @@ -101,7 +105,7 @@ static BlockErrorAction > mirror_error_action(MirrorBlockJob *s, bool read, > } > } > > -static void mirror_iteration_done(MirrorOp *op, int ret) > +static void coroutine_fn mirror_iteration_done(MirrorOp *op, int ret) > { >

[Qemu-devel] [PATCH v2 1/2] slirp: Add "query-usernet" QMP command

2018-02-26 Thread Fam Zheng
the data, just like other HMP info_* commands. The TCPS_* macros are now defined as a QAPI enum. Signed-off-by: Fam Zheng <f...@redhat.com> --- net/slirp.c | 26 +++ qapi/net.json| 201 +++ slirp/libslirp.h | 1

[Qemu-devel] [PATCH v2 2/2] tests: Use query-usernet instead of 'info usernet'

2018-02-25 Thread Fam Zheng
Signed-off-by: Fam Zheng <f...@redhat.com> --- tests/vm/basevm.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 686d88decf..f51604e0ab 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -101,7

[Qemu-devel] [PATCH v2 0/2] slirp: Add query-usernet QMP command

2018-02-25 Thread Fam Zheng
v2: Fix compiler error. [patchew] The command is a counterpart of HMP "info usernet" and is at least very useful for the VM tests. So add it. Fam Zheng (2): slirp: Add "query-usernet" QMP command tests: Use query-usernet instead of 'info usernet' net/slirp.c

Re: [Qemu-devel] [PATCH 0/2] slirp: Add query-usernet QMP command

2018-02-25 Thread Fam Zheng
On Sun, 02/25 23:10, no-re...@patchew.org wrote: > Hi, > > This series failed build test on s390x host. Please find the details below. > > Type: series > Message-id: 20180226070311.10057-1-f...@redhat.com > Subject: [Qemu-devel] [PATCH 0/2] slirp: Add query-usernet QMP command > > === TEST

[Qemu-devel] [PATCH 0/2] slirp: Add query-usernet QMP command

2018-02-25 Thread Fam Zheng
The command is a counterpart of HMP "info usernet" and is at least very useful for the VM tests. So add it. Fam Zheng (2): slirp: Add "query-usernet" QMP command tests: Use query-usernet instead of 'info usernet' net/slirp.c| 26 +++ qapi

[Qemu-devel] [PATCH 1/2] slirp: Add "query-usernet" QMP command

2018-02-25 Thread Fam Zheng
the data, just like other HMP info_* commands. The TCPS_* macros are now defined as a QAPI enum. Signed-off-by: Fam Zheng <f...@redhat.com> --- net/slirp.c | 26 +++ qapi/net.json| 201 +++ slirp/libslirp.h | 1

[Qemu-devel] [PATCH 2/2] tests: Use query-usernet instead of 'info usernet'

2018-02-25 Thread Fam Zheng
Signed-off-by: Fam Zheng <f...@redhat.com> --- tests/vm/basevm.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 686d88decf..f51604e0ab 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -101,7

<    3   4   5   6   7   8   9   10   11   12   >