Reviewed-by: Raphael Norwitz <[email protected]> On Wed, Aug 13, 2025 at 12:52 PM Vladimir Sementsov-Ogievskiy <[email protected]> wrote: > > The logic kept as is. Reaftor to simplify further changes. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]> > --- > hw/virtio/virtio-bus.c | 18 ++++++++---------- > 1 file changed, 8 insertions(+), 10 deletions(-) > > diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c > index 11adfbf3ab..c7e3941b1e 100644 > --- a/hw/virtio/virtio-bus.c > +++ b/hw/virtio/virtio-bus.c > @@ -293,20 +293,18 @@ int virtio_bus_set_host_notifier(VirtioBusState *bus, > int n, bool assign) > __func__, strerror(-r), r); > return r; > } > - r = k->ioeventfd_assign(proxy, notifier, n, true); > - if (r < 0) { > - error_report("%s: unable to assign ioeventfd: %d", __func__, r); > - virtio_bus_cleanup_host_notifier(bus, n); > - } > - } else { > - k->ioeventfd_assign(proxy, notifier, n, false); > } > > - if (r == 0) { > - virtio_queue_set_host_notifier_enabled(vq, assign); > + r = k->ioeventfd_assign(proxy, notifier, n, assign); > + if (r < 0 && assign) { > + error_report("%s: unable to assign ioeventfd: %d", __func__, r); > + virtio_bus_cleanup_host_notifier(bus, n); > + return r; > } > > - return r; > + virtio_queue_set_host_notifier_enabled(vq, assign); > + > + return 0; > } > > void virtio_bus_cleanup_host_notifier(VirtioBusState *bus, int n) > -- > 2.48.1 > >
- [PATCH 09/33] vhost-user: keep QIOChannelSock... Vladimir Sementsov-Ogievskiy
- Re: [PATCH 09/33] vhost-user: keep QIOCh... Raphael Norwitz
- [PATCH 29/33] vhost-user: support backend mig... Vladimir Sementsov-Ogievskiy
- Re: [PATCH 29/33] vhost-user: support ba... Raphael Norwitz
- Re: [PATCH 29/33] vhost-user: suppor... Vladimir Sementsov-Ogievskiy
- [PATCH 23/33] vhost: add some useful trace-po... Vladimir Sementsov-Ogievskiy
- Re: [PATCH 23/33] vhost: add some useful... Raphael Norwitz
- Re: [PATCH 23/33] vhost: add some us... Vladimir Sementsov-Ogievskiy
- [PATCH 20/33] hw/virtio/virtio-bus: refactor ... Vladimir Sementsov-Ogievskiy
- Re: [PATCH 20/33] hw/virtio/virtio-bus: ... Philippe Mathieu-Daudé
- Re: [PATCH 20/33] hw/virtio/virtio-bus: ... Raphael Norwitz
- [PATCH 33/33] tests/functional: add test_x86_... Vladimir Sementsov-Ogievskiy
- [PATCH 17/33] vhost: move busyloop timeout in... Vladimir Sementsov-Ogievskiy
- Re: [PATCH 17/33] vhost: move busyloop t... Raphael Norwitz
- [PATCH 15/33] vhost: final refactoring of vho... Vladimir Sementsov-Ogievskiy
- Re: [PATCH 15/33] vhost: final refactori... Raphael Norwitz
- [PATCH 32/33] test/functional: exec_command_a... Vladimir Sementsov-Ogievskiy
- Re: [PATCH 32/33] test/functional: exec_... Philippe Mathieu-Daudé
- Re: [PATCH 32/33] test/functional: exec_... Thomas Huth
- [PATCH 04/33] vhost: move protocol_features t... Vladimir Sementsov-Ogievskiy
- Re: [PATCH 04/33] vhost: move protocol_f... Raphael Norwitz
