On Tue, Aug 25, 2026 at 11:48:54AM -0400, Stefan Hajnoczi wrote: > Commit e24a47c5b73e ("virtio-scsi: do not use vring in dataplane") set > dataplane_started to true when virtio_scsi_dataplane_start() fails. This > is likely a typo since dataplane is not functional after failure. > > The non-ioeventfd fallback is broken because dataplane_started is true > after virtio_scsi_dataplane_start() failure. As a result, the following > assertion failure occurs when a virtio-scsi device exceeds the open file > descriptor ulimit when setting up notifiers (eventfds): > > $ ulimit -n 104 # exact number can vary based on QEMU version > $ qemu-system-x86_64 -M q35,accel=kvm -m 1G -cpu host -smp 14 \ > --blockdev file,node-name=drive0,filename=test.img,cache.direct=on,aio=native \ > --blockdev file,node-name=drive1,filename=data01.img,cache.direct=on,aio=native \ > --device virtio-scsi-pci,id=virtio-scsi-pci0 \ > --device scsi-hd,drive=drive0,bus=virtio-scsi-pci0.0 \ > --device virtio-scsi-pci,id=virtio-scsi-pci1 \ > --device scsi-hd,drive=drive1,bus=virtio-scsi-pci1.0 > qemu: virtio-scsi: Failed to set guest notifiers (-24), ensure -accel kvm is set. > qemu: virtio_bus_start_ioeventfd: failed. Fallback to userspace (slower). > qemu-system-x86_64: ../hw/scsi/virtio-scsi.c:1017: virtio_scsi_reset: Assertion `!s->dataplane_started' failed. > Aborted (core dumped) > > Cc: Paolo Bonzini Ping Paolo: Can you take this through your SCSI tree? Thanks! Stefan > Fixes: e24a47c5b73e ("virtio-scsi: do not use vring in dataplane") > Buglink: https://redhat.atlassian.net/browse/RHEL-193328 > Signed-off-by: Stefan Hajnoczi > --- > hw/scsi/virtio-scsi-dataplane.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-scsi-dataplane.c > index 95f13fb7c28..bcb6e441335 100644 > --- a/hw/scsi/virtio-scsi-dataplane.c > +++ b/hw/scsi/virtio-scsi-dataplane.c > @@ -230,7 +230,7 @@ fail_host_notifiers: > fail_guest_notifiers: > s->dataplane_fenced = true; > s->dataplane_starting = false; > - s->dataplane_started = true; > + s->dataplane_started = false; > return -ENOSYS; > } > > -- > 2.55.0 > >