Re: [PATCH 06/16] ci: Enable msys2 ci in cirrus

2020-09-09 Thread Yonggang Luo
On Wed, Sep 9, 2020 at 4:27 PM Daniel P. Berrangé wrote: > On Wed, Sep 09, 2020 at 03:48:10AM +0800, Yonggang Luo wrote: > > Install msys2 in a proper way refer to > https://github.com/cirruslabs/cirrus-ci-docs/issues/699 > > The https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2 need to

Re: [PATCH 1/4] docs: lift block-core.json rST header into parents

2020-09-09 Thread Markus Armbruster
Kevin Wolf writes: > Am 09.09.2020 um 09:38 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Am 08.09.2020 um 14:03 hat Laszlo Ersek geschrieben: >> >> Hi Stefan, >> >> >> >> On 09/08/20 11:31, Stefan Hajnoczi wrote: >> >> > block-core.json is included from several places. It

Re: [PATCH v2 02/21] ci: fixes msys2 build by upgrading capstone to 4.0.2

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:45:58PM +0800, Yonggang Luo wrote: > The currently random version capstone have the following compiling issue: > CC /c/work/xemu/qemu/build/slirp/src/arp_table.o > make[1]: *** No rule to make target > “/c/work/xemu/qemu/build/capstone/capstone.lib”。 Stop. > >

[PATCH] qcow2: Return the original error code in qcow2_co_pwrite_zeroes()

2020-09-09 Thread Alberto Garcia
This function checks the current status of a (sub)cluster in order to see if an unaligned 'write zeroes' request can be done efficiently by simply updating the L2 metadata and without having to write actual zeroes to disk. If the situation does not allow using the fast path then the function

Re: [PATCH v2 09/21] osdep: These function are only available on Non-Win32 system.

2020-09-09 Thread Daniel P . Berrangé
Reword the subject to say "osdep: file locking functions are not available on Win32" On Wed, Sep 09, 2020 at 05:46:05PM +0800, Yonggang Luo wrote: > int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive); > int qemu_unlock_fd(int fd, int64_t start, int64_t len); > int

Re: [PATCH v2 07/21] tests: Trying fixes test-replication.c on msys2/mingw.

2020-09-09 Thread Yonggang Luo
On Wed, Sep 9, 2020 at 8:56 PM Daniel P. Berrangé wrote: > On Wed, Sep 09, 2020 at 05:46:03PM +0800, Yonggang Luo wrote: > > On Windows there is no path like /tmp/s_local_disk.XX > > Use g_get_tmp_dir instead of /tmp. > > > > Signed-off-by: Yonggang Luo > > --- > > tests/test-replication.c

Re: [PATCH v2 17/21] tests: Fixes test-io-channel-socket.c tests under msys2/mingw

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:46:13PM +0800, Yonggang Luo wrote: > Currently test-io-channel-socket doesn't init with > qemu_init_main_loop > and that's cause the qemu_aio_context not inited, > and the following is the stack when null pointer accessed: > > qemu_fd_register

Re: [PATCH v2 19/21] tests: Fixes test-io-channel-file by mask only owner file state mask bits

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:46:15PM +0800, Yonggang Luo wrote: > This is the error on msys2/mingw > Running test test-io-channel-file > ** > ERROR:../tests/test-io-channel-file.c:59:test_io_channel_file_helper: > assertion failed (TEST_MASK & ~mask == st.st_mode & 0777): (384 == 438) > ERROR

Re: [PATCH v2 20/21] tests: fix test-util-sockets.c

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:46:16PM +0800, Yonggang Luo wrote: > Fixes following errors: > Running test test-util-sockets > ERROR test-util-sockets - missing test plan > > # Start of name tests > ** > ERROR:../tests/test-util-sockets.c:93:test_socket_fd_pass_name_good: > assertion failed (fd !=

Re: [PATCH 06/16] ci: Enable msys2 ci in cirrus

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:36:49PM +0800, 罗勇刚(Yonggang Luo) wrote: > On Wed, Sep 9, 2020 at 4:27 PM Daniel P. Berrangé > wrote: > > > On Wed, Sep 09, 2020 at 03:48:10AM +0800, Yonggang Luo wrote: > > > Install msys2 in a proper way refer to > >

[PATCH v2 15/21] tests: Convert g_free to g_autofree macro in test-logging.c

2020-09-09 Thread Yonggang Luo
g_autofree are prefer than g_free when possible. Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé --- tests/test-logging.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test-logging.c b/tests/test-logging.c index 8a1161de1d..783fe09a27 100644 ---

[PATCH v2 19/21] tests: Fixes test-io-channel-file by mask only owner file state mask bits

2020-09-09 Thread Yonggang Luo
This is the error on msys2/mingw Running test test-io-channel-file ** ERROR:../tests/test-io-channel-file.c:59:test_io_channel_file_helper: assertion failed (TEST_MASK & ~mask == st.st_mode & 0777): (384 == 438) ERROR test-io-channel-file - Bail out!

[PATCH v2 18/21] tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with aio-posix.c

2020-09-09 Thread Yonggang Luo
This is a fixes for (C:\work\xemu\qemu\build\tests\test-aio-multithread.exe:19100): GLib-CRITICAL **: 23:03:24.965: g_source_remove_poll: assertion '!SOURCE_DESTROYED (source)' failed ERROR test-aio-multithread - Bail out! GLib-FATAL-CRITICAL: g_source_remove_poll: assertion '!SOURCE_DESTROYED

[PATCH v2 21/21] tests: Fixes test-qdev-global-props.c

2020-09-09 Thread Yonggang Luo
On win32 the line ending are \r\n, so we skip the \n in function test_dynamic_globalprop Signed-off-by: Yonggang Luo --- tests/test-qdev-global-props.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-props.c

Re: [PATCH v2 11/21] meson: disable crypto tests are empty under win32

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:46:07PM +0800, Yonggang Luo wrote: > Disable following tests on msys2/mingw > 'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', > 'pkix_asn1_tab.c', >tasn1, crypto], > 'test-crypto-tlssession':

Re: [PATCH v2 13/21] vmstate: Fixes test-vmstate.c on msys2/mingw

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:46:09PM +0800, Yonggang Luo wrote: > The vmstate are valid on win32, just need generate tmp path properly > > Signed-off-by: Yonggang Luo > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Thomas Huth > --- > tests/test-vmstate.c | 2 +- > 1 file changed, 1

Re: [RFC PATCH 00/12] hw: Forbid DMA write accesses to MMIO regions

2020-09-09 Thread Peter Maydell
On Wed, 9 Sep 2020 at 10:12, Stefan Hajnoczi wrote: > > On Thu, Sep 03, 2020 at 01:08:19PM +0200, Philippe Mathieu-Daudé wrote: > > The main patch is: > > "exec/memattrs: Introduce MemTxAttrs::direct_access field". > > This way we can restrict accesses to ROM/RAM by setting the > >

Re: [PATCH v2 03/21] configure: Fixes ncursesw detection under msys2/mingw and enable curses

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 08:55:15PM +0800, 罗勇刚(Yonggang Luo) wrote: > On Wed, Sep 9, 2020 at 8:51 PM Daniel P. Berrangé > wrote: > > > On Wed, Sep 09, 2020 at 05:45:59PM +0800, Yonggang Luo wrote: > > > The mingw pkg-config are showing following absolute path and contains : > > as the separator,

Re: [PATCH v2 07/21] tests: Trying fixes test-replication.c on msys2/mingw.

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:46:03PM +0800, Yonggang Luo wrote: > On Windows there is no path like /tmp/s_local_disk.XX > Use g_get_tmp_dir instead of /tmp. > > Signed-off-by: Yonggang Luo > --- > tests/test-replication.c | 18 ++ > 1 file changed, 14 insertions(+), 4

Re: [PATCH v2 03/21] configure: Fixes ncursesw detection under msys2/mingw and enable curses

2020-09-09 Thread Yonggang Luo
On Wed, Sep 9, 2020 at 8:51 PM Daniel P. Berrangé wrote: > On Wed, Sep 09, 2020 at 05:45:59PM +0800, Yonggang Luo wrote: > > The mingw pkg-config are showing following absolute path and contains : > as the separator, > > so we must handling : properly. > > > > -D_XOPEN_SOURCE=600

Re: [PATCH v2 21/21] tests: Fixes test-qdev-global-props.c

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:46:17PM +0800, Yonggang Luo wrote: > On win32 the line ending are \r\n, so we skip the \n in function > test_dynamic_globalprop > > Signed-off-by: Yonggang Luo > --- > tests/test-qdev-global-props.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH v2 14/21] cirrus: Building freebsd in a single short

2020-09-09 Thread Yonggang Luo
freebsd 1 hour limit not hit anymore Signed-off-by: Yonggang Luo --- .cirrus.yml | 35 --- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 49335e68c9..b0004273bb 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,38

[PATCH v2 11/21] meson: disable crypto tests are empty under win32

2020-09-09 Thread Yonggang Luo
Disable following tests on msys2/mingw 'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', tasn1, crypto], 'test-crypto-tlssession': ['crypto-tls-x509-helpers.c', 'pkix_asn1_tab.c', 'crypto-tls-psk-helpers.c',

[PATCH v2 03/21] configure: Fixes ncursesw detection under msys2/mingw and enable curses

2020-09-09 Thread Yonggang Luo
The mingw pkg-config are showing following absolute path and contains : as the separator, so we must handling : properly. -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L -IC:/CI-Tools/msys64/mingw64/include/ncursesw:-I/usr/include/ncursesw: -DNCURSES_WIDECHAR -D_XOPEN_SOURCE=600

Re: [PATCH v2 01/21] block: Fixes nfs compiling error on msys2/mingw

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:45:57PM +0800, Yonggang Luo wrote: > These compiling errors are fixed: > ../block/nfs.c:27:10: fatal error: poll.h: No such file or directory >27 | #include > | ^~~~ > compilation terminated. > > ../block/nfs.c:63:5: error: unknown type name

Re: [PATCH v2 03/21] configure: Fixes ncursesw detection under msys2/mingw and enable curses

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:45:59PM +0800, Yonggang Luo wrote: > The mingw pkg-config are showing following absolute path and contains : as > the separator, > so we must handling : properly. > > -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L >

Re: [PATCH v2] qcow2: Skip copy-on-write when allocating a zero cluster

2020-09-09 Thread Alberto Garcia
ping On Thu 27 Aug 2020 04:53:50 PM CEST, Alberto Garcia wrote: > Since commit c8bb23cbdbe32f5c326365e0a82e1b0e68cdcd8a when a write > request results in a new allocation QEMU first tries to see if the > rest of the cluster outside the written area contains only zeroes. > > In that case, instead

Re: [PATCH] MAINTAINERS: add Stefan Hajnoczi as block/nvme.c maintainer

2020-09-09 Thread Philippe Mathieu-Daudé
Hi Stefan, +Alex On 9/7/20 1:16 PM, Stefan Hajnoczi wrote: > Development of the userspace NVMe block driver picked up again recently. > After talking with Fam I am stepping up as block/nvme.c maintainer. > Patches will be merged through my 'block' tree. > > Cc: Kevin Wolf > Cc: Klaus Jensen >

Re: [PATCH v3 14/21] cirrus: Building freebsd in a single short

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 06:08:42PM +0800, Yonggang Luo wrote: > freebsd 1 hour limit not hit anymore > > I think we going to a wrong direction, I think there is some tests a stall > the test runner, > please look at > https://cirrus-ci.com/task/5110577531977728 > When its running properly, the

Re: [RFC PATCH 00/12] hw: Forbid DMA write accesses to MMIO regions

2020-09-09 Thread Stefan Hajnoczi
On Thu, Sep 03, 2020 at 01:08:19PM +0200, Philippe Mathieu-Daudé wrote: > The main patch is: > "exec/memattrs: Introduce MemTxAttrs::direct_access field". > This way we can restrict accesses to ROM/RAM by setting the > 'direct_access' field. Illegal accesses return MEMTX_BUS_ERROR. QEMU needs to

[PATCH v2 09/21] osdep: These function are only available on Non-Win32 system.

2020-09-09 Thread Yonggang Luo
int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive); int qemu_unlock_fd(int fd, int64_t start, int64_t len); int qemu_lock_fd_test(int fd, int64_t start, int64_t len, bool exclusive); bool qemu_has_ofd_lock(void); Signed-off-by: Yonggang Luo --- include/qemu/osdep.h | 2 +- 1

[PATCH v2 10/21] meson: Use -b to ignore CR vs. CR-LF issues on Windows

2020-09-09 Thread Yonggang Luo
On windows, a difference in line endings causes testsuite failures complaining that every single line in files such as 'tests/qapi-schemadoc-good.texi' is wrong. Fix it by adding -b to diff. Signed-off-by: Yonggang Luo Reviewed-by: Eric Blake --- tests/qapi-schema/meson.build | 2 +- 1 file

[PATCH v2 16/21] rcu: add uninit destructor for rcu

2020-09-09 Thread Yonggang Luo
This is necessary if the pending rcu calls are closing and removing temp files. This also provide a function void rcu_wait_finished(void); to fixes test-logging.c test failure on msys2/mingw. On windows if the file doesn't closed, you can not remove it. Signed-off-by: Yonggang Luo ---

[PATCH v2 13/21] vmstate: Fixes test-vmstate.c on msys2/mingw

2020-09-09 Thread Yonggang Luo
The vmstate are valid on win32, just need generate tmp path properly Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- tests/test-vmstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-vmstate.c

[PATCH v2 04/21] curses: Fixes curses compiling errors.

2020-09-09 Thread Yonggang Luo
This is the compiling error: ../ui/curses.c: In function 'curses_refresh': ../ui/curses.c:256:5: error: 'next_maybe_keycode' may be used uninitialized in this function [-Werror=maybe-uninitialized] 256 | curses2foo(_curses2keycode, _curseskey2keycode, chr, maybe_keycode) |

Re: [PATCH v2 06/21] ci: Enable msys2 ci in cirrus

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:46:02PM +0800, Yonggang Luo wrote: > Install msys2 in a proper way refer to > https://github.com/cirruslabs/cirrus-ci-docs/issues/699 > The https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2 need to be > updated. > There is no need of --cross-prefix, open

Re: [PATCH v2 10/21] meson: Use -b to ignore CR vs. CR-LF issues on Windows

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:46:06PM +0800, Yonggang Luo wrote: > On windows, a difference in line endings causes testsuite failures > complaining that every single line in files such as > 'tests/qapi-schemadoc-good.texi' is wrong. Fix it by adding -b to diff. > > Signed-off-by: Yonggang Luo >

Re: [PATCH v2 12/21] meson: remove empty else and duplicated gio deps

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:46:08PM +0800, Yonggang Luo wrote: > Signed-off-by: Yonggang Luo > --- > meson.build | 6 -- > 1 file changed, 6 deletions(-) Reviewed-by: Daniel P. Berrangé Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |:

Re: [PATCH v2 04/21] curses: Fixes curses compiling errors.

2020-09-09 Thread Peter Maydell
On Wed, 9 Sep 2020 at 10:46, Yonggang Luo wrote: > > This is the compiling error: > ../ui/curses.c: In function 'curses_refresh': > ../ui/curses.c:256:5: error: 'next_maybe_keycode' may be used uninitialized > in this function [-Werror=maybe-uninitialized] > 256 |

Re: [PATCH] MAINTAINERS: add Stefan Hajnoczi as block/nvme.c maintainer

2020-09-09 Thread Stefan Hajnoczi
On Mon, Sep 07, 2020 at 12:16:32PM +0100, Stefan Hajnoczi wrote: > Development of the userspace NVMe block driver picked up again recently. > After talking with Fam I am stepping up as block/nvme.c maintainer. > Patches will be merged through my 'block' tree. > > Cc: Kevin Wolf > Cc: Klaus

[PATCH v2 01/21] block: Fixes nfs compiling error on msys2/mingw

2020-09-09 Thread Yonggang Luo
These compiling errors are fixed: ../block/nfs.c:27:10: fatal error: poll.h: No such file or directory 27 | #include | ^~~~ compilation terminated. ../block/nfs.c:63:5: error: unknown type name 'blkcnt_t' 63 | blkcnt_t st_blocks; | ^~~~ ../block/nfs.c:

[PATCH v2 02/21] ci: fixes msys2 build by upgrading capstone to 4.0.2

2020-09-09 Thread Yonggang Luo
The currently random version capstone have the following compiling issue: CC /c/work/xemu/qemu/build/slirp/src/arp_table.o make[1]: *** No rule to make target “/c/work/xemu/qemu/build/capstone/capstone.lib”。 Stop. Subproject commit 1d230532840a37ac032c6ab80128238fc930c6c1 are the tagged

[PATCH v2 05/21] tests: disable /char/stdio/* tests in test-char.c on win32

2020-09-09 Thread Yonggang Luo
These tests are blocking test-char to be finished. Merge three #ifndef _WIN32 Signed-off-by: Yonggang Luo --- tests/test-char.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test-char.c b/tests/test-char.c index d35cc839bc..ab037647bf 100644 ---

Re: [PATCH v2 05/21] tests: disable /char/stdio/* tests in test-char.c on win32

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:46:01PM +0800, Yonggang Luo wrote: > These tests are blocking test-char to be finished. > Merge three #ifndef _WIN32 > > Signed-off-by: Yonggang Luo > --- > tests/test-char.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Daniel P.

Re: [PATCH v2 04/21] curses: Fixes curses compiling errors.

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:46:00PM +0800, Yonggang Luo wrote: > This is the compiling error: > ../ui/curses.c: In function 'curses_refresh': > ../ui/curses.c:256:5: error: 'next_maybe_keycode' may be used uninitialized > in this function [-Werror=maybe-uninitialized] > 256 |

Re: [PATCH v2 15/21] tests: Convert g_free to g_autofree macro in test-logging.c

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:46:11PM +0800, Yonggang Luo wrote: > g_autofree are prefer than g_free when possible. > > Signed-off-by: Yonggang Luo > Reviewed-by: Philippe Mathieu-Daudé > --- > tests/test-logging.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Daniel P.

Re: [PATCH 1/4] docs: lift block-core.json rST header into parents

2020-09-09 Thread Kevin Wolf
Am 09.09.2020 um 14:10 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 09.09.2020 um 09:38 hat Markus Armbruster geschrieben: > >> Kevin Wolf writes: > >> > >> > Am 08.09.2020 um 14:03 hat Laszlo Ersek geschrieben: > >> >> Hi Stefan, > >> >> > >> >> On 09/08/20 11:31, Stefan

Re: [PATCH v4 1/7] vhost: recheck dev state in the vhost_migration_log routine

2020-09-09 Thread Stefan Hajnoczi
On Fri, Sep 04, 2020 at 12:31:13PM +0300, Dima Stepanov wrote: > vhost-user devices can get a disconnect in the middle of the VHOST-USER > handshake on the migration start. If disconnect event happened right > before sending next VHOST-USER command, then the vhost_dev_set_log() > call in the

[PATCH v2 17/21] tests: Fixes test-io-channel-socket.c tests under msys2/mingw

2020-09-09 Thread Yonggang Luo
Currently test-io-channel-socket doesn't init with qemu_init_main_loop and that's cause the qemu_aio_context not inited, and the following is the stack when null pointer accessed: qemu_fd_register (c:\work\xemu\qemu\util\main-loop.c:336) qemu_try_set_nonblock

[PATCH v2 20/21] tests: fix test-util-sockets.c

2020-09-09 Thread Yonggang Luo
Fixes following errors: Running test test-util-sockets ERROR test-util-sockets - missing test plan # Start of name tests ** ERROR:../tests/test-util-sockets.c:93:test_socket_fd_pass_name_good: assertion failed (fd != -1): (-1 != -1) Bail out!

[PATCH v2 07/21] tests: Trying fixes test-replication.c on msys2/mingw.

2020-09-09 Thread Yonggang Luo
On Windows there is no path like /tmp/s_local_disk.XX Use g_get_tmp_dir instead of /tmp. Signed-off-by: Yonggang Luo --- tests/test-replication.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/test-replication.c b/tests/test-replication.c index

Re: [PULL 0/9] Tracing patches

2020-09-09 Thread Stefan Hajnoczi
On Fri, Aug 21, 2020 at 5:26 PM Peter Maydell wrote: > > On Thu, 13 Aug 2020 at 08:44, Stefan Hajnoczi wrote: > > > > The following changes since commit d0ed6a69d399ae193959225cdeaa9382746c91cc: > > > > Update version for v5.1.0 release (2020-08-11 17:07:03 +0100) > > > > are available in the

Re: [PATCH v2 08/21] tests: test-replication disable /replication/secondary/* on msys2/mingw.

2020-09-09 Thread Daniel P . Berrangé
On Wed, Sep 09, 2020 at 05:46:04PM +0800, Yonggang Luo wrote: > They cause failure on msys2/mingw, that's because file-win32.c not implement > .bdrv_reopen_prepare/commit/abort yet. > > > $ ./tests/test-replication.exe > > # random seed: R02S3f4d1c01af2b0a046990e0235c481faf > > 1..13 > > # Start

Re: [PATCH v3 14/21] cirrus: Building freebsd in a single short

2020-09-09 Thread Philippe Mathieu-Daudé
On 9/9/20 12:08 PM, Yonggang Luo wrote: > freebsd 1 hour limit not hit anymore > > I think we going to a wrong direction, I think there is some tests a stall > the test runner, > please look at > https://cirrus-ci.com/task/5110577531977728 > When its running properly, the consumed time are

[PATCH v2 00/21] W32, W64 msys2/mingw patches

2020-09-09 Thread Yonggang Luo
It first introduce msys2 CI on cirrus by fixes nfs, capstone, curses and disable partial test-char tests. And then fixes all unit tests failure on msys2/mingw Yonggang Luo (21): block: Fixes nfs compiling error on msys2/mingw ci: fixes msys2 build by upgrading capstone to 4.0.2 configure:

[PATCH v2 06/21] ci: Enable msys2 ci in cirrus

2020-09-09 Thread Yonggang Luo
Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 The https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2 need to be updated. There is no need of --cross-prefix, open mingw64.exe instead of msys2.exe then we don't need the --cross-prefix, besides

[PATCH v2 08/21] tests: test-replication disable /replication/secondary/* on msys2/mingw.

2020-09-09 Thread Yonggang Luo
They cause failure on msys2/mingw, that's because file-win32.c not implement .bdrv_reopen_prepare/commit/abort yet. > $ ./tests/test-replication.exe > # random seed: R02S3f4d1c01af2b0a046990e0235c481faf > 1..13 > # Start of replication tests > # Start of primary tests > ok 1

[PATCH v2 12/21] meson: remove empty else and duplicated gio deps

2020-09-09 Thread Yonggang Luo
Signed-off-by: Yonggang Luo --- meson.build | 6 -- 1 file changed, 6 deletions(-) diff --git a/meson.build b/meson.build index 5421eca66a..0b1741557d 100644 --- a/meson.build +++ b/meson.build @@ -317,7 +317,6 @@ opengl = not_found if 'CONFIG_OPENGL' in config_host opengl =

[PATCH v3 14/21] cirrus: Building freebsd in a single short

2020-09-09 Thread Yonggang Luo
freebsd 1 hour limit not hit anymore I think we going to a wrong direction, I think there is some tests a stall the test runner, please look at https://cirrus-ci.com/task/5110577531977728 When its running properly, the consumed time are little, but when tests running too long, look at the cpu

[PATCH] qemu-img: Support bitmap --merge into backing image

2020-09-09 Thread Eric Blake
If you have the chain 'base.qcow2 <- top.qcow2' and want to merge a bitmap from top into base, qemu-img was failing with: qemu-img: Could not open 'top.qcow2': Could not open backing file: Failed to get shared "write" lock Is another process using the image [base.qcow2]? The easiest fix is to

Re: [RFC PATCH 00/12] hw: Forbid DMA write accesses to MMIO regions

2020-09-09 Thread Stefan Hajnoczi
On Wed, Sep 9, 2020 at 2:23 PM Peter Maydell wrote: > On Wed, 9 Sep 2020 at 10:12, Stefan Hajnoczi wrote: > > On Thu, Sep 03, 2020 at 01:08:19PM +0200, Philippe Mathieu-Daudé wrote: > > > The main patch is: > > > "exec/memattrs: Introduce MemTxAttrs::direct_access field". > > > This way we can

[PATCH v6 2/4] util/vfio-helpers: Report error when IOMMU page size is not supported

2020-09-09 Thread Philippe Mathieu-Daudé
This driver uses the host page size to align its memory regions, but this size is not always compatible with the IOMMU. Add a check if the size matches, and bails out with listing the sizes the IOMMU supports. Example on Aarch64: $ qemu-system-aarch64 -M virt -drive

[PATCH v4 00/24] W32, W64 msys2/mingw patches

2020-09-09 Thread Yonggang Luo
It first introduce msys2 CI on cirrus by fixes nfs, capstone, curses and disable partial test-char tests. And then fixes all unit tests failure on msys2/mingw This fixes the reviews suggested in the mailling list Kevin Wolf (1): file-win32: Fix "locking" option Maxim Levitsky (1): rcu:

[PATCH v4 06/24] win32: Simplify gmtime_r detection direct base on _POSIX_THREAD_SAFE_FUNCTIONS.

2020-09-09 Thread Yonggang Luo
First, this reduce the size of configure, configure are tending to removal in future, and this didn't introduce any new feature or remove any exist feature. Second, the current localtime_r detection are conflict with ncursesw detection in mingw, when ncursesw detected, it will provide the

[PATCH v4 24/24] ci: Enable msys2 ci in cirrus

2020-09-09 Thread Yonggang Luo
Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 The https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2 need to be updated. There is no need of --cross-prefix, open mingw64.exe instead of msys2.exe then we don't need the --cross-prefix, besides

Re: [PATCH v2 04/21] curses: Fixes curses compiling errors.

2020-09-09 Thread Yonggang Luo
On Wed, Sep 9, 2020 at 9:26 PM Peter Maydell wrote: > On Wed, 9 Sep 2020 at 10:46, Yonggang Luo wrote: > > > > This is the compiling error: > > ../ui/curses.c: In function 'curses_refresh': > > ../ui/curses.c:256:5: error: 'next_maybe_keycode' may be used > uninitialized in this function

[PATCH v4 16/24] cirrus: Building freebsd in a single short

2020-09-09 Thread Yonggang Luo
This reverts commit 45f7b7b9f38f5c4d1529a37c93dedfc26a231bba ("cirrus.yml: Split FreeBSD job into two parts"). freebsd 1 hour limit not hit anymore I think we going to a wrong direction, I think there is some tests a stall the test runner, please look at

Re: [PATCH v7 00/13] monitor: Optionally run handlers in coroutines

2020-09-09 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200909151149.490589-1-kw...@redhat.com/ Hi, This series failed build test on FreeBSD host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that

Re: [PATCH 1/4] docs: lift block-core.json rST header into parents

2020-09-09 Thread Kevin Wolf
Am 09.09.2020 um 17:28 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 09.09.2020 um 14:10 hat Markus Armbruster geschrieben: > >> Kevin Wolf writes: > >> > >> > Am 09.09.2020 um 09:38 hat Markus Armbruster geschrieben: > >> >> Kevin Wolf writes: > >> >> > >> >> > Am

[PATCH v4 04/24] ci: fixes msys2 build by upgrading capstone to 4.0.2

2020-09-09 Thread Yonggang Luo
The currently random version capstone have the following compiling issue: CC /c/work/xemu/qemu/build/slirp/src/arp_table.o make[1]: *** No rule to make target “/c/work/xemu/qemu/build/capstone/capstone.lib”。 Stop. Subproject commit 1d230532840a37ac032c6ab80128238fc930c6c1 are the tagged

[PATCH v4 05/24] configure: Fixes ncursesw detection under msys2/mingw and enable curses

2020-09-09 Thread Yonggang Luo
The mingw pkg-config are showing following absolute path and contains : as the separator, so we must not use : as path separator. and we know the command line parameter are not likely contains newline, we could use newline as path command line parameter separator -D_XOPEN_SOURCE=600

[PATCH v4 15/24] vmstate: Fixes test-vmstate.c on msys2/mingw

2020-09-09 Thread Yonggang Luo
The vmstate are valid on win32, just need generate tmp path properly Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Daniel P. Berrangé --- tests/test-vmstate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] qcow2: Return the original error code in qcow2_co_pwrite_zeroes()

2020-09-09 Thread Philippe Mathieu-Daudé
On 9/9/20 2:37 PM, Alberto Garcia wrote: > This function checks the current status of a (sub)cluster in order to > see if an unaligned 'write zeroes' request can be done efficiently by > simply updating the L2 metadata and without having to write actual > zeroes to disk. > > If the situation does

[PATCH v4 02/24] rcu: Implement drain_call_rcu

2020-09-09 Thread Yonggang Luo
From: Maxim Levitsky This will allow is to preserve the semantics of hmp_device_del, that the device is deleted immediatly which was changed by previos patch that delayed this to RCU callback Signed-off-by: Maxim Levitsky Suggested-by: Stefan Hajnoczi Reviewed-by: Stefan Hajnoczi ---

[PATCH v6 1/4] util/vfio-helpers: Improve reporting unsupported IOMMU type

2020-09-09 Thread Philippe Mathieu-Daudé
Change the confuse "VFIO IOMMU check failed" error message by the explicit "VFIO IOMMU Type1 is not supported" once. Example on POWER: $ qemu-system-ppc64 -drive if=none,id=nvme0,file=nvme://0001:01:00.0/1,format=raw qemu-system-ppc64: -drive

[PATCH v6 3/4] util/vfio-helpers: Introduce qemu_vfio_pci_init_msix_irqs()

2020-09-09 Thread Philippe Mathieu-Daudé
qemu_vfio_pci_init_irq() allows us to initialize any type of IRQ, but only one. Introduce qemu_vfio_pci_init_msix_irqs() which is specific to MSIX IRQ type, and allow us to use multiple IRQs (thus passing multiple eventfd notifiers). Reviewed-by: Fam Zheng Signed-off-by: Philippe Mathieu-Daudé

[PATCH v6 4/4] block/nvme: Use qemu_vfio_pci_init_msix_irqs() to initialize our IRQ

2020-09-09 Thread Philippe Mathieu-Daudé
Instead of initializing one MSIX IRQ with the generic qemu_vfio_pci_init_irq() function, use the MSIX specific one which will allow us to use multiple IRQs. For now we provide an array of a single IRQ. Reviewed-by: Fam Zheng Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 9 +++--

[PATCH v7 02/13] monitor: Add Monitor parameter to monitor_get_cpu_index()

2020-09-09 Thread Kevin Wolf
Most callers actually don't have to rely on cur_mon, but already know for which monitor they call monitor_get_cpu_index(). Signed-off-by: Kevin Wolf --- include/monitor/monitor.h | 2 +- hw/core/machine-hmp-cmds.c | 2 +- monitor/hmp-cmds.c | 2 +- monitor/misc.c | 20

[PATCH v4 01/24] file-win32: Fix "locking" option

2020-09-09 Thread Yonggang Luo
From: Kevin Wolf The intended behaviour was that locking=off/auto work and have no effect (to remain compatible with file-posix), whereas locking=on would return an error. Unfortunately, the code forgot to remove "locking" from the options QDict, so any attempt to use the option would fail.

[PATCH v4 23/24] rcu: fixes test-logging.c by call drain_call_rcu before rmdir_full

2020-09-09 Thread Yonggang Luo
drain_call_rcu is necessary on win32, because under win32, if you don't close the file before remove it, the remove would be fail. Signed-off-by: Yonggang Luo --- tests/test-logging.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test-logging.c b/tests/test-logging.c index

Re: [PATCH v2 14/21] cirrus: Building freebsd in a single short

2020-09-09 Thread Ed Maste
On Wed, 9 Sep 2020 at 05:47, Yonggang Luo wrote: > > freebsd 1 hour limit not hit anymore > > Signed-off-by: Yonggang Luo Reviewed-by: Ed Maste > When its running properly, the consumed time are little, but when tests > running too long, > look at the cpu usage, the cpu usage are nearly

[PATCH v6 0/4] util/vfio-helpers: Add support for multiple IRQs

2020-09-09 Thread Philippe Mathieu-Daudé
This series intends to setup the VFIO helper to allow binding notifiers on different IRQs. For the NVMe use case, we only care about MSIX interrupts. To not disrupt other users, introduce the qemu_vfio_pci_init_msix_irqs function to initialize multiple MSIX IRQs and attach eventfd to them. Since

[PATCH v7 07/13] monitor: Make current monitor a per-coroutine property

2020-09-09 Thread Kevin Wolf
This way, a monitor command handler will still be able to access the current monitor, but when it yields, all other code code will correctly get NULL from monitor_cur(). This uses a hash table to map the coroutine pointer to the current monitor of that coroutine. Outside of coroutine context, we

[PATCH v7 08/13] qapi: Add a 'coroutine' flag for commands

2020-09-09 Thread Kevin Wolf
This patch adds a new 'coroutine' flag to QMP command definitions that tells the QMP dispatcher that the command handler is safe to be run in a coroutine. The documentation of the new flag pretends that this flag is already used as intended, which it isn't yet after this patch. We'll implement

[PATCH v7 11/13] util/async: Add aio_co_reschedule_self()

2020-09-09 Thread Kevin Wolf
Add a function that can be used to move the currently running coroutine to a different AioContext (and therefore potentially a different thread). Signed-off-by: Kevin Wolf --- include/block/aio.h | 10 ++ util/async.c| 30 ++ 2 files changed, 40

[PATCH v7 06/13] qmp: Call monitor_set_cur() only in qmp_dispatch()

2020-09-09 Thread Kevin Wolf
The correct way to set the current monitor for a coroutine handler will be different than for a blocking handler, so monitor_set_cur() needs to be called in qmp_dispatch(). Signed-off-by: Kevin Wolf --- include/qapi/qmp/dispatch.h | 3 ++- monitor/qmp.c | 8 +---

[PATCH v7 04/13] hmp: Update current monitor only in handle_hmp_command()

2020-09-09 Thread Kevin Wolf
The current monitor is updated relatively early in the command handling code even though only the command handler actually needs it. The current monitor will become coroutine-local later, so we can only update it when we know in which coroutine the command will be exectued. Move it to

[PATCH v7 05/13] qmp: Assert that no other monitor is active

2020-09-09 Thread Kevin Wolf
monitor_qmp_dispatch() is never supposed to be called in the context of another monitor, so assert that monitor_cur() is NULL instead of saving and restoring it. Signed-off-by: Kevin Wolf --- monitor/qmp.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monitor/qmp.c

[PATCH v7 09/13] qmp: Move dispatcher to a coroutine

2020-09-09 Thread Kevin Wolf
This moves the QMP dispatcher to a coroutine and runs all QMP command handlers that declare 'coroutine': true in coroutine context so they can avoid blocking the main loop while doing I/O or waiting for other events. For commands that are not declared safe to run in a coroutine, the dispatcher

[PATCH v7 12/13] block: Add bdrv_co_move_to_aio_context()

2020-09-09 Thread Kevin Wolf
Add a function to move the current coroutine to the AioContext of a given BlockDriverState. Signed-off-by: Kevin Wolf --- include/block/block.h | 6 ++ block.c | 10 ++ 2 files changed, 16 insertions(+) diff --git a/include/block/block.h b/include/block/block.h index

[PATCH v7 13/13] block: Convert 'block_resize' to coroutine

2020-09-09 Thread Kevin Wolf
block_resize performs some I/O that could potentially take quite some time, so use it as an example for the new 'coroutine': true annotation in the QAPI schema. bdrv_truncate() requires that we're already in the right AioContext for the BlockDriverState if called in coroutine context. So instead

[PATCH v5 24/24] ci: Enable msys2 ci in cirrus

2020-09-09 Thread Yonggang Luo
Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 The https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2 need to be updated. There is no need of --cross-prefix, open mingw64.exe instead of msys2.exe then we don't need the --cross-prefix, besides

[PATCH v7 00/13] monitor: Optionally run handlers in coroutines

2020-09-09 Thread Kevin Wolf
Some QMP command handlers can block the main loop for a relatively long time, for example because they perform some I/O. This is quite nasty. Allowing such handlers to run in a coroutine where they can yield (and therefore release the BQL) while waiting for an event such as I/O completion solves

[PATCH v7 01/13] monitor: Add Monitor parameter to monitor_set_cpu()

2020-09-09 Thread Kevin Wolf
Most callers actually don't have to rely on cur_mon, but already know for which monitor they call monitor_set_cpu(). Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- include/monitor/monitor.h | 2 +- monitor/hmp-cmds.c| 2 +- monitor/misc.c| 10 +- 3 files

[PATCH v7 03/13] monitor: Use getter/setter functions for cur_mon

2020-09-09 Thread Kevin Wolf
cur_mon really needs to be coroutine-local as soon as we move monitor command handlers to coroutines and let them yield. As a first step, just remove all direct accesses to cur_mon so that we can implement this in the getter function later. Signed-off-by: Kevin Wolf ---

Re: [PATCH v2 02/21] ci: fixes msys2 build by upgrading capstone to 4.0.2

2020-09-09 Thread Yonggang Luo
On Wed, Sep 9, 2020 at 8:27 PM Daniel P. Berrangé wrote: > On Wed, Sep 09, 2020 at 05:45:58PM +0800, Yonggang Luo wrote: > > The currently random version capstone have the following compiling issue: > > CC /c/work/xemu/qemu/build/slirp/src/arp_table.o > > make[1]: *** No rule to make

Re: [PATCH 1/4] docs: lift block-core.json rST header into parents

2020-09-09 Thread Markus Armbruster
Kevin Wolf writes: > Am 09.09.2020 um 14:10 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Am 09.09.2020 um 09:38 hat Markus Armbruster geschrieben: >> >> Kevin Wolf writes: >> >> >> >> > Am 08.09.2020 um 14:03 hat Laszlo Ersek geschrieben: >> >> >> Hi Stefan, >> >> >> >>

[PATCH v4 20/24] tests: Fixes test-io-channel-file by mask only owner file state mask bits

2020-09-09 Thread Yonggang Luo
This is the error on msys2/mingw Running test test-io-channel-file ** ERROR:../tests/test-io-channel-file.c:59:test_io_channel_file_helper: assertion failed (TEST_MASK & ~mask == st.st_mode & 0777): (384 == 438) ERROR test-io-channel-file - Bail out!

Re: [RFC PATCH v5 2/4] util/vfio-helpers: Report error when IOMMU page size is not supported

2020-09-09 Thread Philippe Mathieu-Daudé
On 9/9/20 10:38 AM, Fam Zheng wrote: > On 2020-09-08 20:03, Philippe Mathieu-Daudé wrote: >> This driver uses the host page size to align its memory regions, >> but this size is not always compatible with the IOMMU. Add a >> check if the size matches, and bails out with listing the sizes >> the

[PATCH v7 10/13] hmp: Add support for coroutine command handlers

2020-09-09 Thread Kevin Wolf
Often, QMP command handlers are not only called to handle QMP commands, but also from a corresponding HMP command handler. In order to give them a consistent environment, optionally run HMP command handlers in a coroutine, too. The implementation is a lot simpler than in QMP because for HMP, we

  1   2   >