On Thu, May 19, 2022 at 02:30:43AM -0400, Jonah Palmer wrote:
>
> On 5/16/22 16:26, Michael S. Tsirkin wrote:
>
> On Fri, Apr 01, 2022 at 09:23:22AM -0400, Jonah Palmer wrote:
>
> From: Laurent Vivier
>
> Display feature names instead of bitmaps for host, guest, and
>
Creating 1GB image for a simple qtest is unnecessary
and could lead to failures. We reduce the image size
to 1MB to reduce the test overhead.
Signed-off-by: Hao Wu
---
tests/qtest/npcm7xx_sdhci-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
On 6/9/22 10:21, Kevin Wolf wrote:
The following changes since commit 028f2361d0c2d28d6f918fe618f389228ac22b60:
Merge tag 'pull-target-arm-20220609' of
https://git.linaro.org/people/pmaydell/qemu-arm into staging (2022-06-09
06:47:03 -0700)
are available in the Git repository at:
git
> On Jun 9, 2022, at 12:22 PM, Francisco Iglesias
> wrote:
>
> Hi Iris,
>
> Looks good some, a couple of comments below.
>
> On [2022 Jun 08] Wed 20:13:19, Iris Chen wrote:
>> From: Iris Chen
>>
>> Signed-off-by: Iris Chen
>> ---
>> Addressed all comments from V1. The biggest change:
On Thu, Jun 09, 2022 at 05:47:12PM +0100, Stefan Hajnoczi wrote:
It may not be obvious why laio_io_unplug() checks max batch. I discussed
this with Stefano and have added a comment summarizing the reason.
Cc: Stefano Garzarella
Cc: Kevin Wolf
Signed-off-by: Stefan Hajnoczi
---
From: Stefan Hajnoczi
bdrv_co_drain() has not been used since commit 9a0cec664eef ("mirror:
use bdrv_drained_begin/bdrv_drained_end") in 2016. Remove it so there
are fewer drain scenarios to worry about.
Use bdrv_drained_begin()/bdrv_drained_end() instead. They are "mixed"
functions that can be
From: Stefan Hajnoczi
Commit 1b7fd729559c ("block: rename buffer_alignment to
guest_block_size") noted:
At this point, the field is set by the device emulation, but completely
ignored by the block layer.
The last time the value of buffer_alignment/guest_block_size was
actually used was
From: Vladimir Sementsov-Ogievskiy
We have too much logic to simply check that bitmaps are of the same
size. Let's just define that hbitmap_merge() and
bdrv_dirty_bitmap_merge_internal() require their argument bitmaps be of
same size, this simplifies things.
Let's look through the callers:
For
Hi Iris,
Looks good some, a couple of comments below.
On [2022 Jun 08] Wed 20:13:19, Iris Chen wrote:
> From: Iris Chen
>
> Signed-off-by: Iris Chen
> ---
> Addressed all comments from V1. The biggest change: removed
> object_class_property_add.
>
> hw/block/m25p80.c | 37
From: Stefan Hajnoczi
Document vduse-blk exports in qemu-storage-daemon --help and the
qemu-storage-daemon(1) man page.
Based-on: <20220523084611.91-1-xieyon...@bytedance.com>
Cc: Xie Yongji
Signed-off-by: Stefan Hajnoczi
Message-Id: <20220525121947.859820-1-stefa...@redhat.com>
From: Xie Yongji
Now the req->size is set to the correct value only
when handling VIRTIO_BLK_T_GET_ID request. This patch
fixes it.
Signed-off-by: Xie Yongji
Message-Id: <20220523084611.91-3-xieyon...@bytedance.com>
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Kevin Wolf
---
From: Xie Yongji
To support block resize, this uses vduse_dev_update_config()
to update the capacity field in configuration space and inject
config interrupt on the block resize callback.
Signed-off-by: Xie Yongji
Reviewed-by: Stefan Hajnoczi
Message-Id:
From: Xie Yongji
Abstract the common logic of virtio-blk I/O process to a function
named virtio_blk_process_req(). It's needed for the following commit.
Signed-off-by: Xie Yongji
Message-Id: <20220523084611.91-4-xieyon...@bytedance.com>
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Kevin Wolf
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This directly implements the get_return_path logic using QIOChannel APIs.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/qemu-file-channel.c | 16
> migration/qemu-file.c
From: Xie Yongji
To support reconnecting after restart or crash, VDUSE backend
might need to resubmit inflight I/Os. This stores the metadata
such as the index of inflight I/O's descriptors to a shm file so
that VDUSE backend can restore them during reconnecting.
Signed-off-by: Xie Yongji
On Thu, Jun 09, 2022 at 05:47:11PM +0100, Stefan Hajnoczi wrote:
Every laio_io_plug() call has a matching laio_io_unplug() call. There is
a plugged counter that tracks the number of levels of plugging and
allows for nesting.
The plugged counter must reflect the balance between laio_io_plug()
From: Xie Yongji
VDUSE [1] is a linux framework that makes it possible to implement
software-emulated vDPA devices in userspace. This adds a library
as a subproject to help implementing VDUSE backends in QEMU.
[1] https://www.kernel.org/doc/html/latest/userspace-api/vduse.html
Signed-off-by:
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> Now that all QEMUFile callbacks are removed, the entire concept can be
> deleted.
>
> Signed-off-by: Daniel P. Berrangé
I think that's OK, there's one nit - you remove qemu_get_fd from one of
the headers; I think that probably belongs in an
From: Stefano Garzarella
If the namespace does not exist, rbd_create() fails with -ENOENT and
QEMU reports a generic "error rbd create: No such file or directory":
$ qemu-img create rbd:rbd/namespace/image 1M
Formatting 'rbd:rbd/namespace/image', fmt=raw size=1048576
qemu-img:
The following changes since commit 028f2361d0c2d28d6f918fe618f389228ac22b60:
Merge tag 'pull-target-arm-20220609' of
https://git.linaro.org/people/pmaydell/qemu-arm into staging (2022-06-09
06:47:03 -0700)
are available in the Git repository at:
git://repo.or.cz/qemu/kevin.git tags
From: Emanuele Giuseppe Esposito
It seems that aio_wait_kick always required a memory barrier
or atomic operation in the caller, but nobody actually
took care of doing it.
Let's put the barrier in the function instead, and pair it
with another one in AIO_WAIT_WHILE. Read aio_wait_kick()
comment
From: Vladimir Sementsov-Ogievskiy
We don't need extra bitmap. All we need is to backup the original
bitmap when we do first merge. So, drop extra temporary bitmap and work
directly with target and backup.
Still to keep old semantics, that on failure target is unchanged and
user don't need to
From: Xie Yongji
This implements a VDUSE block backends based on
the libvduse library. We can use it to export the BDSs
for both VM and container (host) usage.
The new command-line syntax is:
$ qemu-storage-daemon \
--blockdev file,node-name=drive0,filename=test.img \
--export
From: Xie Yongji
This supports passing NULL ops to blk_set_dev_ops()
so that we can remove stale ops in some cases.
Signed-off-by: Xie Yongji
Reviewed-by: Stefan Hajnoczi
Message-Id: <20220523084611.91-2-xieyon...@bytedance.com>
Signed-off-by: Kevin Wolf
---
block/block-backend.c | 2 +-
1
On Thu, Jun 09, 2022 at 05:59:00PM +0100, Dr. David Alan Gilbert wrote:
> * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > Now that all QEMUFile callbacks are removed, the entire concept can be
> > deleted.
> >
> > Signed-off-by: Daniel P. Berrangé
>
> I think that's OK, there's one nit -
On Thu, Jun 09, 2022 at 05:46:29PM +0100, Dr. David Alan Gilbert wrote:
> * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > This directly implements the get_buffer logic using QIOChannel APIs.
> >
> > Signed-off-by: Daniel P. Berrangé
> > ---
> > migration/qemu-file-channel.c | 29
From: Xie Yongji
This adds vduse header to linux headers so that the
relevant VDUSE API can be used in subsequent patches.
Signed-off-by: Xie Yongji
Reviewed-by: Stefan Hajnoczi
Message-Id: <20220523084611.91-5-xieyon...@bytedance.com>
Signed-off-by: Kevin Wolf
---
From: Fabian Ebner
On 64-bit platforms, assigning SIZE_MAX to the int64_t max_pdiscard
results in a negative value, and the following assertion would trigger
down the line (it's not the same max_pdiscard, but computed from the
other one):
qemu-system-x86_64: ../block/io.c:3166: bdrv_co_pdiscard:
From: Eric Blake
CID 1488362 points out that the second 'rc >= 0' check is now dead
code.
Reported-by: Peter Maydell
Fixes: 172f5f1a40(nbd: remove peppering of nbd_client_connected)
Signed-off-by: Eric Blake
Message-Id: <20220516210519.76135-1-ebl...@redhat.com>
Reviewed-by: Peter Maydell
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This directly implements the writev_buffer logic using QIOChannel APIs.
>
> Signed-off-by: Daniel P. Berrangé
> ---
> migration/qemu-file-channel.c | 43 ---
> migration/qemu-file.c | 24
It may not be obvious why laio_io_unplug() checks max batch. I discussed
this with Stefano and have added a comment summarizing the reason.
Cc: Stefano Garzarella
Cc: Kevin Wolf
Signed-off-by: Stefan Hajnoczi
---
block/linux-aio.c | 6 ++
1 file changed, 6 insertions(+)
diff --git
Every laio_io_plug() call has a matching laio_io_unplug() call. There is
a plugged counter that tracks the number of levels of plugging and
allows for nesting.
The plugged counter must reflect the balance between laio_io_plug() and
laio_io_unplug() calls accurately. Otherwise I/O stalls occur
On Thu, Jun 09, 2022 at 05:12:41PM +0100, Dr. David Alan Gilbert wrote:
> * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > This directly implements the shutdown logic using QIOChannel APIs.
> >
> > Signed-off-by: Daniel P. Berrangé
> > ---
> > migration/qemu-file-channel.c | 27
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/qemu-file.h | 4
> 1 file changed, 4 deletions(-)
>
> diff --git a/migration/qemu-file.h b/migration/qemu-file.h
> index 07c86bfea3..674c2c409b
An unlucky I/O pattern can result in stalled Linux AIO requests when the
plugged counter becomes unbalanced. See Patch 1 for details.
Patch 2 adds a comment to explain why the laio_io_unplug() even checks max
batch in the first place.
Stefan Hajnoczi (2):
linux-aio: fix unbalanced plugged
From: Vladimir Sementsov-Ogievskiy
At the end we ignore failure of bdrv_merge_dirty_bitmap() and report
success. And still set errp. That's wrong.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Nikita Lapshin
Reviewed-by: Kevin Wolf
Message-Id:
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This directly implements the close logic using QIOChannel APIs.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/qemu-file-channel.c | 12
> migration/qemu-file.c | 12
On Thu, Jun 09, 2022 at 08:22:06AM -0400, Emanuele Giuseppe Esposito wrote:
> If we go directly to GLOBAL_STATE_CODE, IO_CODE or IO_OR_GS_CODE
> definition, we just find that they "mark and check that the function
> is part of the {category} API".
> However, ther is no definition on what
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This directly implements the shutdown logic using QIOChannel APIs.
>
> Signed-off-by: Daniel P. Berrangé
> ---
> migration/qemu-file-channel.c | 27 ---
> migration/qemu-file.c | 10 +++---
>
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This directly implements the get_buffer logic using QIOChannel APIs.
>
> Signed-off-by: Daniel P. Berrangé
> ---
> migration/qemu-file-channel.c | 29 -
> migration/qemu-file.c | 18 --
>
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> Prepare for the elimination of QEMUFileOps by introducing a pair of new
> constructors. This lets us distinguish between an input and output file
> object explicitly rather than via the existance of specific callbacks.
>
> Signed-off-by: Daniel
Also convert bdrv_pwrite_sync() to being implemented using
generated_co_wrapper.
Signed-off-by: Alberto Faria
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
---
block/io.c | 9 +
include/block/block-io.h | 8 ++--
2 files changed, 11 insertions(+), 6
It does not mutate the buffer.
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
Reviewed-by: Stefan Hajnoczi
---
include/block/block_int-io.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/block/block_int-io.h b/include/block/block_int-io.h
index
Swap 'buf' and 'bytes' around for consistency with
bdrv_co_{pread,pwrite}(), and in preparation to implement these
functions using generated_co_wrapper.
Callers were updated using this Coccinelle script:
@@ expression child, offset, buf, bytes, flags; @@
- bdrv_pread(child, offset, buf,
Convert uses of bdrv_pwrite_sync() into bdrv_co_pwrite_sync() when the
callers are already coroutine_fn.
Signed-off-by: Alberto Faria
Reviewed-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Stefan Hajnoczi
---
block/parallels.c | 2 +-
block/qcow2-snapshot.c | 6 +++---
block/qcow2.c
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> This directly implements the set_blocking logic using QIOChannel APIs.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/qemu-file-channel.c | 14 --
> migration/qemu-file.c | 4
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> On Thu, Jun 09, 2022 at 05:12:41PM +0100, Dr. David Alan Gilbert wrote:
> > * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > > This directly implements the shutdown logic using QIOChannel APIs.
> > >
> > > Signed-off-by: Daniel P. Berrangé
It does not mutate the buffer.
Signed-off-by: Alberto Faria
Reviewed-by: Paolo Bonzini
---
include/block/block_int-io.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/block/block_int-io.h b/include/block/block_int-io.h
index bb454200e5..d4d3bed783 100644
---
They currently return the value of their headerlen/buflen parameter on
success. Returning 0 instead makes it clear that short reads/writes are
not possible.
Signed-off-by: Alberto Faria
Reviewed-by: Eric Blake
---
block/crypto.c | 52 +-
Start by making the interfaces of analogous non-coroutine and coroutine
functions consistent with each other, then implement the non-coroutine
ones using generated_co_wrapper.
For the bdrv_pwrite_sync() case, also add the missing
bdrv_co_pwrite_sync() function.
Changes v4 --> v5:
- Picking up a
They currently return the value of their 'bytes' parameter on success.
Make them return 0 instead, for consistency with other I/O functions and
in preparation to implement them using generated_co_wrapper. This also
makes it clear that short reads/writes are not possible.
The few callers that
Use bdrv_pwrite_sync() instead of calling bdrv_pwrite() and bdrv_flush()
separately.
Signed-off-by: Alberto Faria
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
---
block/qcow2.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> The only callers of qemu_fopen_ops pass 'true' for the 'has_ioc'
> parameter, so hardcode this assumption in QEMUFile, by passing in
> the QIOChannel object as a non-opaque parameter.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr.
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> The only user of the hooks is RDMA which provides a QIOChannel backed
> impl of QEMUFile. It can thus use the qemu_file_get_ioc() method.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
>
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> With this change, all QEMUFile usage is backed by QIOChannel at
> last.
>
> Signed-off-by: Daniel P. Berrangé
Reviewed-by: Dr. David Alan Gilbert
> ---
> migration/savevm.c | 42 --
> 1 file changed,
On 6/8/22 14:49, Hanna Reitz wrote:
On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote:
To be used in further commit.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block.c | 48
1 file changed, 48 insertions(+)
Looking at
bdrv_{pread,pwrite}() now return -EIO instead of -EINVAL when 'bytes' is
negative, making them consistent with bdrv_{preadv,pwritev}() and
bdrv_co_{pread,pwrite,preadv,pwritev}().
bdrv_pwrite_zeroes() now also calls trace_bdrv_co_pwrite_zeroes() and
clears the BDRV_REQ_MAY_UNMAP flag when
They currently return the value of their headerlen/buflen parameter on
success. Returning 0 instead makes it clear that short reads/writes are
not possible.
Signed-off-by: Alberto Faria
Reviewed-by: Eric Blake
Reviewed-by: Stefan Hajnoczi
---
block/crypto.c | 52
For consistency with other I/O functions, and in preparation to
implement bdrv_{pread,pwrite}() using generated_co_wrapper.
unsigned int fits in int64_t, so all callers remain correct.
bdrv_check_request32() is called further down the stack and causes -EIO
to be returned if 'bytes' is negative
Start by making the interfaces of analogous non-coroutine and coroutine
functions consistent with each other, then implement the non-coroutine
ones using generated_co_wrapper.
For the bdrv_pwrite_sync() case, also add the missing
bdrv_co_pwrite_sync() function.
Changes v3 --> v4:
- Removed
Use bdrv_pwrite_sync() instead of calling bdrv_pwrite() and bdrv_flush()
separately.
Signed-off-by: Alberto Faria
Reviewed-by: Eric Blake
---
block/qcow2.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index f2fb54c51f..90a2dd406b
Convert uses of bdrv_pwrite_sync() into bdrv_co_pwrite_sync() when the
callers are already coroutine_fn.
Signed-off-by: Alberto Faria
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/parallels.c | 2 +-
block/qcow2-snapshot.c | 6 +++---
block/qcow2.c | 4 ++--
3 files
bdrv_{pread,pwrite}() now return -EIO instead of -EINVAL when 'bytes' is
negative, making them consistent with bdrv_{preadv,pwritev}() and
bdrv_co_{pread,pwrite,preadv,pwritev}().
bdrv_pwrite_zeroes() now also calls trace_bdrv_co_pwrite_zeroes() and
clears the BDRV_REQ_MAY_UNMAP flag when
On 6/7/22 18:58, Hanna Reitz wrote:
On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote:
Now the indirection is not actually used, we can safely reduce it to
simple pointer.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/snapshot.c | 39 +--
1
Swap 'buf' and 'bytes' around for consistency with
bdrv_co_{pread,pwrite}(), and in preparation to implement these
functions using generated_co_wrapper.
Callers were updated using this Coccinelle script:
@@ expression child, offset, buf, bytes, flags; @@
- bdrv_pread(child, offset, buf,
For consistency with other I/O functions, and in preparation to
implement bdrv_{pread,pwrite}() using generated_co_wrapper.
unsigned int fits in int64_t, so all callers remain correct.
bdrv_check_request32() is called further down the stack and causes -EIO
to be returned if 'bytes' is negative
All the callbacks below are always running in the main loop.
The callbacks are the following:
- start/stop_ioeventfd: these are the callbacks where
blk_set_aio_context(iothread) is done, so they are called in the main
loop.
- save and load: called during migration, when VM is stopped from
It is read from IO_CODE and written with BQL held,
so setting it as atomic should be enough.
Also remove the aiocontext lock that was sporadically
taken around the set.
Signed-off-by: Emanuele Giuseppe Esposito
---
block/block-backend.c | 6 +++---
hw/block/virtio-blk.c | 4
2 files
They currently return the value of their 'bytes' parameter on success.
Make them return 0 instead, for consistency with other I/O functions and
in preparation to implement them using generated_co_wrapper. This also
makes it clear that short reads/writes are not possible.
The few callers that
This function in virtio_blk_data_plane_start is directly
invoked, accessing the queued requests from the main loop,
while the device has already switched to the iothread context.
The only place where calling virtio_blk_process_queued_requests
from the main loop is allowed is when
For consistency with other I/O functions, and in preparation to
implement them using generated_co_wrapper.
Callers were updated using this Coccinelle script:
@@ expression child, offset, buf, bytes; @@
- bdrv_pread(child, offset, buf, bytes)
+ bdrv_pread(child, offset, buf, bytes, 0)
On 5/26/22 21:51, Vladimir Sementsov-Ogievskiy wrote:
On 5/26/22 19:46, Vladimir Sementsov-Ogievskiy wrote:
On 4/7/22 16:27, Vladimir Sementsov-Ogievskiy wrote:
Hi all!
v4: Now based on master
01: add assertion and r-b
02: s/7.0/7.1/ and r-b
03: switch to QEMUMachine, touch-up pylintrc, drop
Also convert bdrv_pwrite_sync() to being implemented using
generated_co_wrapper.
Signed-off-by: Alberto Faria
Reviewed-by: Eric Blake
---
block/io.c | 9 +
include/block/block-io.h | 8 ++--
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/block/io.c
For consistency with other I/O functions, and in preparation to
implement them using generated_co_wrapper.
Callers were updated using this Coccinelle script:
@@ expression child, offset, buf, bytes; @@
- bdrv_pread(child, offset, buf, bytes)
+ bdrv_pread(child, offset, buf, bytes, 0)
From: Bernhard Beschow
This function was declared in a generic and public header, implemented
in a device-specific source file but only used in xen_platform. Given its
'aux' parameter, this function is more xen-specific than piix-specific.
Also, the hardcoded magic constants seem to be generic
From: Bernhard Beschow
Commit 0f8445820f11a69154309863960328dda3dc1ad4 'xen: piix reuse pci
generic class init function' already resolved redundant code which in
turn rendered piix3-ide-xen redundant.
Signed-off-by: Bernhard Beschow
Reviewed-by: Anthony PERARD
Message-Id:
On Wed, Jun 8, 2022 at 1:50 PM Stefan Hajnoczi wrote:
> Yes, that's fine. My main concern is that callers have been audited when
> errnos are changed. If you switch bdrv_{pread,pwrite}() to -EIO and have
> audited callers, then I'm happy.
>
> Consistent -EINVAL would be nice in the future, but I
Just as done in the block API, mark functions in virtio-blk
that are called also from iothread(s).
We know such functions are IO because many are blk_* callbacks,
running always in the device iothread, and remaining are propagated
from the leaf IO functions (if a function calls a IO_CODE
Just as done in the block API, mark functions in virtio-blk
that are always called in the main loop with BQL held.
We know such functions are GS because they all are callbacks
from virtio.c API that has already classified them as GS.
Signed-off-by: Emanuele Giuseppe Esposito
---
s->rq is pointing to the the VirtIOBlockReq list, and this list is
read/written in:
virtio_blk_reset = main loop, but caller calls ->stop_ioeventfd() and
drains, so no iothread runs in parallel
virtio_blk_save_device = main loop, but VM is stopped (migration), so
iothread has no work on request
virtio_queue_aio_attach_host_notifier() and
virtio_queue_aio_attach_host_notifier_nopoll() run always in the
main loop, so there is no need to protect them with AioContext
lock.
On the other side, virtio_queue_aio_detach_host_notifier() runs
in a bh in the iothread context, but it is always
AioContext lock was introduced in b9e413dd375 and in this instance
it is used to protect these 3 functions:
- virtio_blk_handle_rw_error
- virtio_blk_req_complete
- block_acct_done
Now that all three of the above functions are protected with
their own locks, we can get rid of the AioContext lock.
This serie aims to free virtio-blk (and in the future all
virtio devices) from the AioContext lock.
First step is to understand which functions are running in
the main loop and which are in iothreads.
Because many functions in virtio-blk are callbacks called
in some other virtio (pci, mmio, bus
From: Bernhard Beschow
The comment is based on commit message
ae4d2eb273b167dad748ea4249720319240b1ac2 'xen-platform: add missing disk
unplug option'. Since it seems to describe design decisions and
limitations that still apply it seems worth having.
Signed-off-by: Bernhard Beschow
On 6/7/22 13:53, Hanna Reitz wrote:
On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote:
test_parallel_perm_update() does two things that we are going to
restrict in the near future:
1. It updates bs->file field by hand. bs->file will be managed
automatically by generic code (together
Just remove some AioContext lock in LinuxAioState and ThreadPool.
Not related to anything specific, so I decided to send it as
a separate patch.
These patches are taken from Paolo's old draft series.
Emanuele Giuseppe Esposito (1):
thread-pool: use ThreadPool from the running thread
Paolo
Remove usage of aio_context_acquire by always submitting work items
to the current thread's ThreadPool.
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/file-posix.c| 19 +--
block/file-win32.c| 2 +-
block/qcow2-threads.c | 2 +-
From: Paolo Bonzini
Remove usage of aio_context_acquire by always submitting asynchronous
AIO to the current thread's LinuxAioState.
Signed-off-by: Paolo Bonzini
Signed-off-by: Emanuele Giuseppe Esposito
---
block/file-posix.c | 3 ++-
block/linux-aio.c | 13 ++---
On 6/7/22 18:55, Hanna Reitz wrote:
On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote:
bs->file and bs->backing are a kind of duplication of part of
bs->children. But very useful diplication, so let's not drop them at
all:)
We should manage bs->file and bs->backing in same place, where we
error_report() only works once monitor_init_globals_core() has been
called, which is not the case when parsing the --daemonize option. Use
fprintf(stderr, ...) instead.
Fixes: 2525edd85fec53e23fda98974a15e3b3c8957596 ("qsd: Add --daemonize")
Signed-off-by: Hanna Reitz
---
After writing the PID file, we register an exit notifier to unlink it
when the process terminates. However, if the process has changed its
working directory in the meantime (e.g. in os_setup_post() when
daemonizing), this will not work when the PID file path was relative.
Therefore, pass the
After writing the PID file, we register an atexit() handler to unlink it
when the process terminates. However, if the process has changed its
working directory in the meantime (e.g. in os_setup_post() when
daemonizing), this will not work when the PID file path was relative.
Therefore, pass the
Hi,
QEMU (the system emulator) and the storage daemon (QSD) write their PID
to the given file when you specify --pidfile. They keep the path around
and register exit handlers (QEMU uses an exit notifier, QSD an atexit()
function) to unlink this file when the process terminates. These
handlers
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> On Thu, Jun 09, 2022 at 01:56:00PM +0100, Peter Maydell wrote:
> > On Tue, 24 May 2022 at 12:46, Daniel P. Berrangé
> > wrote:
> > >
> > > The qemu_update_position method name gives the misleading impression
> > > that it is changing the
On Thu, Jun 09, 2022 at 01:56:00PM +0100, Peter Maydell wrote:
> On Tue, 24 May 2022 at 12:46, Daniel P. Berrangé wrote:
> >
> > The qemu_update_position method name gives the misleading impression
> > that it is changing the current file offset. Most of the files are
> > just streams, however,
On Tue, 24 May 2022 at 12:46, Daniel P. Berrangé wrote:
>
> The qemu_update_position method name gives the misleading impression
> that it is changing the current file offset. Most of the files are
> just streams, however, so there's no concept of a file offset in the
> general case.
>
> What
Currently, the exit notifier for unlinking the PID file is registered
unconditionally. Limit it to only when we actually do create a PID
file.
Signed-off-by: Hanna Reitz
---
softmmu/vl.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/softmmu/vl.c
On 6/9/22 05:13, Iris Chen wrote:
From: Iris Chen
Signed-off-by: Iris Chen
---
Addressed all comments from V1. The biggest change: removed
object_class_property_add.
Reviewed-by: Cédric Le Goater
Thanks,
C.
hw/block/m25p80.c | 37 +++
If we go directly to GLOBAL_STATE_CODE, IO_CODE or IO_OR_GS_CODE
definition, we just find that they "mark and check that the function
is part of the {category} API".
However, ther is no definition on what {category} API is, they are
in include/block/block-*.h
Therefore, add a comment that refers
* Daniel P. Berrangé (berra...@redhat.com) wrote:
> The qemu_update_position method name gives the misleading impression
> that it is changing the current file offset. Most of the files are
> just streams, however, so there's no concept of a file offset in the
> general case.
>
> What this method
1 - 100 of 112 matches
Mail list logo