Re: [PATCH 02/26] block: add missing coroutine_fn annotations

2022-10-05 Thread Alberto Campinho Faria
On Sat, Sep 24, 2022 at 2:42 PM Paolo Bonzini wrote: > Because at the time I wrote the patch, blk_pwrite_zeroes() was a > coroutine_fn. :) > > It is called from bdrv_co_create_opts_simple which is coroutine_fn and > performs I/O, so it should be a coroutine_fn. I have a few more patches > to not g

Re: [PATCH] coroutine: Make qemu_coroutine_self() return NULL if not in coroutine

2022-10-05 Thread Alberto Campinho Faria
On Wed, Oct 5, 2022 at 5:34 PM Kevin Wolf wrote: > The coroutine_fn annotation for qemu_coroutine_self() is wrong, but I > think it already works outside of coroutine context, and consistently in > all three backends, by returning &leader. > > Changing that to NULL makes me kind of nervous because

Re: [PATCH v5 11/12] blkio: implement BDRV_REQ_REGISTERED_BUF optimization

2022-09-28 Thread Alberto Campinho Faria
On Wed, Sep 28, 2022 at 8:21 PM Stefan Hajnoczi wrote: > On Tue, Sep 27, 2022 at 03:34:30PM -0400, Stefan Hajnoczi wrote: > > +ret = blkio_get_bool(s->blkio, > > + "mem-regions-pinned", > > + &s->mem_regions_pinned); > > +if (ret < 0) { > > +

Re: [PATCH 02/26] block: add missing coroutine_fn annotations

2022-09-22 Thread Alberto Campinho Faria
On Thu, Sep 22, 2022 at 9:49 AM Paolo Bonzini wrote: > Callers of coroutine_fn must be coroutine_fn themselves, or the call > must be within "if (qemu_in_coroutine())". Apply coroutine_fn to > functions where this holds. > > Signed-off-by: Paolo Bonzini > --- > block.c | 6 +++---

Re: [PATCH] softmmu/physmem: Fix address of FlatView access in address_space_(read|write)_cached_slow()

2022-09-04 Thread Alberto Campinho Faria
On Mon, Sep 5, 2022 at 12:32 AM Alberto Campinho Faria wrote: > Hi Peter, > > On Sat, Aug 27, 2022 at 7:59 PM Peter Xu wrote: > > Any bug encountered? It'll be great to add more information into the > > commit message if there is. We could also mention the issue was o

Re: [PATCH] softmmu/physmem: Fix address of FlatView access in address_space_(read|write)_cached_slow()

2022-09-04 Thread Alberto Campinho Faria
Hi Peter, On Sat, Aug 27, 2022 at 7:59 PM Peter Xu wrote: > Any bug encountered? It'll be great to add more information into the > commit message if there is. We could also mention the issue was observed > by code review or so. I came across this when performing unaligned 8-byte writes on x86_