On Tue, 2013-04-16 at 10:41 -0700, Badari Pulavarty wrote: > Hi, > > I would like to test tcm_vhost to verify how SCSI PR works and some of > the passthru commands for our tape device. > Hi Badari, Just FYI, last time I checked with pSCSI + tcm_vhost there was an issue triggering abort timeouts with virtio-scsi.. I've not gotten a chance to track this down yet, but is still on my TODO list.. > I got the kernel compiled and working. I see tcm_vhost module and > /dev/vhost-scsi entry. > Now, I am trying to use qemu from > > git://git.kernel.org/pub/scm/virt/kvm/nab/qemu-kvm.git > branch vhost-scsi-for-1.4 > > > Here is what I am using for qemu command line. > > $QEMU -smp 4 -cpu qemu64 --enable-kvm -m 4096 -drive > file=/var/lib/libvirt/images/myvm.img,if=ide,cache=writethrough -drive > if=none,id=test,file=/dev/sda1 -device > vhost-scsi-pci,id=test,wwpn==naa.6001405bd4e8476d,event_idx=off -vnc :10 > -boot d > Using the following opts should be sufficient: -device vhost-scsi-pci,wwpn=naa.6001405bd4e8476d > However, I quickly run into seg-fault: > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 0x7ffff151c700 (LWP 14332)] > 0x0000555555691330 in scsi_device_find (bus=0x5555565baf98, channel=0, > id=0, lun=0) at hw/scsi-bus.c:1739 > 1739 QTAILQ_FOREACH_REVERSE(kid, &bus->qbus.children, ChildrenHead, sibling) { <SNIP> > (gdb) bt > #0 0x0000555555691330 in scsi_device_find (bus=0x5555565baf98, > channel=0, id=0, lun=0) at hw/scsi-bus.c:1739 > #1 0x0000555555788e50 in virtio_scsi_device_find (vdev=0x5555565bae40, vq=0x5555565c6520) > at /root/qemu-kvm/hw/virtio-scsi.c:55 > #2 virtio_scsi_handle_cmd (vdev=0x5555565bae40, vq=0x5555565c6520) at /root/qemu-kvm/hw/virtio-scsi.c:369 > #3 0x0000555555792530 in access_with_adjusted_size (addr=16, value=0x7ffff151bb88, size=2, > access_size_min=<value optimized out>, access_size_max=<value optimized out>, access= > 0x555555793ca0 <memory_region_write_accessor>, opaque=0x5555565bf1d8) at /root/qemu-kvm/memory.c:364 > #4 0x0000555555792b5b in memory_region_iorange_write (iorange=<value optimized out>, offset=<value optimized out>, > width=<value optimized out>, data=2) at /root/qemu-kvm/memory.c:439 > #5 0x0000555555791ac5 in kvm_handle_io (env=0x5555564d6b50) at /root/qemu-kvm/kvm-all.c:1427 > #6 kvm_cpu_exec (env=0x5555564d6b50) at /root/qemu-kvm/kvm-all.c:1579 > #7 0x0000555555742441 in qemu_kvm_cpu_thread_fn (arg=0x5555564d6b50) at /root/qemu-kvm/cpus.c:759 > #8 0x00007ffff6059851 in start_thread () from /lib64/libpthread.so.0 > #9 0x00007ffff5da790d in clone () from /lib64/libc.so.6 > > BTW - I did build new seabios as recommended. > What am I missing ? Mmm, it appears from the above backtrace that your hitting the QEMU SCSI path (virtio_scsi_handle_cmd), instead of the vhost backend that never calls any of this logic.. Perhaps the extra 'id=test' option is triggering this..? (Paolo CC'ed) --nab -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html