Re: [Qemu-block] [Qemu-devel] [PATCH v11 0/9] hw/m68k: add Apple Machintosh Quadra 800 machine

2019-09-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190910193347.16000-1-laur...@vivier.eu/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v11 0/9] hw/m68k: add Apple Machintosh Quadra 800 machine Message-id:

Re: [Qemu-block] [Qemu-devel] [PATCH v11 0/9] hw/m68k: add Apple Machintosh Quadra 800 machine

2019-09-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190910193347.16000-1-laur...@vivier.eu/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v11 0/9] hw/m68k: add Apple Machintosh Quadra 800 machine Message-id:

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/7] block/curl: Fix hang and potential crash

2019-09-10 Thread John Snow
On 9/10/19 8:41 AM, Max Reitz wrote: > Hi, > > As reported in https://bugzilla.redhat.com/show_bug.cgi?id=1740193, our > curl block driver can spontaneously hang. This becomes visible e.g. > when reading compressed qcow2 images: > > $ qemu-img convert -p -O raw -n \ >

Re: [Qemu-block] [PATCH v2 3/7] curl: Check completion in curl_multi_do()

2019-09-10 Thread John Snow
On 9/10/19 12:11 PM, Maxim Levitsky wrote: > On Tue, 2019-09-10 at 14:41 +0200, Max Reitz wrote: >> While it is more likely that transfers complete after some file >> descriptor has data ready to read, we probably should not rely on it. >> Better be safe than sorry and call

Re: [Qemu-block] [Qemu-devel] [PATCH v11 0/9] hw/m68k: add Apple Machintosh Quadra 800 machine

2019-09-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190910193347.16000-1-laur...@vivier.eu/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v11 0/9] hw/m68k: add Apple Machintosh Quadra 800 machine Message-id:

Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/7] curl: Keep *socket until the end of curl_sock_cb()

2019-09-10 Thread John Snow
On 9/10/19 8:41 AM, Max Reitz wrote: > This does not really change anything, but it makes the code a bit easier > to follow once we use @socket as the opaque pointer for > aio_set_fd_handler(). > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Max Reitz Reviewed-by: John Snow

Re: [Qemu-block] [Qemu-devel] [PATCH 0/3] proper locking on bitmap add/remove paths

2019-09-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190910162724.79574-1-vsement...@virtuozzo.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

[Qemu-block] [PATCH v11 6/9] hw/m68k: add Nubus support

2019-09-10 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed-by: Thomas Huth --- MAINTAINERS | 2 + hw/Kconfig | 1 + hw/Makefile.objs| 1 + hw/m68k/Kconfig

[Qemu-block] [PATCH v11 0/9] hw/m68k: add Apple Machintosh Quadra 800 machine

2019-09-10 Thread Laurent Vivier
I'm rebasing some of these patches for seven years now, too many years... if you want to test the machine, I'm sorry, it doesn't boot a MacROM, but you can boot a linux kernel from the command line. You can install your own disk using debian-installer, with: ... -M q800 \ -serial

[Qemu-block] [PATCH v11 7/9] hw/m68k: add Nubus support for macfb video card

2019-09-10 Thread Laurent Vivier
From: Mark Cave-Ayland Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed-by: Hervé Poussineau --- hw/display/Kconfig | 1 + hw/display/macfb.c | 56 ++ include/hw/display/macfb.h | 21

[Qemu-block] [PATCH v11 8/9] hw/m68k: add a dummy SWIM floppy controller

2019-09-10 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed-by: Hervé Poussineau --- MAINTAINERS | 2 + hw/block/Kconfig| 3 + hw/block/Makefile.objs | 1 + hw/block/swim.c | 487

[Qemu-block] [PATCH v11 3/9] hw/m68k: add via support

2019-09-10 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed-by: Hervé Poussineau --- MAINTAINERS | 6 + default-configs/m68k-softmmu.mak | 1 + hw/m68k/Kconfig | 4 + hw/misc/Kconfig |

[Qemu-block] [PATCH v11 9/9] hw/m68k: define Macintosh Quadra 800

2019-09-10 Thread Laurent Vivier
If you want to test the machine, it doesn't yet boot a MacROM, but you can boot a linux kernel from the command line. You can install your own disk using debian-installer with: ./qemu-system-m68k \ -M q800 \ -serial none -serial mon:stdio \ -m 1000M -drive

[Qemu-block] [PATCH v11 5/9] hw/m68k: add macfb video card

2019-09-10 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed-by: Hervé Poussineau Reviewed-by: Thomas Huth --- MAINTAINERS| 2 + arch_init.c| 4 + hw/display/Kconfig | 4 + hw/display/Makefile.objs |

[Qemu-block] [PATCH v11 4/9] hw/m68k: implement ADB bus support for via

2019-09-10 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed-by: Hervé Poussineau Reviewed-by: Thomas Huth --- hw/misc/Kconfig | 1 + hw/misc/mac_via.c | 198 +- include/hw/misc/mac_via.h |

[Qemu-block] [PATCH v11 1/9] esp: add pseudo-DMA as used by Macintosh

2019-09-10 Thread Laurent Vivier
There is no DMA in Quadra 800, so the CPU reads/writes the data from the PDMA register (offset 0x100, ESP_PDMA in hw/m68k/q800.c) and copies them to/from the memory. There is a nice assembly loop in the kernel to do that, see linux/drivers/scsi/mac_esp.c:MAC_ESP_PDMA_LOOP(). The start of the

[Qemu-block] [PATCH v11 2/9] dp8393x: manage big endian bus

2019-09-10 Thread Laurent Vivier
This is needed by Quadra 800, this card can run on little-endian or big-endian bus. Signed-off-by: Laurent Vivier Tested-by: Hervé Poussineau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Hervé Poussineau --- hw/net/dp8393x.c | 88 +++- 1 file

Re: [Qemu-block] [PATCH 0/7] Move qtests to a separate folder

2019-09-10 Thread Eric Blake
On 9/10/19 1:58 PM, Thomas Huth wrote: > Our "tests" directory is very overcrowded - we store the qtests, > unit test and other files there. That makes it difficult to > determine which file belongs to each test subsystem, and the > wildcards in the MAINTAINERS file are inaccurate, too. > > Let's

[Qemu-block] [PATCH 0/3] proper locking on bitmap add/remove paths

2019-09-10 Thread Vladimir Sementsov-Ogievskiy
We need to lock qcow2 mutex on accessing in-image metadata, especially on updating this metadata. Let's implement it. Vladimir Sementsov-Ogievskiy (3): block: move bdrv_can_store_new_dirty_bitmap to block/dirty-bitmap.c block/dirty-bitmap: return int from

[Qemu-block] [PATCH 3/3] block/qcow2: proper locking on bitmap add/remove paths

2019-09-10 Thread Vladimir Sementsov-Ogievskiy
qmp_block_dirty_bitmap_add and do_block_dirty_bitmap_remove do acquire aio context since 0a6c86d024c52b. But this is not enough: we also must lock qcow2 mutex when access in-image metadata. Especially it concerns freeing qcow2 clusters. To achieve this, move qcow2_can_store_new_dirty_bitmap and

[Qemu-block] [PATCH 2/3] block/dirty-bitmap: return int from bdrv_remove_persistent_dirty_bitmap

2019-09-10 Thread Vladimir Sementsov-Ogievskiy
It's more comfortable to not deal with local_err. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.h| 5 ++--- include/block/block_int.h| 6 +++--- include/block/dirty-bitmap.h | 5 ++--- block/dirty-bitmap.c | 9 + block/qcow2-bitmap.c

[Qemu-block] [PATCH 1/3] block: move bdrv_can_store_new_dirty_bitmap to block/dirty-bitmap.c

2019-09-10 Thread Vladimir Sementsov-Ogievskiy
block/dirty-bitmap.c seems to be more appropriate for it and bdrv_remove_persistent_dirty_bitmap already in it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 22 -- block/dirty-bitmap.c | 22 ++ 2 files changed, 22 insertions(+),

Re: [Qemu-block] [PATCH v2 5/7] curl: Report only ready sockets

2019-09-10 Thread Maxim Levitsky
On Tue, 2019-09-10 at 14:41 +0200, Max Reitz wrote: > Instead of reporting all sockets to cURL, only report the one that has > caused curl_multi_do_locked() to be called. This lets us get rid of the > QLIST_FOREACH_SAFE() list, which was actually wrong: SAFE foreaches are > only safe when the

Re: [Qemu-block] [PATCH v2 7/7] curl: Check curl_multi_add_handle()'s return code

2019-09-10 Thread Maxim Levitsky
On Tue, 2019-09-10 at 14:41 +0200, Max Reitz wrote: > If we had done that all along, debugging would have been much simpler. > (Also, I/O errors are better than hangs.) > > Signed-off-by: Max Reitz > --- > block/curl.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff

Re: [Qemu-block] [PATCH v2 4/7] curl: Pass CURLSocket to curl_multi_do()

2019-09-10 Thread Maxim Levitsky
On Tue, 2019-09-10 at 14:41 +0200, Max Reitz wrote: > curl_multi_do_locked() currently marks all sockets as ready. That is > not only inefficient, but in fact unsafe (the loop is). A follow-up > patch will change that, but to do so, curl_multi_do_locked() needs to > know exactly which socket is

Re: [Qemu-block] [PATCH v2 6/7] curl: Handle success in multi_check_completion

2019-09-10 Thread Maxim Levitsky
On Tue, 2019-09-10 at 14:41 +0200, Max Reitz wrote: > Background: As of cURL 7.59.0, it verifies that several functions are > not called from within a callback. Among these functions is > curl_multi_add_handle(). > > curl_read_cb() is a callback from cURL and not a coroutine. Waking up >

Re: [Qemu-block] [PATCH v2 3/7] curl: Check completion in curl_multi_do()

2019-09-10 Thread Maxim Levitsky
On Tue, 2019-09-10 at 14:41 +0200, Max Reitz wrote: > While it is more likely that transfers complete after some file > descriptor has data ready to read, we probably should not rely on it. > Better be safe than sorry and call curl_multi_check_completion() in > curl_multi_do(), too, just like it

Re: [Qemu-block] [PATCH v2 2/7] curl: Keep *socket until the end of curl_sock_cb()

2019-09-10 Thread Maxim Levitsky
On Tue, 2019-09-10 at 14:41 +0200, Max Reitz wrote: > This does not really change anything, but it makes the code a bit easier > to follow once we use @socket as the opaque pointer for > aio_set_fd_handler(). > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Max Reitz > --- > block/curl.c | 10

Re: [Qemu-block] [PATCH v2 1/7] curl: Keep pointer to the CURLState in CURLSocket

2019-09-10 Thread Maxim Levitsky
On Tue, 2019-09-10 at 14:41 +0200, Max Reitz wrote: > A follow-up patch will make curl_multi_do() and curl_multi_read() take a > CURLSocket instead of the CURLState. They still need the latter, > though, so add a pointer to it to the former. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Max

[Qemu-block] [PATCH V2 1/2] block/nfs: tear down aio before nfs_close

2019-09-10 Thread Peter Lieven
nfs_close is a sync call from libnfs and has its own event handler polling on the nfs FD. Avoid that both QEMU and libnfs are intefering here. CC: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven --- block/nfs.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[Qemu-block] [PATCH V2 0/2] add support for nfs_umount

2019-09-10 Thread Peter Lieven
add support for NFSv3 umount call. V2 adds a patch that fixes the order of the aio teardown. The addition of the NFS umount call unmasked that bug. Peter Lieven (2): block/nfs: tear down aio before nfs_close block/nfs: add support for nfs_umount block/nfs.c | 9 +++-- 1 file changed, 7

[Qemu-block] [PATCH V2 2/2] block/nfs: add support for nfs_umount

2019-09-10 Thread Peter Lieven
libnfs recently added support for unmounting. Add support in Qemu too. Signed-off-by: Peter Lieven --- block/nfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/nfs.c b/block/nfs.c index 2c98508275..f39acfdb28 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -398,6 +398,9 @@ static

Re: [Qemu-block] [Qemu-devel] [PATCH v10 0/9] hw/m68k: add Apple Machintosh Quadra 800 machine

2019-09-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190910113323.17324-1-laur...@vivier.eu/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v10 0/9] hw/m68k: add Apple Machintosh Quadra 800 machine Message-id:

[Qemu-block] [PATCH V4] block/vhdx: add check for truncated image files

2019-09-10 Thread Peter Lieven
qemu is currently not able to detect truncated vhdx image files. Add a basic check if all allocated blocks are reachable at open and report all errors during bdrv_co_check. Signed-off-by: Peter Lieven --- V4: - allow partial last blocks [Kevin] - report offsets in error messages [Kevin]

Re: [Qemu-block] [PATCH v9 3/9] block: add empty account cookie type

2019-09-10 Thread Anton Nefedov
On 9/9/2019 5:54 PM, Alberto Garcia wrote: > On Fri 06 Sep 2019 06:01:14 PM CEST, Anton Nefedov wrote: >> This adds some protection from accounting uninitialized cookie. >> That is, block_acct_failed/done without previous block_acct_start; >> in that case, cookie probably holds values from

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] block/nvme: add support for discard

2019-09-10 Thread Maxim Levitsky
On Tue, 2019-09-10 at 16:49 +0200, Paolo Bonzini wrote: > On 09/09/19 19:03, John Snow wrote: > > > > > > On 9/9/19 5:25 AM, Max Reitz wrote: > > > On 05.09.19 19:27, John Snow wrote: > > > > > > [...] > > > > > > > You also probably require review (or at least an ACK) from Keith Busch > > > >

Re: [Qemu-block] [PATCH v6 22/42] block: Fix bdrv_get_allocated_file_size's fallback

2019-09-10 Thread Kevin Wolf
Am 09.08.2019 um 18:13 hat Max Reitz geschrieben: > If the driver does not implement bdrv_get_allocated_file_size(), we > should fall back to cumulating the allocated size of all non-COW > children instead of just bs->file. > > Suggested-by: Vladimir Sementsov-Ogievskiy > Signed-off-by: Max

Re: [Qemu-block] [PATCH v6 23/42] blockdev: Use CAF in external_snapshot_prepare()

2019-09-10 Thread Kevin Wolf
Am 09.08.2019 um 18:13 hat Max Reitz geschrieben: > This allows us to differentiate between filters and nodes with COW > backing files: Filters cannot be used as overlays at all (for this > function). > > Signed-off-by: Max Reitz > Reviewed-by: Vladimir Sementsov-Ogievskiy Didn't we

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] block/nvme: add support for discard

2019-09-10 Thread Paolo Bonzini
On 09/09/19 19:03, John Snow wrote: > > > On 9/9/19 5:25 AM, Max Reitz wrote: >> On 05.09.19 19:27, John Snow wrote: >> >> [...] >> >>> You also probably require review (or at least an ACK) from Keith Busch >>> who maintains this file. >> >> Keith actually maintains the NVMe guest device;

Re: [Qemu-block] [Qemu-devel] [PATCH] ahci: enable pci bus master MemoryRegion before loading ahci engines

2019-09-10 Thread John Snow
On 9/10/19 3:20 AM, Andy wrote: > Hi John, > > Sorry I'm re-sending this mail due to format issue in the last one. > No problem at all. Thank you for the detailed logs, it's really helpful. > This issue can only be reproduced on Windows 10. > I've observed and compared the behavior of

Re: [Qemu-block] [PATCH v2 1/3] block/qcow2: refactoring of threaded encryption code

2019-09-10 Thread Maxim Levitsky
On Tue, 2019-09-10 at 14:17 +, Vladimir Sementsov-Ogievskiy wrote: > 10.09.2019 15:31, Maxim Levitsky wrote: > > On Sat, 2019-09-07 at 19:08 +, Vladimir Sementsov-Ogievskiy wrote: > > > 06.09.2019 22:57, Maxim Levitsky wrote: > > > > This commit tries to clarify few function arguments, > >

Re: [Qemu-block] [PATCH v2 1/3] block/qcow2: refactoring of threaded encryption code

2019-09-10 Thread Vladimir Sementsov-Ogievskiy
10.09.2019 15:31, Maxim Levitsky wrote: > On Sat, 2019-09-07 at 19:08 +, Vladimir Sementsov-Ogievskiy wrote: >> 06.09.2019 22:57, Maxim Levitsky wrote: >>> This commit tries to clarify few function arguments, >>> and add comments describing the encrypt/decrypt interface >>> >>> Signed-off-by:

Re: [Qemu-block] [Qemu-devel] [PATCH] ahci: enable pci bus master MemoryRegion before loading ahci engines

2019-09-10 Thread John Snow
On 9/10/19 9:58 AM, Michael S. Tsirkin wrote: > On Tue, Sep 10, 2019 at 09:50:41AM -0400, John Snow wrote: >> >> >> On 9/10/19 3:04 AM, Michael S. Tsirkin wrote: >>> On Tue, Sep 10, 2019 at 01:18:37AM +0800, andychiu wrote: If Windows 10 guests have enabled 'turn off hard disk after idle'

Re: [Qemu-block] [PATCH v2] blockjob: update nodes head while removing all bdrv

2019-09-10 Thread Sergio Lopez
Max Reitz writes: > On 10.09.19 15:36, Sergio Lopez wrote: >> block_job_remove_all_bdrv() iterates through job->nodes, calling >> bdrv_root_unref_child() for each entry. The call to the latter may >> reach child_job_[can_]set_aio_ctx(), which will also attempt to >> traverse job->nodes,

Re: [Qemu-block] [Qemu-devel] [PATCH] ahci: enable pci bus master MemoryRegion before loading ahci engines

2019-09-10 Thread Michael S. Tsirkin
On Tue, Sep 10, 2019 at 09:50:41AM -0400, John Snow wrote: > > > On 9/10/19 3:04 AM, Michael S. Tsirkin wrote: > > On Tue, Sep 10, 2019 at 01:18:37AM +0800, andychiu wrote: > >> If Windows 10 guests have enabled 'turn off hard disk after idle' > >> option in power settings, and the guest has a

Re: [Qemu-block] [PATCH v2] blockjob: update nodes head while removing all bdrv

2019-09-10 Thread Max Reitz
On 10.09.19 15:36, Sergio Lopez wrote: > block_job_remove_all_bdrv() iterates through job->nodes, calling > bdrv_root_unref_child() for each entry. The call to the latter may > reach child_job_[can_]set_aio_ctx(), which will also attempt to > traverse job->nodes, potentially finding entries that

Re: [Qemu-block] [Qemu-devel] [PATCH] ahci: enable pci bus master MemoryRegion before loading ahci engines

2019-09-10 Thread John Snow
On 9/10/19 3:04 AM, Michael S. Tsirkin wrote: > On Tue, Sep 10, 2019 at 01:18:37AM +0800, andychiu wrote: >> If Windows 10 guests have enabled 'turn off hard disk after idle' >> option in power settings, and the guest has a SATA disk plugged in, >> the SATA disk will be turned off after a

[Qemu-block] [PATCH v2] blockjob: update nodes head while removing all bdrv

2019-09-10 Thread Sergio Lopez
block_job_remove_all_bdrv() iterates through job->nodes, calling bdrv_root_unref_child() for each entry. The call to the latter may reach child_job_[can_]set_aio_ctx(), which will also attempt to traverse job->nodes, potentially finding entries that where freed on previous iterations. To avoid

Re: [Qemu-block] [Qemu-devel] [PATCH] block/backup: install notifier during creation

2019-09-10 Thread John Snow
On 9/10/19 4:19 AM, Stefan Hajnoczi wrote: > On Wed, Aug 21, 2019 at 04:01:52PM -0400, John Snow wrote: >> >> >> On 8/21/19 10:41 AM, Vladimir Sementsov-Ogievskiy wrote: >>> 09.08.2019 23:13, John Snow wrote: Backup jobs may yield prior to installing their handler, because of the

Re: [Qemu-block] [PATCH v6 04/42] block: Add child access functions

2019-09-10 Thread Kevin Wolf
Am 10.09.2019 um 14:59 hat Max Reitz geschrieben: > On 10.09.19 14:48, Kevin Wolf wrote: > > Am 10.09.2019 um 13:36 hat Max Reitz geschrieben: > >> On 10.09.19 12:47, Kevin Wolf wrote: > >>> Am 10.09.2019 um 11:14 hat Max Reitz geschrieben: > Maybe we should stop declaring Quorum a filter and

Re: [Qemu-block] [PATCH v6 20/42] block/snapshot: Fix fallback

2019-09-10 Thread Max Reitz
On 10.09.19 14:49, Kevin Wolf wrote: > Am 10.09.2019 um 14:04 hat Max Reitz geschrieben: >> On 10.09.19 13:56, Kevin Wolf wrote: >>> Am 09.08.2019 um 18:13 hat Max Reitz geschrieben: If the top node's driver does not provide snapshot functionality and we want to fall back to a node down

Re: [Qemu-block] [PATCH v6 04/42] block: Add child access functions

2019-09-10 Thread Max Reitz
On 10.09.19 14:48, Kevin Wolf wrote: > Am 10.09.2019 um 13:36 hat Max Reitz geschrieben: >> On 10.09.19 12:47, Kevin Wolf wrote: >>> Am 10.09.2019 um 11:14 hat Max Reitz geschrieben: Maybe we should stop declaring Quorum a filter and then rename the bdrv_recurse_is_first_non_filter() to,

[Qemu-block] [PATCH v2 6/7] curl: Handle success in multi_check_completion

2019-09-10 Thread Max Reitz
Background: As of cURL 7.59.0, it verifies that several functions are not called from within a callback. Among these functions is curl_multi_add_handle(). curl_read_cb() is a callback from cURL and not a coroutine. Waking up acb->co will lead to entering it then and there, which means the

Re: [Qemu-block] [PATCH v6 20/42] block/snapshot: Fix fallback

2019-09-10 Thread Kevin Wolf
Am 10.09.2019 um 14:04 hat Max Reitz geschrieben: > On 10.09.19 13:56, Kevin Wolf wrote: > > Am 09.08.2019 um 18:13 hat Max Reitz geschrieben: > >> If the top node's driver does not provide snapshot functionality and we > >> want to fall back to a node down the chain, we need to snapshot all > >>

[Qemu-block] [PATCH v2 7/7] curl: Check curl_multi_add_handle()'s return code

2019-09-10 Thread Max Reitz
If we had done that all along, debugging would have been much simpler. (Also, I/O errors are better than hangs.) Signed-off-by: Max Reitz --- block/curl.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/block/curl.c b/block/curl.c index c343c7ed3d..f86299378e 100644

Re: [Qemu-block] [PATCH v6 04/42] block: Add child access functions

2019-09-10 Thread Kevin Wolf
Am 10.09.2019 um 13:36 hat Max Reitz geschrieben: > On 10.09.19 12:47, Kevin Wolf wrote: > > Am 10.09.2019 um 11:14 hat Max Reitz geschrieben: > >> Maybe we should stop declaring Quorum a filter and then rename the > >> bdrv_recurse_is_first_non_filter() to, I don’t know, > >>

[Qemu-block] [PATCH v2 2/7] curl: Keep *socket until the end of curl_sock_cb()

2019-09-10 Thread Max Reitz
This does not really change anything, but it makes the code a bit easier to follow once we use @socket as the opaque pointer for aio_set_fd_handler(). Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz --- block/curl.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff

[Qemu-block] [PATCH v2 4/7] curl: Pass CURLSocket to curl_multi_do()

2019-09-10 Thread Max Reitz
curl_multi_do_locked() currently marks all sockets as ready. That is not only inefficient, but in fact unsafe (the loop is). A follow-up patch will change that, but to do so, curl_multi_do_locked() needs to know exactly which socket is ready; and that is accomplished by this patch here. Cc:

[Qemu-block] [PATCH v2 5/7] curl: Report only ready sockets

2019-09-10 Thread Max Reitz
Instead of reporting all sockets to cURL, only report the one that has caused curl_multi_do_locked() to be called. This lets us get rid of the QLIST_FOREACH_SAFE() list, which was actually wrong: SAFE foreaches are only safe when the current element is removed in each iteration. If it possible

[Qemu-block] [PATCH v2 3/7] curl: Check completion in curl_multi_do()

2019-09-10 Thread Max Reitz
While it is more likely that transfers complete after some file descriptor has data ready to read, we probably should not rely on it. Better be safe than sorry and call curl_multi_check_completion() in curl_multi_do(), too, just like it is done in curl_multi_read(). With this change,

[Qemu-block] [PATCH v2 0/7] block/curl: Fix hang and potential crash

2019-09-10 Thread Max Reitz
Hi, As reported in https://bugzilla.redhat.com/show_bug.cgi?id=1740193, our curl block driver can spontaneously hang. This becomes visible e.g. when reading compressed qcow2 images: $ qemu-img convert -p -O raw -n \ https://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img \

[Qemu-block] [PATCH v2 1/7] curl: Keep pointer to the CURLState in CURLSocket

2019-09-10 Thread Max Reitz
A follow-up patch will make curl_multi_do() and curl_multi_read() take a CURLSocket instead of the CURLState. They still need the latter, though, so add a pointer to it to the former. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz Reviewed-by: John Snow --- block/curl.c | 3 +++ 1 file

Re: [Qemu-block] [PATCH v2 1/3] block/qcow2: refactoring of threaded encryption code

2019-09-10 Thread Maxim Levitsky
On Sat, 2019-09-07 at 19:08 +, Vladimir Sementsov-Ogievskiy wrote: > 06.09.2019 22:57, Maxim Levitsky wrote: > > This commit tries to clarify few function arguments, > > and add comments describing the encrypt/decrypt interface > > > > Signed-off-by: Maxim Levitsky > > --- > >

Re: [Qemu-block] [PATCH v6 20/42] block/snapshot: Fix fallback

2019-09-10 Thread Max Reitz
On 10.09.19 13:56, Kevin Wolf wrote: > Am 09.08.2019 um 18:13 hat Max Reitz geschrieben: >> If the top node's driver does not provide snapshot functionality and we >> want to fall back to a node down the chain, we need to snapshot all >> non-COW children. For simplicity's sake, just do not fall

Re: [Qemu-block] [PATCH v6 20/42] block/snapshot: Fix fallback

2019-09-10 Thread Kevin Wolf
Am 09.08.2019 um 18:13 hat Max Reitz geschrieben: > If the top node's driver does not provide snapshot functionality and we > want to fall back to a node down the chain, we need to snapshot all > non-COW children. For simplicity's sake, just do not fall back if there > is more than one such

Re: [Qemu-block] [PATCH V3] block/vhdx: add check for truncated image files

2019-09-10 Thread Peter Lieven
Am 10.09.19 um 13:15 schrieb Kevin Wolf: Am 05.09.2019 um 12:02 hat Peter Lieven geschrieben: Am 04.09.19 um 16:09 schrieb Kevin Wolf: Am 03.09.2019 um 15:35 hat Peter Lieven geschrieben: qemu is currently not able to detect truncated vhdx image files. Add a basic check if all allocated

Re: [Qemu-block] [PATCH] blockjob: update nodes head while removing all bdrv

2019-09-10 Thread Sergio Lopez
Max Reitz writes: > On 10.09.19 13:07, Sergio Lopez wrote: >> block_job_remove_all_bdrv() iterates through job->nodes, calling >> bdrv_root_unref_child() for each entry. The call to the latter may >> reach child_job_[can_]set_aio_ctx(), which will also attempt to >> traverse job->nodes,

[Qemu-block] [PATCH v10 8/9] hw/m68k: add a dummy SWIM floppy controller

2019-09-10 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed-by: Hervé Poussineau --- MAINTAINERS | 2 + hw/block/Kconfig| 3 + hw/block/Makefile.objs | 1 + hw/block/swim.c | 487

Re: [Qemu-block] [PATCH v6 04/42] block: Add child access functions

2019-09-10 Thread Max Reitz
On 10.09.19 12:47, Kevin Wolf wrote: > Am 10.09.2019 um 11:14 hat Max Reitz geschrieben: >> On 09.09.19 18:13, Kevin Wolf wrote: >>> Am 09.09.2019 um 16:04 hat Max Reitz geschrieben: On 09.09.19 11:36, Kevin Wolf wrote: > Am 09.09.2019 um 09:56 hat Max Reitz geschrieben: >> On

Re: [Qemu-block] [PATCH] blockjob: update nodes head while removing all bdrv

2019-09-10 Thread Max Reitz
On 10.09.19 13:07, Sergio Lopez wrote: > block_job_remove_all_bdrv() iterates through job->nodes, calling > bdrv_root_unref_child() for each entry. The call to the latter may > reach child_job_[can_]set_aio_ctx(), which will also attempt to > traverse job->nodes, potentially finding entries that

[Qemu-block] [PATCH v10 4/9] hw/m68k: implement ADB bus support for via

2019-09-10 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed-by: Hervé Poussineau Reviewed-by: Thomas Huth --- hw/misc/Kconfig | 1 + hw/misc/mac_via.c | 198 +- include/hw/misc/mac_via.h |

[Qemu-block] [PATCH v10 7/9] hw/m68k: add Nubus support for macfb video card

2019-09-10 Thread Laurent Vivier
From: Mark Cave-Ayland Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed-by: Hervé Poussineau --- hw/display/Kconfig | 1 + hw/display/macfb.c | 56 ++ include/hw/display/macfb.h | 21

[Qemu-block] [PATCH v10 5/9] hw/m68k: add macfb video card

2019-09-10 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed-by: Hervé Poussineau Reviewed-by: Thomas Huth --- MAINTAINERS| 2 + arch_init.c| 4 + hw/display/Kconfig | 4 + hw/display/Makefile.objs |

[Qemu-block] [PATCH v10 2/9] dp8393x: manage big endian bus

2019-09-10 Thread Laurent Vivier
This is needed by Quadra 800, this card can run on little-endian or big-endian bus. Signed-off-by: Laurent Vivier Tested-by: Hervé Poussineau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Hervé Poussineau --- hw/net/dp8393x.c | 88 +++- 1 file

[Qemu-block] [PATCH v10 9/9] hw/m68k: define Macintosh Quadra 800

2019-09-10 Thread Laurent Vivier
If you want to test the machine, it doesn't yet boot a MacROM, but you can boot a linux kernel from the command line. You can install your own disk using debian-installer with: ./qemu-system-m68k \ -M q800 \ -serial none -serial mon:stdio \ -m 1000M -drive

[Qemu-block] [PATCH v10 0/9] hw/m68k: add Apple Machintosh Quadra 800 machine

2019-09-10 Thread Laurent Vivier
I'm rebasing some of these patches for seven years now, too many years... if you want to test the machine, I'm sorry, it doesn't boot a MacROM, but you can boot a linux kernel from the command line. You can install your own disk using debian-installer, with: ... -M q800 \ -serial

[Qemu-block] [PATCH v10 3/9] hw/m68k: add via support

2019-09-10 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed-by: Hervé Poussineau --- MAINTAINERS | 6 + default-configs/m68k-softmmu.mak | 1 + hw/m68k/Kconfig | 4 + hw/misc/Kconfig |

[Qemu-block] [PATCH v10 6/9] hw/m68k: add Nubus support

2019-09-10 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier Reviewed-by: Thomas Huth --- MAINTAINERS | 2 + hw/Kconfig | 1 + hw/Makefile.objs| 1 + hw/m68k/Kconfig

[Qemu-block] [PATCH v10 1/9] esp: add pseudo-DMA as used by Macintosh

2019-09-10 Thread Laurent Vivier
There is no DMA in Quadra 800, so the CPU reads/writes the data from the PDMA register (offset 0x100, ESP_PDMA in hw/m68k/q800.c) and copies them to/from the memory. There is a nice assembly loop in the kernel to do that, see linux/drivers/scsi/mac_esp.c:MAC_ESP_PDMA_LOOP(). The start of the

Re: [Qemu-block] [PATCH V3] block/vhdx: add check for truncated image files

2019-09-10 Thread Kevin Wolf
Am 05.09.2019 um 12:02 hat Peter Lieven geschrieben: > Am 04.09.19 um 16:09 schrieb Kevin Wolf: > > Am 03.09.2019 um 15:35 hat Peter Lieven geschrieben: > > > qemu is currently not able to detect truncated vhdx image files. > > > Add a basic check if all allocated blocks are reachable at open and

Re: [Qemu-block] [Qemu-stable] [Qemu-devel] [PATCH 2/3] block/qcow2: fix the corruption when rebasing luks encrypted files

2019-09-10 Thread Maxim Levitsky
On Mon, 2019-09-09 at 12:56 +0200, Kevin Wolf wrote: > Am 06.09.2019 um 21:17 hat Eric Blake geschrieben: > > > -assert((offset_in_cluster & ~BDRV_SECTOR_MASK) == 0); > > > +assert((guest_offset & ~BDRV_SECTOR_MASK) == 0); > > > +assert((host_offset & ~BDRV_SECTOR_MASK) ==

[Qemu-block] [PATCH] blockjob: update nodes head while removing all bdrv

2019-09-10 Thread Sergio Lopez
block_job_remove_all_bdrv() iterates through job->nodes, calling bdrv_root_unref_child() for each entry. The call to the latter may reach child_job_[can_]set_aio_ctx(), which will also attempt to traverse job->nodes, potentially finding entries that where freed on previous iterations. To avoid

Re: [Qemu-block] [PATCH v2 3/3] qemu-iotests: Add test for bz #1745922

2019-09-10 Thread Maxim Levitsky
On Mon, 2019-09-09 at 11:35 +0100, Daniel P. Berrangé wrote: > On Fri, Sep 06, 2019 at 10:57:50PM +0300, Maxim Levitsky wrote: > > Signed-off-by: Maxim Levitsky > > --- > > tests/qemu-iotests/263 | 75 ++ > > tests/qemu-iotests/263.out | 19 ++ > >

Re: [Qemu-block] [PATCH] tests/qemu-iotests/check: Replace "tests" with "iotests" in final status text

2019-09-10 Thread Max Reitz
On 06.09.19 13:39, Thomas Huth wrote: > When running "make check -j8" or something similar, the iotests are > running in parallel with the other tests. So when they are printing > out "Passed all xx tests" or a similar status message at the end, > it might not be quite clear that this message

Re: [Qemu-block] [PATCH] tests/Makefile: Do not print the name of the check-block.sh shell script

2019-09-10 Thread Max Reitz
On 10.09.19 12:55, Thomas Huth wrote: > On 10/09/2019 12.53, Max Reitz wrote: >> On 06.09.19 13:35, Thomas Huth wrote: >>> The check script is already printing out which iotest is currently >>> running, so printing out the name of the check-block.sh shell script >>> looks superfluous here. >>> >>>

Re: [Qemu-block] [PATCH] tests/Makefile: Do not print the name of the check-block.sh shell script

2019-09-10 Thread Thomas Huth
On 10/09/2019 12.53, Max Reitz wrote: > On 06.09.19 13:35, Thomas Huth wrote: >> The check script is already printing out which iotest is currently >> running, so printing out the name of the check-block.sh shell script >> looks superfluous here. >> >> Signed-off-by: Thomas Huth >> --- >>

Re: [Qemu-block] [PATCH] tests/Makefile: Do not print the name of the check-block.sh shell script

2019-09-10 Thread Max Reitz
On 06.09.19 13:35, Thomas Huth wrote: > The check script is already printing out which iotest is currently > running, so printing out the name of the check-block.sh shell script > looks superfluous here. > > Signed-off-by: Thomas Huth > --- > tests/Makefile.include | 2 +- > 1 file changed, 1

Re: [Qemu-block] [PATCH v2 0/2] Alignment checks cleanup

2019-09-10 Thread Max Reitz
On 27.08.19 20:59, Nir Soffer wrote: > While working on 4k support, I noticed that there is lot of code using > BDRV_SECTOR_SIZE (512) for checking alignment. I wonder how this can work with > 4k storage. > > Lets start by cleaning up to make the code easier to understand: > - Use QEMU_IS_ALIGNED

Re: [Qemu-block] [PATCH v6 04/42] block: Add child access functions

2019-09-10 Thread Kevin Wolf
Am 10.09.2019 um 11:14 hat Max Reitz geschrieben: > On 09.09.19 18:13, Kevin Wolf wrote: > > Am 09.09.2019 um 16:04 hat Max Reitz geschrieben: > >> On 09.09.19 11:36, Kevin Wolf wrote: > >>> Am 09.09.2019 um 09:56 hat Max Reitz geschrieben: > On 04.09.19 18:16, Kevin Wolf wrote: > > Am

Re: [Qemu-block] [PATCH 0/7] block: Generic file creation fallback

2019-09-10 Thread Maxim Levitsky
On Tue, 2019-09-10 at 11:16 +0200, Max Reitz wrote: > On 05.09.19 15:30, Maxim Levitsky wrote: > > On Fri, 2019-07-12 at 19:35 +0200, Max Reitz wrote: > > > Hi, > > > > > > Kevin commented on my RFC, so I got what an RFC wants, and he didn’t > > > object to the creation fallback part. So I

Re: [Qemu-block] [Qemu-devel] IOTEST 162

2019-09-10 Thread Maxim Levitsky
On Mon, 2019-09-09 at 13:24 -0400, John Snow wrote: > > On 9/6/19 1:25 PM, Maxim Levitsky wrote: > > Hi! > > > > I just had a very fun rabbit hole dive, and I want to share it with you. > > > > I notice for some time that iotest 162 fails with that: > > > > -qemu-img: Could not open

[Qemu-block] [PATCH v11 14/14] block/backup: use backup-top instead of write notifiers

2019-09-10 Thread Vladimir Sementsov-Ogievskiy
Drop write notifiers and use filter node instead. = Changes = 1. Add filter-node-name argument for backup qmp api. We have to do it in this commit, as 257 needs to be fixed. 2. There are no more write notifiers here, so is_write_notifier parameter is dropped from block-copy paths. 3.

[Qemu-block] [PATCH v11 00/14] backup-top filter driver for backup

2019-09-10 Thread Vladimir Sementsov-Ogievskiy
Hi all! These series introduce backup-top driver. It's a filter-node, which do copy-before-write operation. Mirror uses filter-node for handling guest writes, let's move to filter-node (from write-notifiers) for backup too. v11: based on Kevin's block branch 02,03: Add Max's r-b 04: - improve

[Qemu-block] [PATCH v11 10/14] iotests: 257: drop device_add

2019-09-10 Thread Vladimir Sementsov-Ogievskiy
SCSI devices are unused in test, drop them. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/257 | 8 --- tests/qemu-iotests/257.out | 44 -- 2 files changed, 52 deletions(-) diff --git

[Qemu-block] [PATCH v11 13/14] block: introduce backup-top filter driver

2019-09-10 Thread Vladimir Sementsov-Ogievskiy
Backup-top filter caches write operations and does copy-before-write operations. The driver will be used in backup instead of write-notifiers. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/backup-top.h | 37 +++ block/backup-top.c | 244

[Qemu-block] [PATCH v11 04/14] block/backup: introduce BlockCopyState

2019-09-10 Thread Vladimir Sementsov-Ogievskiy
Split copying code part from backup to "block-copy", including separate state structure and function renaming. This is needed to share it with backup-top filter driver in further commits. Notes: 1. As BlockCopyState keeps own BlockBackend objects, remaining job->common.blk users only use it to

[Qemu-block] [PATCH v11 06/14] block: move block_copy from block/backup.c to separate file

2019-09-10 Thread Vladimir Sementsov-Ogievskiy
Split block_copy to separate file, to be cleanly shared with backup-top filter driver in further commits. It's a clean movement, the only change is drop "static" from interface functions. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- include/block/block-copy.h | 76

[Qemu-block] [PATCH v11 08/14] iotests: prepare 124 and 257 bitmap querying for backup-top filter

2019-09-10 Thread Vladimir Sementsov-Ogievskiy
After backup-top filter appearing it's not possible to see dirty bitmaps in top node, so use node-name instead. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/124| 83 tests/qemu-iotests/257| 49 ++---

[Qemu-block] [PATCH v11 05/14] block/backup: fix block-comment style

2019-09-10 Thread Vladimir Sementsov-Ogievskiy
We need to fix comment style around block-copy functions before further moving them to separate file to satisfy checkpatch. But do more: fix all comments style. Also, seems like doubled first asterisk is not forbidden, but drop it too for consistency. Signed-off-by: Vladimir Sementsov-Ogievskiy

[Qemu-block] [PATCH v11 11/14] block/io: refactor wait_serialising_requests

2019-09-10 Thread Vladimir Sementsov-Ogievskiy
Split out do_wait_serialising_requests with additional possibility to not actually wait but just check, that there is something to wait for. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/io.c | 24 1 file changed, 16 insertions(+), 8

  1   2   >