qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH WIP 0/4] vhost-scsi: new device supporting the t


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH WIP 0/4] vhost-scsi: new device supporting the tcm_vhost Linux kernel module
Date: Thu, 31 Jan 2013 08:11:55 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

Il 30/01/2013 21:02, Michael S. Tsirkin ha scritto:
> On Wed, Jan 30, 2013 at 05:41:22PM +0100, Paolo Bonzini wrote:
>> Ok, so here is my attempt at a vhost-scsi device.  I'm creating an
>> entirely separate device, with the common parts of virtio-scsi and
>> vhost-scsi (actually little more than the initialization) grouped into
>> a VirtIOSCSICommon type.  The device is used simply like "-device
>> vhost-scsi-pci,wwpn=WWPN", with all configuration done in configfs
>> beforehand.
>>
>> As expected, using a separate device finds a snag: vhost-scsi is passing
>> force=false to vhost_dev_init, and the BIOS does not use MSI-X so it
>> will actually use the non-vhost implementation which is wrong.  I fixed
>> this by passing force=true; I'm not sure what that would break, but I
>> figured "not much" since the BIOS polls and does not rely on interrupts.
>>
>> That makes vhost start, but it still doesn't work for me with a 3.7.2
>> kernel on the host.  Even Nick's patches hang the guest as soon as vhost
>> starts, and I get the same behavior with mine.  (Of course with my
>> patches the BIOS hangs and you never reach Linux; but try a BIOS without
>> virtio-scsi support, and you'll see Linux hanging in the same way).
>>
>> Here is my configuration:
>>
>>   cd /sys/kernel/config/target
>>   mkdir -p core/fileio_0/fileio
>>   echo 'fd_dev_name=/home/pbonzini/test.img,fd_dev_size=5905580032' > 
>> core/fileio_0/fileio/control 
>>   echo 1 > core/fileio_0/fileio/enable
>>   mkdir -p vhost/naa.600140554cf3a18e/tpgt_0/lun/lun_0
>>   cd vhost/naa.600140554cf3a18e/tpgt_0
>>   ln -sf ../../../../../core/fileio_0/fileio/ lun/lun_0/virtual_scsi_port
>>   echo naa.60014053226f0388 > nexus
>>
>> Nick's patches are run with "-vhost-scsi 
>> id=vs,tpgt=0,wwpn=naa.600140554cf3a18e
>> -device virtio-scsi-pci,vhost-scsi=vs".  Perhaps I'm doing something wrong.
>>
>> Another small bug I found is an ordering problem between
>> VHOST_SET_VRING_KICK and VHOST_SCSI_SET_ENDPOINT.  Starting the vq
>> causes a "vhost_scsi_handle_vq endpoint not set" error in dmesg.
> 
> Hmm but why? What causes a kick? Any idea?

I haven't checked yet, but I don't plan to keep the patches.  I want to
fix it in the kernel by relaxing VHOST_SCSI_*_ENDPOINT.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]