[Qemu-devel] [PATCH v3 2/9] raw: Implement copy offloading

2018-05-09 Thread Fam Zheng
Just pass down to ->file. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi --- block/raw-format.c | 20 1 file changed, 20 insertions(+) diff --git a/block/raw-format.c b/block/raw-format.c index a378547c99..febddf00c0 100644 --- a/block/raw-format.c +++ b/block/

Re: [Qemu-devel] [PATCH 3/5] vmdk: Implement .bdrv_co_create callback

2018-05-09 Thread Fam Zheng
On Wed, 05/09 14:41, Markus Armbruster wrote: > Beware, I'm only looking at QAPI-related aspects. > > Fam Zheng writes: > > > This makes VMDK support x-blockdev-create. The implementation reuses the > > image creation code in vmdk_co_create_opts which now accep

Re: [Qemu-devel] [PATCH 0/5] vmdk: Implement x-blockdev-create

2018-05-09 Thread Fam Zheng
On Tue, 05/08 23:08, no-re...@patchew.org wrote: > /var/tmp/patchew-tester-tmp-rg1lnbdu/src/block/vmdk.c: In function > ‘vmdk_co_do_create’: > /var/tmp/patchew-tester-tmp-rg1lnbdu/src/block/vmdk.c:2153:8: error: ‘blk’ > may be used uninitialized in this function [-Werror=maybe-uninitialized] >

Re: [Qemu-devel] [RFC PATCH v2 5/7] iscsi: Implement copy offloading

2018-05-08 Thread Fam Zheng
On Thu, 05/03 11:27, Stefan Hajnoczi wrote: > On Wed, Apr 18, 2018 at 11:04:22AM +0800, Fam Zheng wrote: > > +static void iscsi_save_designator(IscsiLun *lun, > > + struct > > scsi_inquiry_device_identification *inq_di) &

[Qemu-devel] [PATCH 5/5] iotests: Add VMDK tests for blockdev-create

2018-05-08 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/214 | 268 +++ tests/qemu-iotests/214.out | 304 + tests/qemu-iotests/group | 1 + 3 files changed, 573 insertions(+) create mode 100755 tests/qemu-iotests/214

[Qemu-devel] [PATCH 4/5] iotests: Filter cid numbers in VMDK extent info

2018-05-08 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/common.filter | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index c5f4bcf578..0debefed18 100644 --- a/tests/qemu-iotests/common.filter +++ b/tests/qemu-iotests/common.filter

[Qemu-devel] [PATCH 2/5] vmdk: Refactor vmdk_create_extent

2018-05-08 Thread Fam Zheng
the next patch. Signed-off-by: Fam Zheng --- block/vmdk.c | 71 +--- 1 file changed, 44 insertions(+), 27 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 84f8bbe480..083942f806 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -

[Qemu-devel] [PATCH 1/5] qapi: Add qapi_enum_parse_full

2018-05-08 Thread Fam Zheng
This variant of qapi_enum_parse can do case insensitive compare. Signed-off-by: Fam Zheng --- include/qapi/util.h | 2 ++ qapi/qapi-util.c| 20 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/include/qapi/util.h b/include/qapi/util.h index a7c3c64148

[Qemu-devel] [PATCH 0/5] vmdk: Implement x-blockdev-create

2018-05-08 Thread Fam Zheng
lockdevRef parsing can be hooked in. Please review! Thanks. Fam Zheng (5): qapi: Add qapi_enum_parse_full vmdk: Refactor vmdk_create_extent vmdk: Implement .bdrv_co_create callback iotests: Filter cid numbers in VMDK extent info iotests: Add VMDK tests for blockdev-create bl

[Qemu-devel] [PATCH 3/5] vmdk: Implement .bdrv_co_create callback

2018-05-08 Thread Fam Zheng
tion. The QAPI command parameters are mostly the same as the old create_opts except the dropped legacy @compat6 switch, which is redundant with @hwversion. Signed-off-by: Fam Zheng --- block/vmdk.c | 481 +-- qapi/block-core.json | 67 ++

Re: [Qemu-devel] [PATCH v1 1/1] tests/docker: Add a Avocado Docker test

2018-05-08 Thread Fam Zheng
On Mon, 05/07 13:09, Alistair Francis wrote: > Avocado is not trivial to setup on non-Fedora systems. To simplfying > future testing add a docker test image that runs Avocado tests. > > Signed-off-by: Alistair Francis > --- > tests/docker/dockerfiles/fedora.docker | 12 +-- > tests/docke

Re: [Qemu-devel] [PATCH] docker: Fix trivial typo

2018-05-08 Thread Fam Zheng
On Tue, 05/08 11:43, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/docker/Makefile.include | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include > index de87341528..ef1a3e62eb 1

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

2018-05-07 Thread Fam Zheng
On Fri, 05/04 00:49, no-re...@patchew.org wrote: > Hi, > > This series seems to have some coding style problems. See output below for > more information: Code indentation issues are due to the pre-existing style in the file and is not changed by the patch. Fam > > Type: series > Message-id: 20

Re: [Qemu-devel] [PATCH 2/3] block/file-posix: File locking during creation

2018-05-07 Thread Fam Zheng
On Fri, 05/04 15:45, Max Reitz wrote: > On 2018-05-03 08:45, Fam Zheng wrote: > > On Sat, 04/28 13:03, Max Reitz wrote: > >> On 2018-04-27 08:22, Fam Zheng wrote: > >>> On Sat, 04/21 00:09, Max Reitz wrote: > >>>> When creating a file, we should take t

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

2018-05-04 Thread Fam Zheng
", "awaiting". * Fix include "qapi/qapi-commands-net.h". * Underscores to dashes. * "Since 2.13" now. 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

[Qemu-devel] [PATCH v6 2/4] slirp: Use QAPI enum to replace TCPS_* macros

2018-05-04 Thread Fam Zheng
This is a mechanical patch that does search-and-replace and adding necessary "#include" for pulling in the QAPI enum definition. The string lookup could use the QAPI helper, and is left for the next patch. Signed-off-by: Fam Zheng --- slirp/misc.c | 23 ++-- s

[Qemu-devel] [PATCH v6 3/4] slirp: Add "query-usernet" QMP command

2018-05-04 Thread Fam Zheng
rints the data, just like other HMP info_* commands. Signed-off-by: Fam Zheng --- net/slirp.c | 26 qapi/net.json| 180 +++ slirp/libslirp.h | 2 + slirp/misc.c | 158 ++---

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

2018-05-04 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Eric Blake --- 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 3a2d508c35..dcfa6597ad 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -101,7

[Qemu-devel] [PATCH v6 1/4] qapi: Introduce UsernetTcpState

2018-05-04 Thread Fam Zheng
This will be a drop-in replacement for the current TCPS_ macro/enum and what we will return to users in the coming qmp command. The next patch will drop TCPS_ to avoid duplication and keep further refactoring simple. Signed-off-by: Fam Zheng --- qapi/net.json | 34

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

2018-05-03 Thread Fam Zheng
On Thu, 05/03 10:12, Daniel P. Berrangé wrote: > On Thu, May 03, 2018 at 09:25:45AM +0800, Fam Zheng wrote: > > HMP "info usernet" has been available but it isn't ideal for programmed > > use cases. This closes the gap in QMP by adding a counterpart > > &quo

Re: [Qemu-devel] [PATCH v2 0/2] block/file-posix: allow -drive cache.direct=off live migration

2018-05-03 Thread Fam Zheng
On Fri, 04/27 17:23, Stefan Hajnoczi wrote: > v2: > * Add comment on !__linux__ situation [Fam] > * Add file-posix.c x-check-cache-dropped=on|off option [DaveG, Kevin] Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH 2/3] block/file-posix: File locking during creation

2018-05-02 Thread Fam Zheng
On Sat, 04/28 13:03, Max Reitz wrote: > On 2018-04-27 08:22, Fam Zheng wrote: > > On Sat, 04/21 00:09, Max Reitz wrote: > >> When creating a file, we should take the WRITE and RESIZE permissions. > >> We do not need either for the creation itself, but we do need them for

Re: [Qemu-devel] [PATCH v2 0/5] checkpatch: backport UTF-8 fixes and MAINTAINERS check

2018-05-02 Thread Fam Zheng
On Tue, 05/01 14:04, Stefan Hajnoczi wrote: > On Mon, Apr 30, 2018 at 05:56:30AM -0700, no-re...@patchew.org wrote: > > === OUTPUT BEGIN === > > Checking PATCH 1/5: checkpatch: add a --strict check for utf-8 in commit > > logs... > > WARNING: line over 80 characters > > #101: FILE: scripts/checkpa

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

2018-05-02 Thread Fam Zheng
rints the data, just like other HMP info_* commands. The TCPS_* macros are now defined as a QAPI enum. Signed-off-by: Fam Zheng --- net/slirp.c | 26 +++ qapi/net.json| 214 +++ slirp/libslirp.h | 2

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

2018-05-02 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Eric Blake --- 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 3a2d508c35..dcfa6597ad 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -101,7

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

2018-05-02 Thread Fam Zheng
api-commands-net.h". * Underscores to dashes. * "Since 2.13" now. 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] [PATCH v4 1/2] slirp: Add "query-usernet" QMP command

2018-05-02 Thread Fam Zheng
On Wed, 05/02 14:41, Eric Blake wrote: > On 05/02/2018 02:30 AM, Fam Zheng wrote: > > HMP "info usernet" has been available but it isn't ideal for programmed > > use cases. This closes the gap in QMP by adding a counterpart > > "query-usernet" comman

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

2018-05-02 Thread Fam Zheng
On Wed, 05/02 09:44, Thomas Huth wrote: > On 02.05.2018 09:29, Fam Zheng wrote: > > On Tue, 05/01 22:41, Samuel Thibault wrote: > >> Hello, > >> > >> I'm sorry I didn't find the time to have a look at it before. > >> > >> In general

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

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

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

2018-05-02 Thread Fam Zheng
es to dashes. * "Since 2.13" now. 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-usern

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

2018-05-02 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Eric Blake --- 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 3a2d508c35..dcfa6597ad 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -101,7

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

2018-05-02 Thread Fam Zheng
On Tue, 05/01 22:41, Samuel Thibault wrote: > Hello, > > I'm sorry I didn't find the time to have a look at it before. > > In general it looks good, just a few things: > > Samuel > > Fam Zheng, le ven. 16 mars 2018 14:28:21 +0800, a ecrit: > > +

Re: [Qemu-devel] [Qemu-block] [RFC PATCH v2 3/7] qcow2: Implement copy offloading

2018-04-26 Thread Fam Zheng
On Thu, 04/26 16:34, Stefan Hajnoczi wrote: > On Wed, Apr 18, 2018 at 11:04:20AM +0800, Fam Zheng wrote: > > +static int qcow2_co_copy_range_to(BlockDriverState *bs, > > + BdrvChild *src, uint64_t src_offset, > > +

Re: [Qemu-devel] [PATCH 3/3] iotests: Add creation test to 153

2018-04-26 Thread Fam Zheng
> > Signed-off-by: Max Reitz Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH 1/3] block/file-posix: Pass FD to locking helpers

2018-04-26 Thread Fam Zheng
e, we should modify them to receive only > the FD. > > Signed-off-by: Max Reitz Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH 2/3] block/file-posix: File locking during creation

2018-04-26 Thread Fam Zheng
On Sat, 04/21 00:09, Max Reitz wrote: > When creating a file, we should take the WRITE and RESIZE permissions. > We do not need either for the creation itself, but we do need them for > clearing and resizing it. So we can take the proper permissions by > replacing O_TRUNC with an explicit truncati

Re: [Qemu-devel] [Qemu-block] [RFC PATCH v2 1/7] block: Introduce API for copy offloading

2018-04-26 Thread Fam Zheng
On Thu, 04/26 15:57, Stefan Hajnoczi wrote: > On Wed, Apr 18, 2018 at 11:04:18AM +0800, Fam Zheng wrote: > > diff --git a/block/io.c b/block/io.c > > index bd9a19a9c4..d274e9525f 100644 > > --- a/block/io.c > > +++ b/block/io.c > > @@ -2826,3 +2826,94 @@ void bdr

Re: [Qemu-devel] Who is running QEMU automated tests, and when?

2018-04-26 Thread Fam Zheng
On Thu, 04/26 10:57, Eduardo Habkost wrote: > So, for anybody that runs automated QEMU tests once in a while, > can we know: > > * What test cases are you running? Where can we get more > information about the tests you run? These currently run on patchew: * checkpatch * ./configure && make

Re: [Qemu-devel] [PATCH] docker: Rename the amd64 image as amd64-cross

2018-04-20 Thread Fam Zheng
On Fri, 04/20 00:41, Philippe Mathieu-Daudé wrote: > On 04/19/2018 11:57 PM, Fam Zheng wrote: > > On Thu, 04/19 23:40, Philippe Mathieu-Daudé wrote: > >> Like the other images, this one is also used to cross-compile. > >> Name it accordingly, matching directory patte

Re: [Qemu-devel] [RFC 1/2] block/file-posix: implement bdrv_co_invalidate_cache() on Linux

2018-04-19 Thread Fam Zheng
On Fri, 04/20 11:15, Stefan Hajnoczi wrote: > On Thu, Apr 19, 2018 at 04:13:44PM +0800, Fam Zheng wrote: > > On Thu, 04/19 15:52, Stefan Hajnoczi wrote: > > > On Linux posix_fadvise(POSIX_FADV_DONTNEED) invalidates pages*. Use > > > this to drop page cache on the des

Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS

2018-04-19 Thread Fam Zheng
On Thu, 04/19 23:57, Philippe Mathieu-Daudé wrote: > On 04/19/2018 02:58 PM, Peter Maydell wrote: > > On 19 April 2018 at 18:49, Alex Bennée wrote: > >> Philippe Mathieu-Daudé writes: > >>> On 04/19/2018 10:58 AM, Alex Bennée wrote: > This doesn't add any additional tests but enables buildin

Re: [Qemu-devel] [PATCH] docker: Rename the amd64 image as amd64-cross

2018-04-19 Thread Fam Zheng
On Thu, 04/19 23:40, Philippe Mathieu-Daudé wrote: > Like the other images, this one is also used to cross-compile. > Name it accordingly, matching directory pattern. > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/docker/Makefile.include | 2 +- > .../{

Re: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg

2018-04-19 Thread Fam Zheng
not review all the patches, but for the Docker part: Acked-by: Fam Zheng

Re: [Qemu-devel] [PATCH v2 01/43] docker: add "probe" command for configure

2018-04-19 Thread Fam Zheng
"sudo": > +print "sudo" > +except Exception: > +print "no" Non-zero exit code is better in 'no' case, but I guess it's not required by configure. Either way: Reviewed-by: Fam Zheng > + > +return > + > + > def main(): > parser = argparse.ArgumentParser(description="A Docker helper", > usage="%s ..." % os.path.basename(sys.argv[0])) > -- > 2.17.0 >

Re: [Qemu-devel] [PATCH v2 09/43] docker: extend "cc" command to accept compiler

2018-04-19 Thread Fam Zheng
On Thu, 04/19 14:58, Alex Bennée wrote: > When calling our cross-compilation images we want to call something > other than the default cc. > > Signed-off-by: Alex Bennée > Reviewed-by: Fam Zheng

Re: [Qemu-devel] [RFC 1/2] block/file-posix: implement bdrv_co_invalidate_cache() on Linux

2018-04-19 Thread Fam Zheng
On Thu, 04/19 15:52, Stefan Hajnoczi wrote: > On Linux posix_fadvise(POSIX_FADV_DONTNEED) invalidates pages*. Use > this to drop page cache on the destination host during shared storage > migration. This way the destination host will read the latest copy of > the data and will not use stale data

Re: [Qemu-devel] [PATCH] checkpatch: warn about missing MAINTAINERS file changes

2018-04-18 Thread Fam Zheng
On Mon, 04/16 16:09, Markus Armbruster wrote: > Thomas Huth writes: > > > On 12.03.2018 14:18, Stefan Hajnoczi wrote: > >> Warn if files are added/renamed/deleted without MAINTAINERS file > >> changes. This has helped me in Linux and we could benefit from this > >> check in QEMU. > >> > >> This

Re: [Qemu-devel] [PATCH v2] QemuMutex: support --enable-debug-mutex

2018-04-18 Thread Fam Zheng
. It might be extremely easy to use this tool to debug > deadlocks since we can directly know who took the lock then as long as > we can have a gdb attached to the process. > > CC: Paolo Bonzini > CC: Stefan Hajnoczi > CC: Fam Zheng > Signed-off-by: Peter Xu &g

[Qemu-devel] [RFC PATCH v2 5/7] iscsi: Implement copy offloading

2018-04-17 Thread Fam Zheng
Issue EXTENDED COPY (LID1) command to implement the copy_range API. The parameter data construction code is ported from libiscsi's iscsi-dd.c. Signed-off-by: Fam Zheng --- block/iscsi.c| 266 +++ include/scsi/constants.h | 3 + 2

[Qemu-devel] [RFC PATCH v2 2/7] raw: Implement copy offloading

2018-04-17 Thread Fam Zheng
Just pass down to ->file. Signed-off-by: Fam Zheng --- block/raw-format.c | 20 1 file changed, 20 insertions(+) diff --git a/block/raw-format.c b/block/raw-format.c index a378547c99..febddf00c0 100644 --- a/block/raw-format.c +++ b/block/raw-format.c @@ -482,6 +482

[Qemu-devel] [RFC PATCH v2 7/7] qemu-img: Convert with copy offloading

2018-04-17 Thread Fam Zheng
The new blk_co_copy_range interface offers a more efficient way in the case of network based storage. Make use of it to allow faster convert operation. Since copy offloading cannot do zero detection ('-S') and compression (-c), only try it when these options are not used. Signed-o

[Qemu-devel] [RFC PATCH v2 6/7] block-backend: Add blk_co_copy_range

2018-04-17 Thread Fam Zheng
It's a BlockBackend wrapper of the BDS interface. Signed-off-by: Fam Zheng --- block/block-backend.c | 9 + include/sysemu/block-backend.h | 4 2 files changed, 13 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index 681b240b12..2a984b1864 1

[Qemu-devel] [RFC PATCH v2 1/7] block: Introduce API for copy offloading

2018-04-17 Thread Fam Zheng
Signed-off-by: Fam Zheng --- block/io.c| 91 +++ include/block/block.h | 4 +++ include/block/block_int.h | 30 3 files changed, 125 insertions(+) diff --git a/block/io.c b/block/io.c index bd9a19a9c4..d274e9525f

[Qemu-devel] [RFC PATCH v2 4/7] file-posix: Implement bdrv_co_copy_range

2018-04-17 Thread Fam Zheng
With copy_file_range(2), we can implement the bdrv_co_copy_range semantics. Signed-off-by: Fam Zheng --- block/file-posix.c | 99 +++-- include/block/raw-aio.h | 10 - 2 files changed, 104 insertions(+), 5 deletions(-) diff --git a/block

[Qemu-devel] [RFC PATCH v2 3/7] qcow2: Implement copy offloading

2018-04-17 Thread Fam Zheng
The two callbacks are implemented quite similarly to the read/write functions: bdrv_co_copy_range_from maps for read and calls into bs->file or bs->backing depending on the allocation status; bdrv_co_copy_range_to maps for write and calls into bs->file. Signed-off-by: Fam Zheng --- bl

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

2018-04-17 Thread Fam Zheng
d use the API in block jobs too. Fam Zheng (7): block: Introduce API for copy offloading raw: Implement copy offloading qcow2: Implement copy offloading file-posix: Implement bdrv_co_copy_range iscsi: Implement copy offloading block-backend: Add blk_co_copy_range qemu-img: Convert

Re: [Qemu-devel] [PATCH v1 22/24] tests/tcg/Makefile: update to be called from Makefile.target

2018-04-12 Thread Fam Zheng
On Thu, 04/12 09:47, Alex Bennée wrote: > > Fam Zheng writes: > >> +testthread: LDFLAGS=-lpthread > > > > I'm a bit curious why only testthread is left in this file but others > > are gone. > > testthread is the only one that needs additional f

Re: [Qemu-devel] [PATCH v1 22/24] tests/tcg/Makefile: update to be called from Makefile.target

2018-04-12 Thread Fam Zheng
On Tue, 04/10 20:39, Alex Bennée wrote: > This make is now invoked from each individual target make with the > appropriate CC and ARCH set for each guest. It includes all the > multiarch tests by default as well as any tests from > tests/tcg/$(ARCH). > > As there may be subtle additional requireme

Re: [Qemu-devel] [PATCH v1 07/24] docker: allow "cc" command to run in user context

2018-04-12 Thread Fam Zheng
s:ro,z" % (p, p)] > > +if args.user: > +cmd += ["-u", args.user] > + > cmd += [args.image] > > # The compile command we are running > -- > 2.16.2 > Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH v1 06/24] docker: extend "cc" command to accept compiler

2018-04-12 Thread Fam Zheng
On Tue, 04/10 20:39, Alex Bennée wrote: > When calling our cross-compilation images we want to call something > other than the default cc. Makes sense to me! > > Signed-off-by: Alex Bennée > --- > tests/docker/docker.py | 18 +++--- > 1 file changed, 15 insertions(+), 3 deletions(-

Re: [Qemu-devel] [PATCH v2] qemu-thread: always keep the posix wrapper layer

2018-04-12 Thread Fam Zheng
tr, > - start_routine, arg); > -} > +qemu_thread_args = g_new0(QemuThreadArgs, 1); > +qemu_thread_args->name = g_strdup(name); > +qemu_thread_args->start_routine = start_routine; > +qemu_thread_args->arg = arg; > + > +err = pthread_create(&thread->thread, &attr, > + qemu_thread_start, qemu_thread_args); > > if (err) > error_exit(err, __func__); > -- > 2.14.3 > Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH v1 01/24] configure: add test for docker availability

2018-04-11 Thread Fam Zheng
On Wed, 04/11 11:58, Alex Bennée wrote: > > Fam Zheng writes: > > > On Tue, 04/10 20:38, Alex Bennée wrote: > >> This tests for a working docker installation without sudo and sets up > >> config-host.mak accordingly. This will be useful from cross co

Re: [Qemu-devel] [PATCH v1 01/24] configure: add test for docker availability

2018-04-11 Thread Fam Zheng
On Tue, 04/10 20:38, Alex Bennée wrote: > This tests for a working docker installation without sudo and sets up > config-host.mak accordingly. This will be useful from cross compiling > things in the future. > > Signed-off-by: Alex Bennée > --- > configure | 23 +++ > 1 file

Re: [Qemu-devel] [PATCH] configure: don't warn SDL abi if disabled

2018-04-10 Thread Fam Zheng
o probe SDL stuff when it's off. > > CC: Paolo Bonzini > CC: Gerd Hoffmann > CC: Peter Maydell > CC: Daniel P. Berrange > CC: Fam Zheng > CC: "Philippe Mathieu-Daudé" > Signed-off-by: Peter Xu > --- > configure | 83 >

Re: [Qemu-devel] [Qemu-block] [RFC PATCH 4/8] file-posix: Implement bdrv_co_copy_range

2018-04-09 Thread Fam Zheng
On Wed, 04/04 14:20, Stefan Hajnoczi wrote: > On Thu, Mar 29, 2018 at 07:09:10PM +0800, Fam Zheng wrote: > > +static ssize_t handle_aiocb_copy_range(RawPosixAIOData *aiocb) > > +{ > > +#ifndef HAS_COPY_FILE_RANGE > > +return -ENOTSUP; > > +#else > >

[Qemu-devel] [PULL 2/4] tests: Fix ubuntu.i386 image initialization

2018-04-09 Thread Fam Zheng
do it conditionally here. Reported-by: Eric Blake Signed-off-by: Fam Zheng Message-Id: <20180322034753.6301-1-f...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Tested-by: Eric Blake Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 5 + 1 file changed, 1 insertion(+), 4 deletio

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

2018-04-09 Thread Fam Zheng
sting-pull-request for you to fetch changes up to 07fed474177a4566052ea81b1563d53a37083e84: docker: fedora: test more components (2018-04-09 15:13:02 +0800) Testing patches ---

[Qemu-devel] [PULL 1/4] docker: dump 'config.log' if ./configure fails

2018-04-09 Thread Fam Zheng
From: Philippe Mathieu-Daudé Suggested-by: Eric Blake Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Message-Id: <20180315142713.30960-1-f4...@amsat.org> Signed-off-by: Fam Zheng --- tests/docker/common.rc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

[Qemu-devel] [PULL 3/4] docker: Inline "prep_fail" in run script

2018-04-09 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 Message-Id: <20180326090350.30014-1-f...@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Fam Zheng --- tests/docker/run | 2 +- 1 file changed,

[Qemu-devel] [PULL 4/4] docker: fedora: test more components

2018-04-09 Thread Fam Zheng
From: Paolo Bonzini Install optional dependencies of QEMU to get better coverage. Signed-off-by: Paolo Bonzini Message-Id: <1520942752-19449-1-git-send-email-pbonz...@redhat.com> Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/fedora.docker | 13 ++--- 1 file chang

Re: [Qemu-devel] Loadable block drivers?

2018-04-08 Thread Fam Zheng
On Thu, 04/05 11:40, Lindsay Mathieson wrote: > On 4 April 2018 at 23:41, Stefan Hajnoczi wrote: > > > On Tue, Apr 03, 2018 at 11:30:33AM +0800, Fam Zheng wrote: > > > On Tue, 04/03 13:17, Lindsay Mathieson wrote: > > > > On 3 April 2018 at 13:11, Fam Zheng wr

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

2018-04-08 Thread Fam Zheng
On Fri, 04/06 13:41, Paolo Bonzini wrote: > On 05/04/2018 14:55, Stefan Hajnoczi wrote: > > bdrv_copy_file_range() will invoke bdrv_co_copy_file_range_src() on > > src[qcow2]. The qcow2 block driver will invoke > > bdrv_co_copy_file_range_src() on src[file]. The file-posix driver will > > invoke

Re: [Qemu-devel] [PATCH v2] iotests: fix wait_until_completed()

2018-04-08 Thread Fam Zheng
rt_qmp(event, 'data/offset', > event['data']['len']) > -completed = True > - > -self.assert_no_active_block_jobs() > -return event > +self.assert_no_active_block_jobs() > +return event > > def wait_ready(self, drive='drive0'): > '''Wait until a block job BLOCK_JOB_READY event''' > -- > 2.14.3 > > Reviewed-by: Fam Zheng

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

2018-04-04 Thread Fam Zheng
On Wed, 04/04 14:23, Stefan Hajnoczi wrote: > On Thu, Mar 29, 2018 at 07:09:06PM +0800, Fam Zheng wrote: > > [Posting a preview RFC for the general idea discussion and internal API > > review. > > Libiscsi support is being worked on in the meantime.] > > > > T

Re: [Qemu-devel] [PATCH 1/3] archive-source.sh: Drop submodule code

2018-04-04 Thread Fam Zheng
On Wed, 04/04 10:24, Daniel P. Berrangé wrote: > On Wed, Apr 04, 2018 at 05:07:56PM +0800, Fam Zheng wrote: > > On Wed, 04/04 09:23, Daniel P. Berrangé wrote: > > > On Wed, Apr 04, 2018 at 10:51:59AM +0800, Fam Zheng wrote: > > > > ./configure and make now take care

Re: [Qemu-devel] [PATCH 1/3] archive-source.sh: Drop submodule code

2018-04-04 Thread Fam Zheng
On Wed, 04/04 09:23, Daniel P. Berrangé wrote: > On Wed, Apr 04, 2018 at 10:51:59AM +0800, Fam Zheng wrote: > > ./configure and make now take care of submodules, we only need to clone > > the top tree. > > If you don't include the submodules in the tar.gz archive, then

Re: [Qemu-devel] [PATCH 0/3] Add a CentOS test image to run docker tests

2018-04-04 Thread Fam Zheng
On Wed, 04/04 09:19, Daniel P. Berrangé wrote: > On Wed, Apr 04, 2018 at 10:51:58AM +0800, Fam Zheng wrote: > > Docker testing on patchew has long suffered from 'make check' hangings. The > > cleanness of VM testing is the cure. Now let's add a CentOS 7 image to

Re: [Qemu-devel] [PATCH for-2.12] iothread: workaround glib bug which hangs qmp-test

2018-04-04 Thread Fam Zheng
if (iothread->worker_context) { > g_main_context_unref(iothread->worker_context); > iothread->worker_context = NULL; > } > qemu_cond_destroy(&iothread->init_done_cond); > qemu_mutex_destroy(&iothread->init_done_lock); > -if (!iothread->ctx) { > -return; > -} > -aio_context_unref(iothread->ctx); > } > > static void iothread_complete(UserCreatable *obj, Error **errp) > -- > 2.14.3 > Reviewed-by: Fam Zheng

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

2018-04-03 Thread Fam Zheng
On Mon, 03/26 17:03, Fam Zheng wrote: > 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 > --- > tests/docker/run | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

[Qemu-devel] [PATCH 3/3] tests: Add centos VM testing

2018-04-03 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 --- tests/vm/centos | 82 + 1 file changed, 82 insertions(+) create mode 100755 tests/vm/centos diff

[Qemu-devel] [PATCH 0/3] Add a CentOS test image to run docker tests

2018-04-03 Thread Fam Zheng
wait for Peter to fix the 'docker-test-quick@centos6' hanging (oob test) before adding it too. Fam Fam Zheng (3): archive-source.sh: Drop submodule code tests: Add an option for snapshot (default: off) tests: Add centos VM testing scripts/archive-source.sh | 47 +++-

[Qemu-devel] [PATCH 2/3] tests: Add an option for snapshot (default: off)

2018-04-03 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 --- tests/vm/basevm.py | 7 ++- 1 file changed, 6 insertions

[Qemu-devel] [PATCH 1/3] archive-source.sh: Drop submodule code

2018-04-03 Thread Fam Zheng
./configure and make now take care of submodules, we only need to clone the top tree. Signed-off-by: Fam Zheng --- scripts/archive-source.sh | 47 --- 1 file changed, 4 insertions(+), 43 deletions(-) diff --git a/scripts/archive-source.sh b/scripts

Re: [Qemu-devel] [PATCH v2] scsi-block: Handle error from host devices

2018-04-03 Thread Fam Zheng
On Wed, 04/04 09:47, Fam Zheng wrote: > The callback of blk_aio_ioctl is not sensible to SCSI errors, so > werror=stop doesn't work if ioctl returns 0 but the scsi status is > error. > > Peek at the sg_io_hdr_t fields and amend ret to fix that. > > Signed-off-by: Fam Zh

Re: [Qemu-devel] [PATCH 0/2] Couple of qemu-pr-helper fixes

2018-04-03 Thread Fam Zheng
r-helper to write pidfile > because I told it to. > > Michal Privoznik (2): > qemu-pr-helper: Daemonize before dropping privileges > qemu-pr-helper: Write pidfile more often Reviewed-by: Fam Zheng

[Qemu-devel] [PATCH v2] scsi-block: Handle error from host devices

2018-04-03 Thread Fam Zheng
The callback of blk_aio_ioctl is not sensible to SCSI errors, so werror=stop doesn't work if ioctl returns 0 but the scsi status is error. Peek at the sg_io_hdr_t fields and amend ret to fix that. Signed-off-by: Fam Zheng --- v2: Fix ->cb. [Daniel] --- hw/scsi/scsi-dis

Re: [Qemu-devel] [PATCH] scsi-block: Handle error from host devices

2018-04-03 Thread Fam Zheng
On Tue, 04/03 17:41, Daniel Henrique Barboza wrote: > Hi Fam, > > I've tried this patch and found issues when booting a VM using SCSI > passthrough. This is the backtrace from gdb from the segfault that happens > in the middle of kernel boot: > > Thread 1 "qemu-system-ppc" received signal SIGSEGV

Re: [Qemu-devel] [PATCH for-2.12] monitor: bind dispatch bh to iohandler context

2018-04-03 Thread Fam Zheng
thanks to Eric Auger who offered great help during both > debugging and verifying the problem. The ARM test was carried out by > applying this patch upon QEMU 2.12.0-rc0 and problem is gone after the > patch. > > A quick test of mine shows that after this patch applied we can pass

Re: [Qemu-devel] Loadable block drivers?

2018-04-02 Thread Fam Zheng
On Tue, 04/03 13:17, Lindsay Mathieson wrote: > On 3 April 2018 at 13:11, Fam Zheng wrote: > > > On Tue, 04/03 12:59, Lindsay Mathieson wrote: > > > Hi all, was looking at developing a block driver for qemu - have examined > > > the drivers at: > > > &g

Re: [Qemu-devel] Loadable block drivers?

2018-04-02 Thread Fam Zheng
On Tue, 04/03 12:59, Lindsay Mathieson wrote: > Hi all, was looking at developing a block driver for qemu - have examined > the drivers at: > > https://github.com/qemu/qemu/tree/master/block > > And it seems straightforward enough. > > One thing that is unclear - all the drivers appear to be c

Re: [Qemu-devel] [PULL 0/2] Ide patches

2018-04-02 Thread Fam Zheng
On Mon, 04/02 12:34, John Snow wrote: > > > On 03/31/2018 03:08 AM, 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] [RFC 00/18] QEMU validator: A method to specify QEMU crash-test cases

2018-04-02 Thread Fam Zheng
On Mon, Apr 2, 2018 at 7:10 AM, Philippe Mathieu-Daudé wrote: > [/var]/tmp full due to some jobs not cleaning well their workspaces? Somehow our "make check" now keeps hanging in the container, preventing it from being cleaned up correctly... Will try to find time for it this week. Fam > > On

Re: [Qemu-devel] qemu testing image link not work

2018-04-02 Thread Fam Zheng
On Mon, 04/02 01:52, Jidong Xiao wrote: > Hi, > > A huge amount of documents has referenced this testing image: > > http://wiki.qemu.org/download/linux-0.2.img.bz2 > > However, the image is no longer there. Is the image still available > somewhere? Thanks. According to the edit history of https

[Qemu-devel] [PATCH] scsi-block: Handle error from host devices

2018-04-01 Thread Fam Zheng
The callback of blk_aio_ioctl is not sensible to SCSI errors, so werror=stop doesn't work if ioctl returns 0 but the scsi status is error. Peek at the sg_io_hdr_t fields and amend ret to fix that. Signed-off-by: Fam Zheng --- hw/scsi/scsi-disk.c | 20 +++- 1 file change

Re: [Qemu-devel] [PATCH 1/1] block/file-posix.c: fix not reopened lock file descriptor

2018-03-29 Thread Fam Zheng
On Thu, 03/22 19:08, Dion Bosschieter wrote: > Yeah I have a use case, before a last sync on a storage migration we suspend a > VM -> send the last diffs -> mount the new storage server and after that we > change a symlink -> call reopen -> check if all file descriptors are changed > before resumin

Re: [Qemu-devel] [PATCH 1/1] block/file-posix.c: fix not reopened lock file descriptor

2018-03-29 Thread Fam Zheng
On Thu, 03/22 18:39, Kevin Wolf wrote: > [ Cc: qemu-block ] > > Am 22.03.2018 um 18:20 hat Dion Bosschieter geschrieben: > > In commit 244a5668106297378391b768e7288eb157616f64 another > > file descriptor to BDRVRawState is added. When we try to issue the > > reopen command only s->fd is reopened;

[Qemu-devel] [RFC PATCH 7/8] block-backend: Add blk_co_copy_range

2018-03-29 Thread Fam Zheng
It's a BlockBackend wrapper of bdrv_co_copy_range. Signed-off-by: Fam Zheng --- block/block-backend.c | 8 include/sysemu/block-backend.h | 4 2 files changed, 12 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index 681b240b12..54b0789282 1

[Qemu-devel] [RFC PATCH 6/8] raw: Implement raw_co_map_range

2018-03-29 Thread Fam Zheng
Because raw can be seen as a "passthrough" format, its implementation of bdrv_co_map_range is exactly the same as bdrv_co_block_status. The BDRV_REQ_ALLOCATE flag can be ignored because no metadata update is necessary. Signed-off-by: Fam Zheng --- block/raw-format.c | 9 +++

[Qemu-devel] [RFC PATCH 8/8] qemu-img: Convert with copy offloading

2018-03-29 Thread Fam Zheng
The new blk_co_copy_range interface offers a more efficient way in the case of network based storage. Make use of it to allow faster convert operation. Since copy offloading cannot do zero detection ('-S') and compression (-c), only try it when these options are not used. Signed-o

[Qemu-devel] [RFC PATCH 4/8] file-posix: Implement bdrv_co_copy_range

2018-03-29 Thread Fam Zheng
With copy_file_range(2), we can implement the bdrv_co_copy_range semantics. Signed-off-by: Fam Zheng --- block/file-posix.c | 77 +++-- include/block/raw-aio.h | 10 +-- 2 files changed, 82 insertions(+), 5 deletions(-) diff --git a/block

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