On 11/11/2016 05:09, Alex Williamson wrote: > On Fri, 21 Oct 2016 22:48:10 +0200 > Paolo Bonzini <pbonz...@redhat.com> wrote: > >> Override start_ioeventfd and stop_ioeventfd to start/stop the >> whole dataplane logic. This has some positive side effects: >> >> - no need anymore for virtio_add_queue_aio (i.e. a revert of >> commit 1c627137c10ee2dcf59e0383ade8a9abfa2d4355) >> >> - no need anymore to switch from generic ioeventfd handlers to >> dataplane >> >> It detects some errors better: >> >> $ qemu-system-x86_64 -object iothread,id=io \ >> -device virtio-scsi-pci,ioeventfd=off,iothread=io >> qemu-system-x86_64: -device virtio-scsi-pci,ioeventfd=off,iothread=io: >> ioeventfd is required for iothread >> >> while previously it would have started just fine. >> >> Reviewed-by: Cornelia Huck <cornelia.h...@de.ibm.com> >> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> >> --- >> hw/scsi/virtio-scsi-dataplane.c | 56 >> +++++++++++++++++++++++++---------------- >> hw/scsi/virtio-scsi.c | 24 ++++++++---------- >> include/hw/virtio/virtio-scsi.h | 6 ++--- >> 3 files changed, 48 insertions(+), 38 deletions(-) > > Looks like this added a more subtle regression with MST's previous pull > request, I have an OVMF/440FX/virtio-scsi/virtio-net/win8.1 VM, with > this patch it fails to shutdown. QEMU just spins at 400% load.
I cannot reproduce this one. :( You said you get it even with vhost, what if you remove VFIO and add a regular VGA? If you can post a backtrace of all threads at the time of the hang, from origin/master (so without vhost, and not at ad07cd6) that could help. Paolo > (ps from libvirt launched vm, linebreaks added) > > /usr/local/bin/qemu-system-x86_64 -name guest=Steam,debug-threads=on -S \ > -object > secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-54-Steam/master-key.aes > \ > -machine pc-i440fx-2.8,accel=kvm,usb=off,vmport=off \ > -cpu > host,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,hv_vendor_id=KeenlyKVM,kvm=off > \ > -drive > file=/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd,if=pflash,format=raw,unit=0,readonly=on > \ > -drive > file=/var/lib/libvirt/qemu/nvram/Steam_VARS.fd,if=pflash,format=raw,unit=1 \ > -m 4096 -mem-prealloc -mem-path /dev/hugepages/libvirt/qemu -realtime > mlock=off \ > -smp 4,sockets=1,cores=4,threads=1 -uuid > 79f39860-d659-426b-89e8-90cb46ee57c6 \ > -display none -no-user-config -nodefaults \ > -chardev > socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-54-Steam/monitor.sock,server,nowait > \ > -mon chardev=charmonitor,id=monitor,mode=control -rtc > base=localtime,driftfix=slew \ > -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -boot > menu=on,strict=on \ > -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x8.0x7 \ > -device > ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x8 > \ > -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x8.0x1 \ > -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x8.0x2 \ > -device virtio-scsi-pci,id=scsi0,num_queues=4,bus=pci.0,addr=0x5 \ > -drive > file=/mnt/store/vm/Steam.img,format=raw,if=none,id=drive-scsi0-0-0-0,cache=none > \ > -device > scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=2 > \ > -netdev tap,fd=28,id=hostnet0,vhost=on,vhostfd=30 \ > -device > virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:60:ef:ac,bus=pci.0,addr=0x3 > \ > -device vfio-pci,host=01:00.0,id=hostdev0,bus=pci.0,addr=0x2 \ > -device vfio-pci,host=01:00.1,id=hostdev1,bus=pci.0,addr=0x6,rombar=0 \ > -device vfio-pci,host=02:00.0,id=hostdev2,bus=pci.0,addr=0x7 -snapshot -msg > timestamp=on > > Fails: > ad07cd6 virtio-scsi: always use dataplane path if ioeventfd is active > > Works (but I'm not using virtio-blk): > 9ffe337 virtio-blk: always use dataplane path if ioeventfd is active > > Thanks, > Alex > >