]> xenbits.xensource.com Git - qemu-xen.git/commit
virtio-blk: Use ioeventfd_attach in start_ioeventfd
authorHanna Czenczek <hreitz@redhat.com>
Fri, 2 Feb 2024 15:31:58 +0000 (16:31 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 7 Feb 2024 20:51:06 +0000 (21:51 +0100)
commit52bff01f64eec017ffb0d5903a0ee1d67ca7a548
tree3e32fdb253bfb71d1fbb342224b52c9aa080b9a0
parent5bdbaebcce18fe6a627cafad2043ec08f3de5744
virtio-blk: Use ioeventfd_attach in start_ioeventfd

Commit d3f6f294aeadd5f88caf0155e4360808c95b3146 ("virtio-blk: always set
ioeventfd during startup") has made virtio_blk_start_ioeventfd() always
kick the virtqueue (set the ioeventfd), regardless of whether the BB is
drained.  That is no longer necessary, because attaching the host
notifier will now set the ioeventfd, too; this happens either
immediately right here in virtio_blk_start_ioeventfd(), or later when
the drain ends, in virtio_blk_ioeventfd_attach().

With event_notifier_set() removed, the code becomes the same as the one
in virtio_blk_ioeventfd_attach(), so we can reuse that function.

Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
Message-ID: <20240202153158.788922-4-hreitz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/block/virtio-blk.c