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

2020-09-08 Thread Gerd Hoffmann
On Wed, Sep 09, 2020 at 03:48:07AM +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 04/16] curses: Fixes curses compiling errors.

2020-09-08 Thread Gerd Hoffmann
On Wed, Sep 09, 2020 at 03:48:08AM +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 v4 7/7] tests/qtest/vhost-user-test: enable the reconnect tests

2020-09-08 Thread Raphael Norwitz
This works for me, and looks good, but I figure those who added the check should confirm that these tests are reliable now. Marc-Andre - thoughts? On Fri, Sep 4, 2020 at 5:36 AM Dima Stepanov wrote: > > For now a QTEST_VHOST_USER_FIXME environment variable is used to > separate reconnect tests

Re: [PATCH v4 6/7] tests/qtest/vhost-user-test: add migrate_reconnect test

2020-09-08 Thread Raphael Norwitz
On Fri, Sep 4, 2020 at 5:36 AM Dima Stepanov wrote: > > Add new migrate_reconnect test for the vhost-user-blk device. Perform a > disconnect after sending response for the VHOST_USER_SET_LOG_BASE > command. > > Signed-off-by: Dima Stepanov Reviewed-by: Raphael Norwitz > --- >

Re: [PATCH v4 5/7] tests/qtest/vhost-user-test: add support for the vhost-user-blk device

2020-09-08 Thread Raphael Norwitz
On Fri, Sep 4, 2020 at 5:35 AM Dima Stepanov wrote: > > Add vhost_user_ops structure for the vhost-user-blk device class. Add > the test_reconnect and test_migrate tests for this device. > > Signed-off-by: Dima Stepanov Reviewed-by: Raphael Norwitz Just one small suggestion. > --- >

Re: [PATCH v4 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk

2020-09-08 Thread Raphael Norwitz
On Fri, Sep 4, 2020 at 5:34 AM Dima Stepanov wrote: > > Add support for the vhost-user-blk-pci device. This node can be used by > the vhost-user-blk tests. Tests for the vhost-user-blk device are added > in the following patches. > > Signed-off-by: Dima Stepanov > --- >

Re: [PATCH v4 3/7] tests/qtest/vhost-user-test: prepare the tests for adding new dev class

2020-09-08 Thread Raphael Norwitz
On Fri, Sep 4, 2020 at 5:32 AM Dima Stepanov wrote: > > For now only vhost-user-net device is supported by the test. Other > vhost-user devices are not tested. As a first step make source code > refactoring so new devices can reuse the same test routines. To make > this provide a new

Re: [PATCH v4 2/7] vhost: check queue state in the vhost_dev_set_log routine

2020-09-08 Thread Raphael Norwitz
On Fri, Sep 4, 2020 at 5:32 AM Dima Stepanov wrote: > > If the vhost-user-blk daemon provides only one virtqueue, but device was > added with several queues, then QEMU will send more VHOST-USER command > than expected by daemon side. The vhost_virtqueue_start() routine > handles such case by

Re: [PULL 04/16] curses: Fixes curses compiling errors.

2020-09-08 Thread Yonggang Luo
On Wed, Sep 9, 2020 at 4:29 AM Peter Maydell wrote: > On Tue, 8 Sep 2020 at 19:56, 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

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

2020-09-08 Thread Yonggang Luo
On Wed, Sep 9, 2020 at 4:36 AM Peter Maydell wrote: > On Tue, 8 Sep 2020 at 20:50, 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 >

Re: [PATCH 00/16] W32, W64 patches

2020-09-08 Thread Yonggang Luo
On Wed, Sep 9, 2020 at 4:42 AM Eric Blake wrote: > On 9/8/20 2:48 PM, Yonggang Luo wrote: > > It first introduce msys2 CI on cirrus by fixes nfs, capstone, curses and > > disable partial test-char tests. > > And then fixes a number of unit tests failure on msys2/mingw > > Please remember to

Re: [PATCH 00/16] W32, W64 patches

2020-09-08 Thread Eric Blake
On 9/8/20 2:48 PM, Yonggang Luo wrote: It first introduce msys2 CI on cirrus by fixes nfs, capstone, curses and disable partial test-char tests. And then fixes a number of unit tests failure on msys2/mingw Please remember to include a version number (v2, v3, ...) if this is an improved

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

2020-09-08 Thread Peter Maydell
On Tue, 8 Sep 2020 at 20:50, 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. > > Subproject

Re: [PULL 04/16] curses: Fixes curses compiling errors.

2020-09-08 Thread Peter Maydell
On Tue, 8 Sep 2020 at 19:56, 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 |

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

2020-09-08 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 15/16] logging: Fixes memory leak in test-logging.c

2020-09-08 Thread Yonggang Luo
g_dir_make_tmp Returns the actual name used. This string should be freed with g_free() when not needed any longer and is is in the GLib file name encoding. In case of errors, NULL is returned and error will be set. Use g_autofree to free it properly Signed-off-by: Yonggang Luo Reviewed-by:

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

2020-09-08 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é --- tests/test-vmstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index

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

2020-09-08 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 16/16] rcu: add uninit destructor for rcu

2020-09-08 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 10/16] meson: Use -b to ignore CR vs. CR-LF issues on Windows

2020-09-08 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 09/16] osdep: These function are only available on Non-Win32 system.

2020-09-08 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 11/16] meson: disable crypto tests are empty under win32

2020-09-08 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 08/16] block: get file-win32.c handle locking option consistence with file-posix.c

2020-09-08 Thread Yonggang Luo
Signed-off-by: Yonggang Luo --- block/file-win32.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/block/file-win32.c b/block/file-win32.c index ab69bd811a..14e5f5c3b5 100644 --- a/block/file-win32.c +++ b/block/file-win32.c @@ -299,6 +299,11 @@

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

2020-09-08 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

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

2020-09-08 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 05/16] tests: disable /char/stdio/* tests in test-char.c on win32

2020-09-08 Thread Yonggang Luo
These tests are blocking test-char to be finished. Signed-off-by: Yonggang Luo --- tests/test-char.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/test-char.c b/tests/test-char.c index d35cc839bc..80e5bac61a 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -103,6 +103,7

[PATCH 04/16] curses: Fixes curses compiling errors.

2020-09-08 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) |

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

2020-09-08 Thread Yonggang Luo
On Windows there is no path like /tmp/s_local_disk.XX Signed-off-by: Yonggang Luo --- tests/test-replication.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/test-replication.c b/tests/test-replication.c index 9ab3666a90..cfc1ae6feb 100644 ---

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

2020-09-08 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 01/16] block: Fixes nfs compiling error on msys2/mingw

2020-09-08 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 00/16] W32, W64 patches

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

Re: [PULL 00/16] Msys2 patches patches

2020-09-08 Thread Philippe Mathieu-Daudé
On 9/8/20 8:56 PM, Eric Blake wrote: > On 9/8/20 1:49 PM, Yonggang Luo wrote: >> The following changes since commit >> 6779038537360e957dbded830f76b08ef5070161: >> >>    Merge remote-tracking branch >> 'remotes/armbru/tags/pull-qapi-2020-09-08' int= >> o staging (2020-09-08 17:23:31 +0100) >> >>

Re: [PULL 02/16] ci: fixes msys2 build by upgrading capstone to 4.0.2

2020-09-08 Thread Philippe Mathieu-Daudé
On 9/8/20 8:59 PM, Eric Blake wrote: > On 9/8/20 1:49 PM, Yonggang Luo wrote: >> Signed-off-by: Yonggang Luo >> --- >>   capstone  | 2 +- >>   configure | 2 +- >>   2 files changed, 2 insertions(+), 2 deletions(-) > > The commit message is sparse; it might be nice to give more details > about

Re: [PULL 03/16] configure: Fixes ncursesw detection under msys2/mingw and enable curses

2020-09-08 Thread Eric Blake
On 9/8/20 1:49 PM, 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 -IC:/CI-Tools/msys64/mingw64/include/ncursesw:-I/usr/include/ncursesw:

Re: [PULL 02/16] ci: fixes msys2 build by upgrading capstone to 4.0.2

2020-09-08 Thread Eric Blake
On 9/8/20 1:49 PM, Yonggang Luo wrote: Signed-off-by: Yonggang Luo --- capstone | 2 +- configure | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) The commit message is sparse; it might be nice to give more details about what error is fixed, or possibly even mention of the fact

[PULL 16/16] rcu: add uninit destructor for rcu

2020-09-08 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 ---

[PULL 15/16] logging: Fixes memory leak in test-logging.c

2020-09-08 Thread Yonggang Luo
g_dir_make_tmp Returns the actual name used. This string should be freed with g_free() when not needed any longer and is is in the GLib file name encoding. In case of errors, NULL is returned and error will be set. Use g_autofree to free it properly Signed-off-by: Yonggang Luo Reviewed-by:

[PULL 11/16] meson: disable crypto tests are empty under win32

2020-09-08 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',

[PULL 09/16] osdep: These function are only available on Non-Win32 system.

2020-09-08 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

[PULL 05/16] tests: disable /char/stdio/* tests in test-char.c on win32

2020-09-08 Thread Yonggang Luo
These tests are blocking test-char to be finished. Signed-off-by: Yonggang Luo --- tests/test-char.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/test-char.c b/tests/test-char.c index d35cc839bc..80e5bac61a 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -103,6 +103,7

Re: [PULL 01/16] block: Fixes nfs on msys2/mingw

2020-09-08 Thread Eric Blake
On 9/8/20 1:49 PM, Yonggang Luo wrote: Signed-off-by: Yonggang Luo --- block/nfs.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) The commit message is too sparse. You say that nfs is broken, but fail to give any details how, or why this patch improves

[PULL 13/16] vmstate: Fixes test-vmstate.c on msys2/mingw

2020-09-08 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é --- tests/test-vmstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index

Re: [PULL 00/16] Msys2 patches patches

2020-09-08 Thread Eric Blake
On 9/8/20 1:49 PM, Yonggang Luo wrote: The following changes since commit 6779038537360e957dbded830f76b08ef5070161: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-09-08' int= o staging (2020-09-08 17:23:31 +0100) are available in the Git repository at:

[PULL 04/16] curses: Fixes curses compiling errors.

2020-09-08 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) |

[PULL 12/16] meson: remove empty else and duplicated gio deps

2020-09-08 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 =

[PULL 10/16] meson: Use -b to ignore CR vs. CR-LF issues on Windows

2020-09-08 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

[PULL 07/16] tests: Trying fixes test-replication.c on msys2/mingw.

2020-09-08 Thread Yonggang Luo
On Windows there is no path like /tmp/s_local_disk.XX Signed-off-by: Yonggang Luo --- tests/test-replication.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/test-replication.c b/tests/test-replication.c index 9ab3666a90..cfc1ae6feb 100644 ---

[PULL 14/16] cirrus: Building freebsd in a single short

2020-09-08 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

[PULL 08/16] block: get file-win32.c handle locking option consistence with file-posix.c

2020-09-08 Thread Yonggang Luo
Signed-off-by: Yonggang Luo --- block/file-win32.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/block/file-win32.c b/block/file-win32.c index ab69bd811a..14e5f5c3b5 100644 --- a/block/file-win32.c +++ b/block/file-win32.c @@ -299,6 +299,11 @@

[PULL 06/16] ci: Enable msys2 ci in cirrus

2020-09-08 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

[PULL 03/16] configure: Fixes ncursesw detection under msys2/mingw and enable curses

2020-09-08 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

[PULL 00/16] Msys2 patches patches

2020-09-08 Thread Yonggang Luo
The following changes since commit 6779038537360e957dbded830f76b08ef5070161: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-09-08' int= o staging (2020-09-08 17:23:31 +0100) are available in the Git repository at: http://github.com/lygstate/qemu

[PULL 01/16] block: Fixes nfs on msys2/mingw

2020-09-08 Thread Yonggang Luo
Signed-off-by: Yonggang Luo --- block/nfs.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index 61a249a9fc..34b2cd5708 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -24,7 +24,9 @@ #include "qemu/osdep.h" +#if

[PULL 02/16] ci: fixes msys2 build by upgrading capstone to 4.0.2

2020-09-08 Thread Yonggang Luo
Signed-off-by: Yonggang Luo --- capstone | 2 +- configure | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/capstone b/capstone index 22ead3e0bf..1d23053284 16 --- a/capstone +++ b/capstone @@ -1 +1 @@ -Subproject commit 22ead3e0bfdb87516656453336160e0a37b066bf

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

2020-09-08 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 ill allow us to use multiple IRQs. For now we provide an array of a single IRQ. Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 9 +++-- 1 file changed, 7

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

2020-09-08 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

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

2020-09-08 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

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

2020-09-08 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

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

2020-09-08 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). Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH 17/17] hw/block/nvme: change controller pci id

2020-09-08 Thread Keith Busch
On Mon, Sep 07, 2020 at 01:02:16PM +0200, Klaus Jensen wrote: > On Sep 7 11:52, Dr. David Alan Gilbert wrote: > > > It may be best to turn it into a constant in include/hw/pci/pci_ids.h if > > it corresponds to some real Intel device. > > > > Yes, but that is just the thing - it does not

Re: [PATCH] block/qcow2-cluster: Add missing "fallthrough" annotation

2020-09-08 Thread Kevin Wolf
Am 08.09.2020 um 09:00 hat Thomas Huth geschrieben: > When compiling with -Werror=implicit-fallthrough, the compiler currently > complains: > > ../../devel/qemu/block/qcow2-cluster.c: In function ‘cluster_needs_new_alloc’: > ../../devel/qemu/block/qcow2-cluster.c:1320:12: error: this statement

Re: [PATCH 3/4] docs: add qemu-storage-daemon(1) man page

2020-09-08 Thread Kevin Wolf
Am 08.09.2020 um 13:42 hat Kashyap Chamarthy geschrieben: > On Tue, Sep 08, 2020 at 10:31:12AM +0100, Stefan Hajnoczi wrote: > > Document the qemu-storage-daemon tool. Most of the command-line options > > are identical to their QEMU counterparts. Perhaps Sphinx hxtool > > integration could be

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

2020-09-08 Thread Kevin Wolf
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 has no way of > > knowing what header level (h1, h2, ...) is appropriate. Sphinx reports > > errors when it encounters an h2

[PATCH 0/2] Fix error handling in preallocate_co()

2020-09-08 Thread Alberto Garcia
This is a follow-up to "Fix removal of list members from BDRVQcow2State.cluster_allocs": https://lists.gnu.org/archive/html/qemu-block/2020-09/msg00247.html However the patches themselves are independent and can be applied separately. Regards, Berto Alberto Garcia (2): qcow2: Handle

[PATCH 2/2] qcow2: Make qcow2_free_any_clusters() free only one cluster

2020-09-08 Thread Alberto Garcia
This function takes an L2 entry and a number of clusters to free. Although in principle it can free any type of cluster (using the L2 entry to determine its type) in practice the API is broken because compressed clusters have a variable size and there is no way to free more than one without having

[PATCH 1/2] qcow2: Handle QCowL2Meta on error in preallocate_co()

2020-09-08 Thread Alberto Garcia
If qcow2_alloc_cluster_offset() or qcow2_alloc_cluster_link_l2() fail then this function simply returns the error code, potentially leaking the QCowL2Meta structure and leaving stale items in s->cluster_allocs. A second problem is that this function calls qcow2_free_any_clusters() on failure but

Re: [PATCH v2 6/7] qemu: Block disk hotplug when transient disk option is enabled

2020-09-08 Thread Peter Krempa
On Fri, Aug 28, 2020 at 10:08:36 -0400, Masayoshi Mizuma wrote: > From: Masayoshi Mizuma > > Block disk hotplug when transient disk option is enabled so far. > > Signed-off-by: Masayoshi Mizuma > --- > src/qemu/qemu_hotplug.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git

Re: [PATCH v2 5/7] qemu: Block migration when transient disk option is enabled

2020-09-08 Thread Peter Krempa
On Fri, Aug 28, 2020 at 10:08:35 -0400, Masayoshi Mizuma wrote: > From: Masayoshi Mizuma > > Block migration when transient disk option is enabled because migration > requires some blockjobs. > > Signed-off-by: Masayoshi Mizuma > --- > src/qemu/qemu_migration.c | 22 ++ >

Re: [PATCH v2 7/7] qemu: Block blockjobs when transient disk option is enabled

2020-09-08 Thread Peter Krempa
On Fri, Aug 28, 2020 at 10:08:34 -0400, Masayoshi Mizuma wrote: > From: Masayoshi Mizuma > > Block blockjobs when transient disk option is enabled so far. > > Signed-off-by: Masayoshi Mizuma > --- > src/qemu/qemu_domain.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git

Re: [PATCH v2 4/7] qemu: Transient option gets avaiable for qcow2 and raw format disk

2020-09-08 Thread Peter Krempa
On Fri, Aug 28, 2020 at 10:08:33 -0400, Masayoshi Mizuma wrote: > From: Masayoshi Mizuma > > Signed-off-by: Masayoshi Mizuma > --- > src/qemu/qemu_validate.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c >

Re: [PATCH v2 1/7] qemuSnapshotDiskPrepareOne: Get available even if snapdisk is NULL

2020-09-08 Thread Peter Krempa
On Fri, Aug 28, 2020 at 10:08:30 -0400, Masayoshi Mizuma wrote: > From: Masayoshi Mizuma > > Get available even if snapdisk argument is NULL at > qemuSnapshotDiskPrepareOne() > so that the caller can setup dd->src. > > Signed-off-by: Masayoshi Mizuma > --- > src/qemu/qemu_snapshot.c | 5

Re: [PATCH v2 2/7] qemu: Introduce functions to handle transient disk

2020-09-08 Thread Peter Krempa
On Fri, Aug 28, 2020 at 10:08:31 -0400, Masayoshi Mizuma wrote: > From: Masayoshi Mizuma > > Here is the implementation of transient option for qcow2 and raw format > disk. This gets available directive in domain xml file > like as: > > > > > > > > > When

Re: [PATCH 00/29] block/export: Add infrastructure and QAPI for block exports

2020-09-08 Thread Kevin Wolf
Am 08.09.2020 um 10:38 hat Markus Armbruster geschrieben: > Doesn't apply for me. Got something I could pull? Once my pull request goes through, it should apply cleanly on master. Until then, apply it on top of: https://repo.or.cz/qemu/kevin.git block (It is also currently storage-daemon~2

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

2020-09-08 Thread Laszlo Ersek
Hi Stefan, On 09/08/20 11:31, Stefan Hajnoczi wrote: > block-core.json is included from several places. It has no way of > knowing what header level (h1, h2, ...) is appropriate. Sphinx reports > errors when it encounters an h2 header where it expects an h1 header. > This issue prevents the next

[PULL v2] Block layer patches

2020-09-08 Thread Kevin Wolf
The following changes since commit 7c37270b3fbe3d034ba80e488761461676e21eb4: Merge remote-tracking branch 'remotes/kraxel/tags/ui-20200904-pull-request' into staging (2020-09-06 16:23:55 +0100) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for

Re: [PATCH 3/4] docs: add qemu-storage-daemon(1) man page

2020-09-08 Thread Kashyap Chamarthy
On Tue, Sep 08, 2020 at 10:31:12AM +0100, Stefan Hajnoczi wrote: > Document the qemu-storage-daemon tool. Most of the command-line options > are identical to their QEMU counterparts. Perhaps Sphinx hxtool > integration could be extended to extract documentation for individual > command-line

[PATCH 3/4] docs: add qemu-storage-daemon(1) man page

2020-09-08 Thread Stefan Hajnoczi
Document the qemu-storage-daemon tool. Most of the command-line options are identical to their QEMU counterparts. Perhaps Sphinx hxtool integration could be extended to extract documentation for individual command-line options so they can be shared. For now the qemu-storage-daemon simply refers to

[PATCH 4/4] MAINTAINERS: add Kevin Wolf as storage daemon maintainer

2020-09-08 Thread Stefan Hajnoczi
The MAINTAINERS file was not updated when the storage daemon was merged. Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index b233da2a73..3e8bfde1e3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2099,6

[PATCH 2/4] docs: generate qemu-storage-daemon-qmp-ref(7) man page

2020-09-08 Thread Stefan Hajnoczi
Although qemu-storage-daemon QMP commands are identical to QEMU QMP commands they are a subset. Generate a manual page of just the commands supported by qemu-storage-daemon so that users know exactly what is available in qemu-storage-daemon. Signed-off-by: Stefan Hajnoczi ---

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

2020-09-08 Thread Stefan Hajnoczi
block-core.json is included from several places. It has no way of knowing what header level (h1, h2, ...) is appropriate. Sphinx reports errors when it encounters an h2 header where it expects an h1 header. This issue prevents the next patch from generating documentation for qemu-storage-daemon

Re: [PATCH] block/qcow2-cluster: Add missing "fallthrough" annotation

2020-09-08 Thread Thomas Huth
On 08/09/2020 10.43, Philippe Mathieu-Daudé wrote: > Hi Thomas, > > On 9/8/20 9:00 AM, Thomas Huth wrote: >> When compiling with -Werror=implicit-fallthrough, the compiler currently >> complains: > > Do you know what is missing to add this in configure::warn_flags? Quite a bit, I think. I'm

[PATCH 0/4] docs: add qemu-storage-daemon documentation

2020-09-08 Thread Stefan Hajnoczi
Add documentation for the qemu-storage-daemon program and its QMP commands. The man page looks like this: QEMU-STORAGE-DAEMON(1) QEMUQEMU-STORAGE-DAEMON(1) NAME qemu-storage-daemon - QEMU storage daemon SYNOPSIS qemu-storage-daemon [options] DESCRIPTION

Re: [PULL 00/64] Block layer patches

2020-09-08 Thread Max Reitz
On 08.09.20 09:01, Kevin Wolf wrote: > Am 07.09.2020 um 22:22 hat Peter Maydell geschrieben: >> On Mon, 7 Sep 2020 at 12:09, Kevin Wolf wrote: >>> >>> The following changes since commit 7c37270b3fbe3d034ba80e488761461676e21eb4: >>> >>> Merge remote-tracking branch >>>

Re: [PATCH v4 1/5] block: add bitmap-populate job

2020-09-08 Thread Markus Armbruster
Eric Blake writes: > From: John Snow > > This job copies the allocation map into a bitmap. It's a job because > there's no guarantee that allocation interrogation will be quick (or > won't hang), so it cannot be retrofitted into block-dirty-bitmap-merge. > > It was designed with different

Re: [PATCH] block/qcow2-cluster: Add missing "fallthrough" annotation

2020-09-08 Thread Philippe Mathieu-Daudé
Hi Thomas, On 9/8/20 9:00 AM, Thomas Huth wrote: > When compiling with -Werror=implicit-fallthrough, the compiler currently > complains: Do you know what is missing to add this in configure::warn_flags? > > ../../devel/qemu/block/qcow2-cluster.c: In function ‘cluster_needs_new_alloc’: >

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

2020-09-08 Thread Fam Zheng
On 2020-09-07 12:16, 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 > Cc: Fam Zheng >

Re: [PATCH 00/29] block/export: Add infrastructure and QAPI for block exports

2020-09-08 Thread Markus Armbruster
Doesn't apply for me. Got something I could pull?

Re: [PULL 00/64] Block layer patches

2020-09-08 Thread Kevin Wolf
Am 07.09.2020 um 22:22 hat Peter Maydell geschrieben: > On Mon, 7 Sep 2020 at 12:09, Kevin Wolf wrote: > > > > The following changes since commit 7c37270b3fbe3d034ba80e488761461676e21eb4: > > > > Merge remote-tracking branch > > 'remotes/kraxel/tags/ui-20200904-pull-request' into staging

[PATCH] block/qcow2-cluster: Add missing "fallthrough" annotation

2020-09-08 Thread Thomas Huth
When compiling with -Werror=implicit-fallthrough, the compiler currently complains: ../../devel/qemu/block/qcow2-cluster.c: In function ‘cluster_needs_new_alloc’: ../../devel/qemu/block/qcow2-cluster.c:1320:12: error: this statement may fall through [-Werror=implicit-fallthrough=] if