[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device fo
From: |
Nicholas A. Bellinger |
Subject: |
Re: [Qemu-devel] [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost |
Date: |
Tue, 14 Aug 2012 13:31:14 -0700 |
On Mon, 2012-08-13 at 11:53 +0300, Michael S. Tsirkin wrote:
> On Mon, Aug 13, 2012 at 08:35:14AM +0000, Nicholas A. Bellinger wrote:
> > From: Stefan Hajnoczi <address@hidden>
> >
> > This patch adds a new type of host device that drives the vhost_scsi
> > device. The syntax to add vhost-scsi is:
> >
> > qemu -vhost-scsi id=vhost-scsi0,wwpn=...,tpgt=123
> >
> > The virtio-scsi emulated device will make use of vhost-scsi to process
> > virtio-scsi requests inside the kernel and hand them to the in-kernel
> > SCSI target stack using the tcm_vhost fabric driver.
<SNIP>
> > +static VHostSCSI *vhost_scsi_add(const char *id, const char *wwpn,
> > + uint16_t tpgt)
> > +{
> > + VHostSCSI *vs = g_malloc0(sizeof(*vs));
> > + int ret;
> > +
> > + /* TODO set up vhost-scsi device and bind to
> > tcm_vhost/$wwpm/tpgt_$tpgt */
> > + fprintf(stderr, "wwpn = \"%s\" tpgt = \"%u\"\n", id, tpgt);
> > +
> > + ret = vhost_dev_init(&vs->dev, -1, "/dev/vhost-scsi", false);
>
> This -1 is a hack. You need to support passing in fd from
> the monitor, and pass it here.
>
Mmm, looking at how vhost_net_init + tap.c does this, but am not quite
what fd needs to be propagated up for virtio-scsi -> vhost-scsi..
Can you please elaborate on this one a bit more..?
--nab
- Re: [Qemu-devel] [RFC-v2 4/6] virtio-scsi: Add start/stop functionality for vhost-scsi, (continued)
[Qemu-devel] [RFC-v2 5/6] virtio-scsi: Set max_target=0 during vhost-scsi operation, Nicholas A. Bellinger, 2012/08/13
[Qemu-devel] [RFC-v2 6/6] virtio-scsi: Fix incorrect VirtIOSCSI->cmd_vqs[0] definition, Nicholas A. Bellinger, 2012/08/13
[Qemu-devel] [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost, Nicholas A. Bellinger, 2012/08/13
Re: [Qemu-devel] [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost, Michael S. Tsirkin, 2012/08/13
Re: [Qemu-devel] [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost, Blue Swirl, 2012/08/13