Re: [PATCH v3] osdep: Make MIN/MAX evaluate arguments only once

2020-06-03 Thread Eric Blake
On 6/3/20 11:32 AM, Richard Henderson wrote: I'd prefer we generate a compile-time error than a runtime trap (or nothing, depending on compiler flags controlling __builtin_unreachable). What we have DOES produce a compile-time error.  If either expression to MIN_CONST() is not actually const,

Re: [PATCH v3] osdep: Make MIN/MAX evaluate arguments only once

2020-06-03 Thread Richard Henderson
On 6/2/20 7:29 PM, Eric Blake wrote: > Because: > > #if MIN(...) > > now fails to compile (you can't have { in a preprocessor expression), and: > > #if MIN_CONST(...) > > fails to compile (__builtin_constant_p() is not a preprocessor macro, so it > warns that it is being treated as 0).  The

Re: [PATCH v3] osdep: Make MIN/MAX evaluate arguments only once

2020-06-03 Thread Eric Blake
On 6/2/20 9:29 PM, Eric Blake wrote: +++ b/accel/tcg/translate-all.c @@ -2565,9 +2565,9 @@ int page_check_range(target_ulong start, target_ulong len, int flags)   /* This function should never be called with addresses outside the guest address space.  If this assert fires, it

Re: [PATCH 2/5] vhost: involve device backends in feature negotiation

2020-06-03 Thread Stefan Hajnoczi
On Fri, May 29, 2020 at 03:29:13PM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > On Fri, May 29, 2020 at 03:04:54PM +0800, Jason Wang wrote: > > > > > > On 2020/5/23 上午1:17, Stefan Hajnoczi wrote: > > > > Many vhost devices in QEMU currently do not

Re: [PATCH 2/5] vhost: involve device backends in feature negotiation

2020-06-03 Thread Stefan Hajnoczi
On Mon, Jun 01, 2020 at 08:51:43PM +0800, Jason Wang wrote: > > On 2020/5/29 下午9:56, Stefan Hajnoczi wrote: > > On Fri, May 29, 2020 at 03:04:54PM +0800, Jason Wang wrote: > > > On 2020/5/23 上午1:17, Stefan Hajnoczi wrote: > > > > Many vhost devices in QEMU currently do not involve the device

[PATCH 1/1] block: propagate discard alignment from format drivers to the guest

2020-06-03 Thread Denis V. Lunev
Nowaday SCSI drivers in guests are able to align UNMAP requests before sending to the device. Right now QEMU provides an ability to set this via "discard_granularity" property of the block device which could be used by management layer. Though, in particular, from the point of QEMU, there is

Re: [PATCH v2 00/16] python: add mypy support to python/qemu

2020-06-03 Thread John Snow
On 6/3/20 4:24 AM, Vladimir Sementsov-Ogievskiy wrote: > 03.06.2020 00:45, John Snow wrote: >> Requires: 20200602194844.15258-1-js...@redhat.com > > Hmm, somehow, I can't find it neither in > https://lists.gnu.org/archive/html/qemu-devel/ > nor in my thunderbird.. > > Could you post sequence

Re: [PATCH 0/2] virtio-blk: Avoid processing requests on the main context on restart

2020-06-03 Thread Kevin Wolf
Am 03.06.2020 um 11:32 hat Sergio Lopez geschrieben: > On restart, we were scheduling a BH to process queued requests, which > would run before starting up the data plane, leading to those requests > being assigned and started on coroutines on the main context. > > This could cause requests to be

Re: [PATCH RFC 01/32] python/qemu: create qemu.lib module

2020-06-03 Thread John Snow
On 6/3/20 5:00 AM, Kevin Wolf wrote: > Am 02.06.2020 um 18:44 hat John Snow geschrieben: >> >> >> On 6/2/20 6:08 AM, Kevin Wolf wrote: >>> Am 14.05.2020 um 07:53 hat John Snow geschrieben: move python/qemu/*.py to python/qemu/lib/*.py. To create a namespace package, the 'qemu'

Re: [PATCH] block/block-copy: block_copy_dirty_clusters: fix failure check

2020-06-03 Thread Max Reitz
On 26.05.20 20:13, Vladimir Sementsov-Ogievskiy wrote: > ret may be > 0 on success path at this point. Fix assertion, which may > crash currently. > > Fixes: 4ce5dd3e9b5ee0fac18625860eb3727399ee965e > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/block-copy.c | 4 +++- > 1 file

Re: [PATCH for-5.1] qcow2: Don't open images with a backing file and the data-file-raw bit

2020-06-03 Thread Max Reitz
On 15.04.20 21:02, Alberto Garcia wrote: > Although we cannot create these images with qemu-img it is still > possible to do it using an external tool. QEMU should refuse to open > them until the data-file-raw bit is cleared with 'qemu-img check'. > > Signed-off-by: Alberto Garcia > --- >

[PATCH 0/2] virtio-blk: Avoid processing requests on the main context on restart

2020-06-03 Thread Sergio Lopez
On restart, we were scheduling a BH to process queued requests, which would run before starting up the data plane, leading to those requests being assigned and started on coroutines on the main context. This could cause requests to be wrongly processed in parallel from different threads (the main

[PATCH 1/2] virtio-blk: Refactor the code that processes queued requests

2020-06-03 Thread Sergio Lopez
Move the code that processes queued requests from virtio_blk_dma_restart_bh() to its own, non-static, function. This will allow us to call it from the virtio_blk_data_plane_start() in a future patch. Signed-off-by: Sergio Lopez --- include/hw/virtio/virtio-blk.h | 1 + hw/block/virtio-blk.c

[PATCH 2/2] virtio-blk: On restart, process queued requests in the proper context

2020-06-03 Thread Sergio Lopez
On restart, we were scheduling a BH to process queued requests, which would run before starting up the data plane, leading to those requests being assigned and started on coroutines on the main context. This could cause requests to be wrongly processed in parallel from different threads (the main

Re: [PATCH] hw/block/nvme: Verify msix_vector_use() returned value

2020-06-03 Thread Kevin Wolf
Am 02.06.2020 um 17:57 hat Philippe Mathieu-Daudé geschrieben: > msix_vector_use() returns -EINVAL on error. Assert it won't. > > Signed-off-by: Philippe Mathieu-Daudé > --- > Notes taken while reviewing: > https://www.mail-archive.com/qemu-block@nongnu.org/msg66831.html > Based-on:

Re: [PATCH RFC 01/32] python/qemu: create qemu.lib module

2020-06-03 Thread Kevin Wolf
Am 02.06.2020 um 18:44 hat John Snow geschrieben: > > > On 6/2/20 6:08 AM, Kevin Wolf wrote: > > Am 14.05.2020 um 07:53 hat John Snow geschrieben: > >> move python/qemu/*.py to python/qemu/lib/*.py. > >> > >> To create a namespace package, the 'qemu' directory itself shouldn't > >> have module

Re: [PATCH v2 00/16] python: add mypy support to python/qemu

2020-06-03 Thread Vladimir Sementsov-Ogievskiy
03.06.2020 00:45, John Snow wrote: Requires: 20200602194844.15258-1-js...@redhat.com Hmm, somehow, I can't find it neither in https://lists.gnu.org/archive/html/qemu-devel/ nor in my thunderbird.. Could you post sequence of your series by subject, or export a git branch? -- Best regards,

Re: [PATCH v4 4/6] iotests: 194: test also migration of dirty bitmap

2020-06-03 Thread Vladimir Sementsov-Ogievskiy
03.06.2020 10:52, Thomas Huth wrote: On 22/05/2020 00.06, Vladimir Sementsov-Ogievskiy wrote: Test that dirty bitmap migration works when we deal with mirror. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- tests/qemu-iotests/194 | 14 ++

Re: [PATCH v4 4/6] iotests: 194: test also migration of dirty bitmap

2020-06-03 Thread Thomas Huth
On 22/05/2020 00.06, Vladimir Sementsov-Ogievskiy wrote: > Test that dirty bitmap migration works when we deal with mirror. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Eric Blake > --- > tests/qemu-iotests/194 | 14 ++ > tests/qemu-iotests/194.out | 6 ++