Re: [PATCH v3 0/2] ide: Fix incorrect handling of some PRDTs and add the corresponding unit-test

2020-01-22 Thread John Snow
On 12/23/19 12:51 PM, Alexander Popov wrote: > Fuzzing the Linux kernel with syzkaller allowed to find how to crash qemu > using a special SCSI_IOCTL_SEND_COMMAND. It hits the assertion in > ide_dma_cb() introduced in the commit a718978ed58a in July 2015. > > This patch series fixes incorrect

Re: [PATCH] qemu-nbd: Removed deprecated --partition option

2020-01-22 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200122214328.1413664-1-ebl...@redhat.com/ Hi, This series failed the docker-quick@centos7 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

[PATCH] qemu-nbd: Removed deprecated --partition option

2020-01-22 Thread Eric Blake
The option was deprecated in 4.0.0 (commit 0ae2d546); it's now been long enough with no complaints to follow through with that process. Signed-off-by: Eric Blake --- qemu-deprecated.texi | 49 ++-- qemu-nbd.c | 133 +--

Re: [PATCH v3 0/2] ide: Fix incorrect handling of some PRDTs and add the corresponding unit-test

2020-01-22 Thread John Snow
On 1/22/20 7:23 AM, Kevin Wolf wrote: > Am 22.01.2020 um 12:53 hat Alexander Popov geschrieben: >> On 23.12.2019 20:51, Alexander Popov wrote: >>> Fuzzing the Linux kernel with syzkaller allowed to find how to crash qemu >>> using a special SCSI_IOCTL_SEND_COMMAND. It hits the assertion in >>>

Re: [PATCH v2 5/5] iotests: Add test for image creation fallback

2020-01-22 Thread Eric Blake
On 1/22/20 10:45 AM, Max Reitz wrote: Signed-off-by: Max Reitz --- + +_make_test_img 64M + +echo +echo '--- Testing creation ---' + +$QEMU_IMG create -f qcow2 "$TEST_IMG" 64M | _filter_img_create +$QEMU_IMG info "$TEST_IMG" | _filter_img_info + +echo +echo '--- Testing creation for which the

Re: [PATCH 3/3] qemu-block-drivers: Convert to rST

2020-01-22 Thread Alex Bennée
Peter Maydell writes: > The qemu-block-drivers documentation is currently in > docs/qemu-block-drivers.texi in Texinfo format, which we present > to the user as: > * a qemu-block-drivers manpage > * a section of the main qemu-doc HTML documentation > > Convert the documentation to rST

Re: [PATCH 2/3] docs: Create stub system manual

2020-01-22 Thread Alex Bennée
Peter Maydell writes: > On Thu, 16 Jan 2020 at 14:15, Peter Maydell wrote: >> >> We want a user-facing manual which contains system emulation >> documentation. Create an empty one which we can populate. >> >> Signed-off-by: Peter Maydell >> --- >> Makefile | 10 +- >>

Re: [PATCH v2 1/5] block/nbd: Fix hang in .bdrv_close()

2020-01-22 Thread Eric Blake
On 1/22/20 10:45 AM, Max Reitz wrote: When nbd_close() is called from a coroutine, the connection_co never gets to run, and thus nbd_teardown_connection() hangs. This is because aio_co_enter() only puts the connection_co into the main coroutine's wake-up queue, so this main coroutine needs to

[PATCH v2 0/5] block: Generic file creation fallback

2020-01-22 Thread Max Reitz
Hi, As version 1, this series adds a fallback path for creating files (on the protocol layer) if the protocol driver does not support file creation, but the file already exists. Branch: https://github.com/XanClic/qemu.git skip-proto-create-v2 Branch: https://git.xanclic.moe/XanClic/qemu.git

[PATCH v2 5/5] iotests: Add test for image creation fallback

2020-01-22 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/259 | 61 ++ tests/qemu-iotests/259.out | 14 + tests/qemu-iotests/group | 1 + 3 files changed, 76 insertions(+) create mode 100755 tests/qemu-iotests/259 create mode 100644

[PATCH v2 4/5] iscsi: Drop iscsi_co_create_opts()

2020-01-22 Thread Max Reitz
The generic fallback implementation effectively does the same. Reviewed-by: Maxim Levitsky Signed-off-by: Max Reitz --- block/iscsi.c | 56 --- 1 file changed, 56 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index

[PATCH v2 3/5] file-posix: Drop hdev_co_create_opts()

2020-01-22 Thread Max Reitz
The generic fallback implementation effectively does the same. Reviewed-by: Maxim Levitsky Signed-off-by: Max Reitz --- block/file-posix.c | 67 -- 1 file changed, 67 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index

[PATCH v2 2/5] block: Generic file creation fallback

2020-01-22 Thread Max Reitz
If a protocol driver does not support image creation, we can see whether maybe the file exists already. If so, just truncating it will be sufficient. Signed-off-by: Max Reitz --- block.c | 159 +++- 1 file changed, 147 insertions(+), 12

[PATCH v2 1/5] block/nbd: Fix hang in .bdrv_close()

2020-01-22 Thread Max Reitz
When nbd_close() is called from a coroutine, the connection_co never gets to run, and thus nbd_teardown_connection() hangs. This is because aio_co_enter() only puts the connection_co into the main coroutine's wake-up queue, so this main coroutine needs to yield and wait for connection_co to

Re: [PATCH v4 1/4] qapi: Add a 'coroutine' flag for commands

2020-01-22 Thread Kevin Wolf
Am 22.01.2020 um 13:15 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 22.01.2020 um 07:32 hat Markus Armbruster geschrieben: > >> Kevin Wolf writes: > >> > >> > This patch adds a new 'coroutine' flag to QMP command definitions that > >> > tells the QMP dispatcher that the

[PATCH] docs/devel: Fix qtest paths and info about check-block in testing.rst

2020-01-22 Thread Thomas Huth
The qtests have recently been moved to a separate subdirectory, so the paths that are mentioned in the documentation have to be adjusted accordingly. And some of the iotests are now always run as part of "make check", so this information has to be adjusted here, too. Signed-off-by: Thomas Huth

Re: [PATCH 1/3] qemu-nbd: Convert invocation documentation to rST

2020-01-22 Thread Alex Bennée
Peter Maydell writes: > The qemu-nbd documentation is currently in qemu-nbd.texi in Texinfo > format, which we present to the user as: > * a qemu-nbd manpage > * a section of the main qemu-doc HTML documentation > > Convert the documentation to rST format, and present it to the user as: > *

[PATCH 5/7] migration/block-dirty-bitmap: cancel migration on shutdown

2020-01-22 Thread Vladimir Sementsov-Ogievskiy
If target is turned of prior to postcopy finished, we crash because busy bitmaps are found at shutdown. Let's fix it by removing all unfinished bitmaps on shutdown. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/migration.h | 1 + migration/block-dirty-bitmap.c | 44

[PATCH 1/7] migration/block-dirty-bitmap: refactor incoming state to be one struct

2020-01-22 Thread Vladimir Sementsov-Ogievskiy
Move enabled_bitmaps and finish_lock, which are part of incoming state to DirtyBitmapLoadState, and make static global variable to store state instead of static local one. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/block-dirty-bitmap.c | 77 +++--- 1

[PATCH 2/7] migration/block-dirty-bitmap: rename finish_lock to just lock

2020-01-22 Thread Vladimir Sementsov-Ogievskiy
finish_lock is bad name, as lock used not only on process end. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/block-dirty-bitmap.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c index

[PATCH 0/7] Fix crashes on early shutdown during bitmaps postcopy

2020-01-22 Thread Vladimir Sementsov-Ogievskiy
Hi all! Patches 5 and 6 fixes two crashes, triggered by new test case in patch 7. Vladimir Sementsov-Ogievskiy (7): migration/block-dirty-bitmap: refactor incoming state to be one struct migration/block-dirty-bitmap: rename finish_lock to just lock migration/block-dirty-bitmap: simplify

[PATCH 6/7] migration: handle to_src_file on target only for ram postcopy

2020-01-22 Thread Vladimir Sementsov-Ogievskiy
If only bitmaps postcopy migration enabled and not ram, this assertion will fire, as we don't have to_src_file for bitmaps postcopy migration. migrate_postcopy_ram() accesses migrations state, which may be freed in main thread, so, we should ref/unref it in postcopy incoming thread.

[PATCH 3/7] migration/block-dirty-bitmap: simplify dirty_bitmap_load_complete

2020-01-22 Thread Vladimir Sementsov-Ogievskiy
bdrv_enable_dirty_bitmap_locked() call does nothing, as if we are in postcopy, bitmap successor must be enabled, and reclaim operation will enable the bitmap. So, actually we need just call _reclaim_ in both if branches, and making differences only to add an assertion seems not really good. The

[PATCH 4/7] migration/block-dirty-bitmap: keep bitmap state for all bitmaps

2020-01-22 Thread Vladimir Sementsov-Ogievskiy
Keep bitmap state for disabled bitmaps too. Keep the state until the end of the process. It's needed for the following commit to implement bitmap postcopy canceling. Signed-off-by: Vladimir Sementsov-Ogievskiy --- migration/block-dirty-bitmap.c | 59 ++ 1 file

[PATCH 7/7] qemu-iotests/199: add early shutdown case to bitmaps postcopy

2020-01-22 Thread Vladimir Sementsov-Ogievskiy
Previous patches fixed two crashes which may occur on shutdown prior to bitmaps postcopy finished. Check that it works now. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/199 | 12 +++- tests/qemu-iotests/199.out | 4 ++-- 2 files changed, 13 insertions(+), 3

Re: [PATCH v3 0/2] ide: Fix incorrect handling of some PRDTs and add the corresponding unit-test

2020-01-22 Thread Kevin Wolf
Am 22.01.2020 um 12:53 hat Alexander Popov geschrieben: > On 23.12.2019 20:51, Alexander Popov wrote: > > Fuzzing the Linux kernel with syzkaller allowed to find how to crash qemu > > using a special SCSI_IOCTL_SEND_COMMAND. It hits the assertion in > > ide_dma_cb() introduced in the commit

Re: [PATCH v4 1/4] qapi: Add a 'coroutine' flag for commands

2020-01-22 Thread Markus Armbruster
Kevin Wolf writes: > Am 22.01.2020 um 07:32 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > 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. >> >> I'm afraid I

Re: [PATCH v3 0/2] ide: Fix incorrect handling of some PRDTs and add the corresponding unit-test

2020-01-22 Thread Alexander Popov
On 23.12.2019 20:51, Alexander Popov wrote: > Fuzzing the Linux kernel with syzkaller allowed to find how to crash qemu > using a special SCSI_IOCTL_SEND_COMMAND. It hits the assertion in > ide_dma_cb() introduced in the commit a718978ed58a in July 2015. > > This patch series fixes incorrect

Re: [PATCH v4 1/4] qapi: Add a 'coroutine' flag for commands

2020-01-22 Thread Kevin Wolf
Am 22.01.2020 um 07:32 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > 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. > > I'm afraid I missed this question in my