Received: from eggs.gnu.org ([2001:4830:134:3::10]:58347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c5INS-0004En-P4 for qemu-devel@nongnu.org; Fri, 11 Nov 2016 15:24:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c5INP-00064l-KJ for qemu-devel@nongnu.org; Fri, 11 Nov 2016 15:24:46 -0500 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:36822) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c5INP-00064d-DD for qemu-devel@nongnu.org; Fri, 11 Nov 2016 15:24:43 -0500 Received: by mail-wm0-x243.google.com with SMTP id m203so10109322wma.3 for ; Fri, 11 Nov 2016 12:24:43 -0800 (PST) Sender: Paolo Bonzini References: <1477082896-26553-1-git-send-email-pbonzini@redhat.com> <1477082896-26553-8-git-send-email-pbonzini@redhat.com> <20161110210907.41ebcb50@t450s.home> From: Paolo Bonzini Message-ID: Date: Fri, 11 Nov 2016 21:24:33 +0100 MIME-Version: 1.0 In-Reply-To: <20161110210907.41ebcb50@t450s.home> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 07/13] virtio-scsi: always use dataplane path if ioeventfd is active List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: cornelia.huck@de.ibm.com, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, mst@redhat.com On 11/11/2016 05:09, Alex Williamson wrote: > On Fri, 21 Oct 2016 22:48:10 +0200 > Paolo Bonzini 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 >> Signed-off-by: Paolo Bonzini >> --- >> 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 > >