Re: [PATCH 02/14] block: use return status of bdrv_append()

2020-09-10 Thread Greg Kurz
On Wed, 9 Sep 2020 21:59:18 +0300 Vladimir Sementsov-Ogievskiy wrote: > Now bdrv_append returns status and we can drop all the local_err things > around it. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- Reviewed-by: Greg Kurz Just one suggestion for a follow-up below... > block.c

Re: [PATCH 29/29] iotests: Test block-export-* QMP interface

2020-09-10 Thread Max Reitz
On 07.09.20 20:20, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/iotests.py | 11 +++- > tests/qemu-iotests/307| 117 ++ > tests/qemu-iotests/307.out| 111 > tests/qemu-iotests/group |

Re: [PATCH 07/14] block/blklogwrites: drop error propagation

2020-09-10 Thread Greg Kurz
On Wed, 9 Sep 2020 21:59:23 +0300 Vladimir Sementsov-Ogievskiy wrote: > It's simple to avoid error propagation in blk_log_writes_open(), we > just need to refactor blk_log_writes_find_cur_log_sector() a bit. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/blklogwrites.c | 23

Re: [PATCH 05/14] block: drop extra error propagation for bdrv_set_backing_hd

2020-09-10 Thread Greg Kurz
On Wed, 9 Sep 2020 21:59:21 +0300 Vladimir Sementsov-Ogievskiy wrote: > bdrv_set_backing_hd now returns status, let's use it. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- Reviewed-by: Greg Kurz > block.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff

Re: [PATCH] qemu-img: avoid unaligned read requests during convert

2020-09-10 Thread Max Reitz
On 01.09.20 14:51, Peter Lieven wrote: > in case of large continous areas that share the same allocation status > it happens that the value of s->sector_next_status is unaligned to the > cluster size or even request alignment of the source. Avoid this by > stripping down the s->sector_next_status

Re: [PATCH 01/14] block: return status from bdrv_append and friends

2020-09-10 Thread Greg Kurz
On Wed, 9 Sep 2020 21:59:17 +0300 Vladimir Sementsov-Ogievskiy wrote: > The recommended use of qemu error api assumes returning status together > with setting errp and avoid void functions with errp parameter. Let's > improve bdrv_append and some friends to reduce error-propagation > overhead

Re: [PATCH 06/14] block/mirror: drop extra error propagation in commit_active_start()

2020-09-10 Thread Greg Kurz
On Wed, 9 Sep 2020 21:59:22 +0300 Vladimir Sementsov-Ogievskiy wrote: > Let's check return value of mirror_start_job to check for failure > instead of local_err. > > Rename ret to job, as ret is usually integer variable. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- Reviewed-by:

Re: [PATCH v7 17/25] cirrus: Building freebsd in a single short

2020-09-10 Thread Yonggang Luo
On Thu, Sep 10, 2020 at 10:18 PM Thomas Huth wrote: > On 10/09/2020 12.37, Yonggang Luo wrote: > > 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

Re: [PATCH] qemu-img: avoid unaligned read requests during convert

2020-09-10 Thread Peter Lieven
> Am 10.09.2020 um 18:58 schrieb Max Reitz : > > On 01.09.20 14:51, Peter Lieven wrote: >> in case of large continous areas that share the same allocation status >> it happens that the value of s->sector_next_status is unaligned to the >> cluster size or even request alignment of the source.

Incremental Backup GUI or Automation Scripts?

2020-09-10 Thread Derek Jarvis
I read about the Incremental Backup feature here: https://wiki.qemu.org/Features/IncrementalBackup Some of this seems a bit "proof of concept" that requires more implementation. Is there an UI available for this, either command prompt or GUI, to simplify this process? My use case is I want

Re: [PATCH 04/14] blockdev: fix drive_backup_prepare() missed error

2020-09-10 Thread Greg Kurz
On Wed, 9 Sep 2020 21:59:20 +0300 Vladimir Sementsov-Ogievskiy wrote: > We leak local_err and don't report failure to the caller. It's > definitely wrong, let's fix. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- Reviewed-by: Greg Kurz > blockdev.c | 3 +-- > 1 file changed, 1

[PATCH v3 2/2] qcow2: Skip copy-on-write when allocating a zero cluster

2020-09-10 Thread Alberto Garcia
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 of doing a normal copy-on-write operation and writing explicit zero

[PATCH v3 1/2] qcow2: Report BDRV_BLOCK_ZERO more accurately in bdrv_co_block_status()

2020-09-10 Thread Alberto Garcia
If a BlockDriverState supports backing files but has none then any unallocated area reads back as zeroes. bdrv_co_block_status() is only reporting this is if want_zero is true, but this is an inexpensive test and there is no reason not to do it in all cases. Suggested-by: Vladimir

Re: [PATCH 27/29] nbd: Deprecate nbd-server-add/remove

2020-09-10 Thread Max Reitz
On 07.09.20 20:20, Kevin Wolf wrote: > These QMP commands are replaced by block-export-add/del. > > Signed-off-by: Kevin Wolf > --- > qapi/block-export.json | 11 +-- > docs/system/deprecated.rst | 8 > 2 files changed, 17 insertions(+), 2 deletions(-) OK, but: > diff

Re: [PATCH 03/14] block: check return value of bdrv_open_child and drop error propagation

2020-09-10 Thread Greg Kurz
On Wed, 9 Sep 2020 21:59:19 +0300 Vladimir Sementsov-Ogievskiy wrote: > This patch is generated by cocci script: > > @@ > symbol bdrv_open_child, errp, local_err; > expression file; > @@ > > file = bdrv_open_child(..., > -_err > +errp >

Re: [PATCH 28/29] iotests: Factor out qemu_tool_pipe_and_status()

2020-09-10 Thread Max Reitz
On 07.09.20 20:20, Kevin Wolf wrote: > We have three almost identical functions that call an external process > and return its output and return code. Refactor them into small wrappers > around a common function. > > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/iotests.py | 50

[PATCH v3 0/2] Skip copy-on-write when allocating a zero cluster

2020-09-10 Thread Alberto Garcia
Here's the new version, there are two patches this time. Berto v3: - Add a new patch to improve the reporting of BDRV_BLOCK_ZERO [Vladimir] - Rename function to bdrv_co_is_zero_fast() [Vladimir, Kevin] - Don't call bdrv_common_block_status_above() if bytes == 0 v2:

Re: [PATCH v7 17/25] cirrus: Building freebsd in a single short

2020-09-10 Thread Daniel P . Berrangé
On Thu, Sep 10, 2020 at 04:18:10PM +0200, Thomas Huth wrote: > On 10/09/2020 12.37, Yonggang Luo wrote: > > This reverts commit 45f7b7b9f38f5c4d1529a37c93dedfc26a231bba > > ("cirrus.yml: Split FreeBSD job into two parts"). > > > > freebsd 1 hour limit not hit anymore > > > > I think we going to

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

2020-09-10 Thread Alex Williamson
On Thu, 10 Sep 2020 17:29:25 +0200 Philippe Mathieu-Daudé wrote: > Hi Stefan, Alex. > > On 9/10/20 12:44 PM, Stefan Hajnoczi wrote: > > On Wed, Sep 09, 2020 at 04:23:53PM +0200, Philippe Mathieu-Daudé wrote: > >> +/** > >> + * Initialize device MSIX IRQs and register event notifiers. > >> +

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

2020-09-10 Thread Philippe Mathieu-Daudé
On 9/10/20 6:29 PM, Alex Williamson wrote: > On Thu, 10 Sep 2020 17:29:25 +0200 > Philippe Mathieu-Daudé wrote: > >> Hi Stefan, Alex. >> >> On 9/10/20 12:44 PM, Stefan Hajnoczi wrote: >>> On Wed, Sep 09, 2020 at 04:23:53PM +0200, Philippe Mathieu-Daudé wrote: +/** + * Initialize

Re: [PATCH v2] block/vhdx: Support vhdx image only with 512 bytes logical sector size

2020-09-10 Thread Max Reitz
On 07.08.20 12:03, Swapnil Ingle wrote: > block/vhdx uses qemu block layer where sector size is always 512 bytes. > This may have issues with 4K logical sector sized vhdx image. > > For e.g qemu-img convert on such images fails with following assert: > > $qemu-img convert -f vhdx -O raw

Re: [PATCH v7 03/25] block: Fixes nfs compiling error on msys2/mingw

2020-09-10 Thread Yonggang Luo
On Fri, Sep 11, 2020 at 4:16 AM Peter Lieven wrote: > > > Am 10.09.2020 um 12:30 schrieb 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. > >

Re: [PATCH 07/14] block/blklogwrites: drop error propagation

2020-09-10 Thread Ari Sundholm
Hi Vladimir! Thank you for working on this. My comments below. On 9/9/20 9:59 PM, Vladimir Sementsov-Ogievskiy wrote: It's simple to avoid error propagation in blk_log_writes_open(), we just need to refactor blk_log_writes_find_cur_log_sector() a bit. Signed-off-by: Vladimir

Re: [PATCH v7 03/25] block: Fixes nfs compiling error on msys2/mingw

2020-09-10 Thread Peter Lieven
> Am 10.09.2020 um 12:30 schrieb 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' >

Re: [PATCH 07/14] block/blklogwrites: drop error propagation

2020-09-10 Thread Markus Armbruster
Greg Kurz writes: > On Wed, 9 Sep 2020 21:59:23 +0300 > Vladimir Sementsov-Ogievskiy wrote: > >> It's simple to avoid error propagation in blk_log_writes_open(), we >> just need to refactor blk_log_writes_find_cur_log_sector() a bit. >> >> Signed-off-by: Vladimir Sementsov-Ogievskiy >> ---

Re: [PATCH 07/14] block/blklogwrites: drop error propagation

2020-09-10 Thread Markus Armbruster
Markus Armbruster writes: > Greg Kurz writes: > >> On Wed, 9 Sep 2020 21:59:23 +0300 >> Vladimir Sementsov-Ogievskiy wrote: >> >>> It's simple to avoid error propagation in blk_log_writes_open(), we >>> just need to refactor blk_log_writes_find_cur_log_sector() a bit. >>> >>> Signed-off-by:

[PATCH v7 03/25] block: Fixes nfs compiling error on msys2/mingw

2020-09-10 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 v7 02/25] rcu: Implement drain_call_rcu

2020-09-10 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 v7 16/25] vmstate: Fixes test-vmstate.c on msys2/mingw

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

[PATCH v7 14/25] tests: Enable crypto tests under msys2/mingw

2020-09-10 Thread Yonggang Luo
Fixes 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',

Re: [PATCH v4 2/4] block/nbd: define new max_write_zero_fast limit

2020-09-10 Thread Vladimir Sementsov-Ogievskiy
23.07.2020 23:32, Eric Blake wrote: On 6/11/20 11:26 AM, Vladimir Sementsov-Ogievskiy wrote: The NBD spec was recently updated to clarify that max_block doesn't relate to NBD_CMD_WRITE_ZEROES with NBD_CMD_FLAG_FAST_ZERO (which mirrors Qemu flag BDRV_REQ_NO_FALLBACK). bs->bl.max_write_zero_fast

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

2020-09-10 Thread Kevin Wolf
Am 09.09.2020 um 21:23 hat Vladimir Sementsov-Ogievskiy geschrieben: > 27.08.2020 17:53, 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

[PATCH v7 04/25] ci: fixes msys2 build by upgrading capstone to 4.0.2

2020-09-10 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 v7 01/25] file-win32: Fix "locking" option

2020-09-10 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 v7 00/25] W32, W64 msys2/mingw patches

2020-09-10 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:

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

2020-09-10 Thread Stefan Hajnoczi
On Wed, Sep 09, 2020 at 04:23:53PM +0200, Philippe Mathieu-Daudé wrote: > +/** > + * Initialize device MSIX IRQs and register event notifiers. > + * @irq_count: pointer to number of MSIX IRQs to initialize > + * @notifier: Array of @irq_count notifiers (each corresponding to a MSIX > IRQ) > + > +

[PATCH v7 19/25] tests: Fixes test-io-channel-socket.c tests under msys2/mingw

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

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

2020-09-10 Thread Stefan Hajnoczi
On Wed, Sep 09, 2020 at 04:23:51PM +0200, Philippe Mathieu-Daudé wrote: > 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 >

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

2020-09-10 Thread Stefan Hajnoczi
On Wed, Sep 09, 2020 at 04:23:54PM +0200, Philippe Mathieu-Daudé wrote: > 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. > >

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

2020-09-10 Thread Stefan Hajnoczi
On Wed, Sep 09, 2020 at 04:23:52PM +0200, 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 IOMMU supports. > >

Re: [PATCH 09/29] nbd: Add writethrough to block-export-add

2020-09-10 Thread Max Reitz
On 07.09.20 20:19, Kevin Wolf wrote: > qemu-nbd allows use of writethrough cache modes, which mean that write > requests made through NBD will cause a flush before they complete. > Expose the same functionality in block-export-add. > > Signed-off-by: Kevin Wolf > --- > qapi/block-export.json |

Re: [PULL v2] Block layer patches

2020-09-10 Thread Max Reitz
On 10.09.20 11:13, Kevin Wolf wrote: > Am 10.09.2020 um 00:09 hat Eric Blake geschrieben: >> On 9/9/20 4:55 PM, Peter Maydell wrote: >> >>> >>> This fails 'make check' on NetBSD and OpenBSD: >>> >>> ./check: line 47: realpath: command not found >>> ./check: line 60: /common.env: No such file or

[PATCH v7 06/25] win32: Simplify gmtime_r detection direct base on _POSIX_THREAD_SAFE_FUNCTIONS.

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

2020-09-10 Thread Yonggang Luo
These tests are blocking test-char to be finished. Disable them by using variable is_win32, so we doesn't need macro to open it. and easy recover those function latter. Signed-off-by: Yonggang Luo --- tests/test-char.c | 26 -- 1 file changed, 16 insertions(+), 10

[PATCH v7 13/25] gcrypt: test_tls_psk_init should write binary file instead text file.

2020-09-10 Thread Yonggang Luo
On windows, if open file with "w", it's will automatically convert "\n" to "\r\n" when writing to file. Convert unlink to use g_remove. Signed-off-by: Yonggang Luo --- tests/crypto-tls-psk-helpers.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH v7 11/25] osdep: file locking functions are not available on Win32

2020-09-10 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 Reviewed-by: Daniel P. Berrangé ---

[PATCH v7 15/25] meson: remove empty else and duplicated gio deps

2020-09-10 Thread Yonggang Luo
Signed-off-by: Yonggang Luo Reviewed-by: Daniel P. Berrangé --- 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

[PATCH v7 20/25] tests: fixes aio-win32 about aio_remove_fd_handler, get it consistence with aio-posix.c

2020-09-10 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 v7 23/25] tests: Fixes test-qdev-global-props.c

2020-09-10 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 Reviewed-by: Daniel P. Berrangé --- tests/test-qdev-global-props.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test-qdev-global-props.c

[PATCH v7 22/25] tests: fix test-util-sockets.c

2020-09-10 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 v7 21/25] tests: Fixes test-io-channel-file by mask only owner file state mask bits

2020-09-10 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 v7 18/25] tests: Convert g_free to g_autofree macro in test-logging.c

2020-09-10 Thread Yonggang Luo
g_autofree are prefer than g_free when possible. Signed-off-by: Yonggang Luo Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- 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

[PATCH v7 17/25] cirrus: Building freebsd in a single short

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

[PATCH v7 25/25] ci: Enable msys2 ci in cirrus

2020-09-10 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 04/29] block/export: Add BlockExport infrastructure and block-export-add

2020-09-10 Thread Max Reitz
On 07.09.20 20:19, Kevin Wolf wrote: > We want to have a common set of commands for all types of block exports. > Currently, this is only NBD, but we're going to add more types. > > This patch adds the basic BlockExport and BlockExportDriver structs and > a QMP command block-export-add that

[PATCH v7 07/25] curses: Fixes curses compiling errors.

2020-09-10 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 v7 05/25] configure: Fixes ncursesw detection under msys2/mingw and enable curses

2020-09-10 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 v7 09/25] tests: Fixes test-replication.c on msys2/mingw.

2020-09-10 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 Reviewed-by: Daniel P. Berrangé --- tests/test-replication.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/test-replication.c

[PATCH v7 10/25] tests: test-replication disable /replication/secondary/* on msys2/mingw.

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

[PATCH v7 12/25] meson: Use -b to ignore CR vs. CR-LF issues on Windows

2020-09-10 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 Reviewed-by: Daniel P. Berrangé ---

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

2020-09-10 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 07/29] block/export: Remove magic from block-export-add

2020-09-10 Thread Max Reitz
On 07.09.20 20:19, Kevin Wolf wrote: > nbd-server-add tries to be convenient and adds two questionable > features that we don't want to share in block-export-add, even for NBD > exports: > > 1. When requesting a writable export of a read-only device, the export >is silently downgraded to

Re: [PATCH v7 15/25] meson: remove empty else and duplicated gio deps

2020-09-10 Thread Thomas Huth
On 10/09/2020 12.30, Yonggang Luo wrote: > Signed-off-by: Yonggang Luo > Reviewed-by: Daniel P. Berrangé > --- > 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 >

Re: [PATCH 14/29] block/export: Move AioContext from NBDExport to BlockExport

2020-09-10 Thread Max Reitz
On 07.09.20 20:19, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > include/block/export.h | 3 +++ > block/export/export.c | 2 ++ > nbd/server.c | 26 +- > 3 files changed, 18 insertions(+), 13 deletions(-) Reviewed-by: Max Reitz signature.asc

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

2020-09-10 Thread Yonggang Luo
On Thu, Sep 10, 2020 at 3:01 PM Peter Lieven wrote: > > > > Am 09.09.2020 um 11:45 schrieb Yonggang Luo : > > > > These compiling errors are fixed: > > ../block/nfs.c:27:10: fatal error: poll.h: No such file or directory > > 27 | #include > > | ^~~~ > > compilation

Re: [PATCH v6 25/25] meson: guard the minimal meson version to 0.55.1

2020-09-10 Thread Daniel P . Berrangé
On Thu, Sep 10, 2020 at 02:42:37AM +0800, Yonggang Luo wrote: > So we can removal usage of unstable-keyval > > Signed-off-by: Yonggang Luo > --- > meson.build | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(-) This prevents the use on Fedora which has 0.55.0 only. This is not

Re: [PATCH 0/4] hw/sd/sdhci: Strengthen multiple DMA transfers

2020-09-10 Thread Philippe Mathieu-Daudé
On 9/3/20 7:28 PM, Philippe Mathieu-Daudé wrote: > Still trying to fix the bugs reported by Aleksander... > > - Do not send 0 block count > - Reduce DMA to MMIO re-entrancy by yielding when pending IRQ > > Based-on: <20200901140411.112150-1-f4...@amsat.org> > > Philippe Mathieu-Daudé (4): >

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

2020-09-10 Thread Peter Lieven
> Am 10.09.2020 um 09:14 schrieb 罗勇刚(Yonggang Luo) : > > > > On Thu, Sep 10, 2020 at 3:01 PM Peter Lieven wrote: > > > > Am 09.09.2020 um 11:45 schrieb Yonggang Luo : > > > > These compiling errors are fixed: > > ../block/nfs.c:27:10: fatal error: poll.h: No such file or directory > >

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

2020-09-10 Thread Yonggang Luo
On Thu, Sep 10, 2020 at 3:29 PM Peter Lieven wrote: > > > > Am 10.09.2020 um 09:14 schrieb 罗勇刚(Yonggang Luo) >: > > > > > > > > On Thu, Sep 10, 2020 at 3:01 PM Peter Lieven wrote: > > > > > > > Am 09.09.2020 um 11:45 schrieb Yonggang Luo : > > > > > > These compiling errors are fixed: > > >

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

2020-09-10 Thread Kevin Wolf
Am 10.09.2020 um 07:18 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > 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: > [...] > >> >> > There are

[PULL v3] Block layer patches

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

2020-09-10 Thread Peter Lieven
> Am 09.09.2020 um 11:45 schrieb 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' >

Re: [PULL v2] Block layer patches

2020-09-10 Thread Kevin Wolf
Am 10.09.2020 um 00:09 hat Eric Blake geschrieben: > On 9/9/20 4:55 PM, Peter Maydell wrote: > > > > > This fails 'make check' on NetBSD and OpenBSD: > > > > ./check: line 47: realpath: command not found > > ./check: line 60: /common.env: No such file or directory > > check: failed to source

Re: [PATCH 0/4] hw/sd/sdhci: Strengthen multiple DMA transfers

2020-09-10 Thread Alexander Bulekov
I fuzzed the SDHCI with this applied. There are still bugs in SDHCI, but this fixes the ones triggered by my initial bug-reproducers, and doesn't appear to create any new bugs. In the interest of incrementally fixing the issues, for this series: Tested-by: Alexander Bulekov On 200903 1928,

Re: [PATCH v2 0/3] hw/sd/sdhci: Fix DMA Transfer Block Size field width

2020-09-10 Thread Alexander Bulekov
For this series: Tested-by: Alexander Bulekov On 200901 1604, Philippe Mathieu-Daudé wrote: > Fix the SDHCI issue reported last week by Alexander: > https://bugs.launchpad.net/qemu/+bug/1892960 > > The field is 12-bit (4KiB) but the guest can set > up to 16-bit (64KiB), leading to OOB access.

Re: [PATCH 23/29] block/export: Create BlockBackend in blk_exp_add()

2020-09-10 Thread Max Reitz
On 07.09.20 20:20, Kevin Wolf wrote: > Every export type will need a BlockBackend, so creating it centrally in > blk_exp_add() instead of the .create driver callback avoids duplication. > > Signed-off-by: Kevin Wolf > --- > include/block/nbd.h | 4 ++-- > block/export/export.c | 49

Re: [PATCH 24/29] block/export: Add query-block-exports

2020-09-10 Thread Max Reitz
On 07.09.20 20:20, Kevin Wolf wrote: > This adds a simple QMP command to query the list of block exports. > > Signed-off-by: Kevin Wolf > --- > qapi/block-export.json | 32 > block/export/export.c | 23 +++ > 2 files changed, 55

Re: [PATCH 21/29] block/export: Add BLOCK_EXPORT_DELETED event

2020-09-10 Thread Max Reitz
On 07.09.20 20:20, Kevin Wolf wrote: > Clients may want to know when an export has finally disappeard > (block-export-del returns earlier than that in the general case), so add > a QAPI event for it. > > Signed-off-by: Kevin Wolf > --- > qapi/block-export.json | 12 >

Re: [PATCH 25/29] block/export: Move writable to BlockExportOptions

2020-09-10 Thread Max Reitz
On 07.09.20 20:20, Kevin Wolf wrote: > The 'writable' option is a basic option that will probably be applicable > to most if not all export types that we will implement. Move it from NBD > to the generic BlockExport layer. > > Signed-off-by: Kevin Wolf > --- > qapi/block-export.json | 15

[PATCH v4 2/9] qapi: Restrict LostTickPolicy enum to machine code

2020-09-10 Thread Philippe Mathieu-Daudé
Acked-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daudé --- qapi/machine.json| 32 qapi/misc.json | 32 include/hw/rtc/mc146818rtc.h | 2 +- hw/core/qdev-properties.c| 1 +

[PATCH v4 0/9] user-mode: Prune build dependencies (part 2)

2020-09-10 Thread Philippe Mathieu-Daudé
This is the second part of a series reducing user-mode dependencies. By stripping out unused code, the build and testing time is reduced (as is space used by objects). Part 2: - Extract code not related to user-mode from qapi/misc.json Since v3: - Rebased (Meson) - Addressed Markus comments: -

[PATCH v4 4/9] qapi: Restrict balloon-related commands to machine code

2020-09-10 Thread Philippe Mathieu-Daudé
Only qemu-system-FOO and qemu-storage-daemon provide QMP monitors, therefore such declarations and definitions are irrelevant for user-mode emulation. Restricting the balloon-related commands to machine.json allows pulling less declarations/definitions to user-mode. Reviewed-by: David

[PATCH v4 5/9] qapi: Restrict query-vm-generation-id command to machine code

2020-09-10 Thread Philippe Mathieu-Daudé
Only qemu-system-FOO and qemu-storage-daemon provide QMP monitors, therefore such declarations and definitions are irrelevant for user-mode emulation. Restricting the query-vm-generation-id command to machine.json allows pulling less declarations/definitions to user-mode. Acked-by: Igor Mammedov

[PATCH v4 9/9] qapi: Extract PCI commands to 'pci.json'

2020-09-10 Thread Philippe Mathieu-Daudé
Only qemu-system-FOO and qemu-storage-daemon provide QMP monitors, therefore such declarations and definitions are irrelevant for user-mode emulation. Extracting the PCI commands to their own schema reduces the size of the qapi-misc* headers generated, and allows pulling less

[PATCH v4 3/9] qapi: Correct balloon documentation

2020-09-10 Thread Philippe Mathieu-Daudé
The documentation incorrectly uses the "size of the balloon" description when it should be "logical size of the VM". Fix it. The relation between both values is: logical_vm_size = vm_ram_size - balloon_size Reported-by: David Hildenbrand Suggested-by: David Hildenbrand Reviewed-by: David

[PATCH v4 1/9] target/i386: Restrict X86CPUFeatureWord to X86 targets

2020-09-10 Thread Philippe Mathieu-Daudé
Move out x86-specific structures from generic machine code. Since x86_cpu_initfn() register various CPU properties that should not be available in user-mode (tsc/stepping/kvm/...), add a stub to satisfy the linker. Since only qemu-system-FOO and qemu-storage-daemon provide QMP monitors, assert

[PATCH v4 6/9] qapi: Restrict query-uuid command to machine code

2020-09-10 Thread Philippe Mathieu-Daudé
Only qemu-system-FOO and qemu-storage-daemon provide QMP monitors, therefore such declarations and definitions are irrelevant for user-mode emulation. Restricting the query-uuid command to machine.json allows pulling less declarations/definitions to user-mode. Acked-by: Markus Armbruster

[PATCH v4 7/9] qapi: Restrict device memory commands to machine code

2020-09-10 Thread Philippe Mathieu-Daudé
Only qemu-system-FOO and qemu-storage-daemon provide QMP monitors, therefore such declarations and definitions are irrelevant for user-mode emulation. Restricting the memory commands to machine.json allows pulling less declarations/definitions to user-mode. Acked-by: Igor Mammedov

[PATCH v4 8/9] qapi: Extract ACPI commands to 'acpi.json'

2020-09-10 Thread Philippe Mathieu-Daudé
Only qemu-system-FOO and qemu-storage-daemon provide QMP monitors, therefore such declarations and definitions are irrelevant for user-mode emulation. Extracting the ACPI commands to their own schema reduces the size of the qapi-misc* headers generated, and allows pulling less

Re: [PATCH v4 0/9] user-mode: Prune build dependencies (part 2)

2020-09-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200910152225.524322-1-phi...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

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

2020-09-10 Thread Philippe Mathieu-Daudé
Hi Stefan, Alex. On 9/10/20 12:44 PM, Stefan Hajnoczi wrote: > On Wed, Sep 09, 2020 at 04:23:53PM +0200, Philippe Mathieu-Daudé wrote: >> +/** >> + * Initialize device MSIX IRQs and register event notifiers. >> + * @irq_count: pointer to number of MSIX IRQs to initialize >> + * @notifier: Array

Re: [PATCH 26/29] nbd: Merge nbd_export_new() and nbd_export_create()

2020-09-10 Thread Max Reitz
On 07.09.20 20:20, Kevin Wolf wrote: > There is no real reason any more why nbd_export_new() and > nbd_export_create() should be separate functions. The latter only > performs a few checks before it calls the former. Move all the checks to > nbd/server.c and make the resulting function static. >

Re: [PATCH v7 17/25] cirrus: Building freebsd in a single short

2020-09-10 Thread Thomas Huth
On 10/09/2020 12.37, Yonggang Luo wrote: > 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,

Re: [PATCH v2] block/vhdx: Support vhdx image only with 512 bytes logical sector size

2020-09-10 Thread Swapnil Ingle
Ping On 14.08.20, 11:10, "Swapnil Ingle" wrote: Ping On 07.08.20, 12:03, "Swapnil Ingle" wrote: block/vhdx uses qemu block layer where sector size is always 512 bytes. This may have issues with 4K logical sector sized vhdx image. For e.g qemu-img convert on

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

2020-09-10 Thread Stefan Hajnoczi
v2: * Drop block-core.json h2 header removal, add an h1 header to storage-daemon/qapi/qapi-schema.json instead [Kevin] * Add Examples section to man page [Kevin] Add documentation for the qemu-storage-daemon program and its QMP commands. The man page looks like this: QEMU-STORAGE-DAEMON(1)

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

2020-09-10 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 v2 3/3] MAINTAINERS: add Kevin Wolf as storage daemon maintainer

2020-09-10 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 7d0a5e91e4..eb80b6c548 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2099,6

[PATCH v2 1/3] docs: generate qemu-storage-daemon-qmp-ref(7) man page

2020-09-10 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. Add an h1 heading in

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

2020-09-10 Thread Kevin Wolf
Am 09.09.2020 um 14:37 hat Alberto Garcia geschrieben: > 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

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

2020-09-10 Thread Kevin Wolf
Am 08.09.2020 um 16:08 hat Alberto Garcia geschrieben: > 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 >

  1   2   >