<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/vhost, branch v3.9</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/vhost?h=v3.9</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/vhost?h=v3.9'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-04-12T22:26:42Z</updated>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending</title>
<updated>2013-04-12T22:26:42Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-04-12T22:26:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bf81710c4b6e2df2cc047f7c8e1f342511904b74'/>
<id>urn:sha1:bf81710c4b6e2df2cc047f7c8e1f342511904b74</id>
<content type='text'>
Pull SCSI target fixes from Nicholas Bellinger:
 "Here are remaining target-pending items for v3.9-rc7 code.

  The tcm_vhost patches are more than I'd usually include in a -rc7
  pull, but are changes required for v3.9 to work correctly with the
  pending vhost-scsi-pci QEMU upstream series merge.  (Paolo CC'ed)

  Plus Asias's conversion to use vhost_virtqueue-&gt;private_data + RCU for
  managing vhost-scsi endpoints has gotten alot of review + testing over
  the past weeks, and MST has ACKed the full series.

  Also, there is a target patch to fix a long-standing bug within
  control CDB handling with Standby/Offline/Transition ALUA port access
  states, that had been incorrectly rejecting the control CDBs required
  for LUN scan to work during these port group states.  CC'ing to
  stable."

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs
  tcm_vhost: Send bad target to guest when cmd fails
  tcm_vhost: Add vhost_scsi_send_bad_target() helper
  tcm_vhost: Fix tv_cmd leak in vhost_scsi_handle_vq
  tcm_vhost: Remove double check of response
  tcm_vhost: Initialize vq-&gt;last_used_idx when set endpoint
  tcm_vhost: Use vq-&gt;private_data to indicate if the endpoint is setup
  tcm_vhost: Use ACCESS_ONCE for vs-&gt;vs_tpg[target] access
</content>
</entry>
<entry>
<title>tcm_vhost: Send bad target to guest when cmd fails</title>
<updated>2013-04-11T08:48:42Z</updated>
<author>
<name>Asias He</name>
<email>asias@redhat.com</email>
</author>
<published>2013-04-10T07:06:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=055f648c49d948de9452b0f1758869bbbd0097b8'/>
<id>urn:sha1:055f648c49d948de9452b0f1758869bbbd0097b8</id>
<content type='text'>
Send bad target to guest in case:
1) we can not allocate the cmd
2) fail to submit the cmd

Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>tcm_vhost: Add vhost_scsi_send_bad_target() helper</title>
<updated>2013-04-11T08:48:35Z</updated>
<author>
<name>Asias He</name>
<email>asias@redhat.com</email>
</author>
<published>2013-04-10T07:06:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=637ab21e284f4e9188acc2746695f7f6452b4a22'/>
<id>urn:sha1:637ab21e284f4e9188acc2746695f7f6452b4a22</id>
<content type='text'>
Share the send bad target code with other use cases.

Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>tcm_vhost: Fix tv_cmd leak in vhost_scsi_handle_vq</title>
<updated>2013-04-11T08:48:27Z</updated>
<author>
<name>Asias He</name>
<email>asias@redhat.com</email>
</author>
<published>2013-04-10T07:06:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7ea206cf3b06704cf2bfc9c9c395094b24dc44a2'/>
<id>urn:sha1:7ea206cf3b06704cf2bfc9c9c395094b24dc44a2</id>
<content type='text'>
If we fail to submit the allocated tv_vmd to tcm_vhost_submission_work,
we will leak the tv_vmd. Free tv_vmd on fail path.

Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>tcm_vhost: Remove double check of response</title>
<updated>2013-04-11T08:48:11Z</updated>
<author>
<name>Asias He</name>
<email>asias@redhat.com</email>
</author>
<published>2013-04-10T07:06:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f6da51c3ef07c593a410551af4cad093e2fbe755'/>
<id>urn:sha1:f6da51c3ef07c593a410551af4cad093e2fbe755</id>
<content type='text'>
We did the length of response check twice.

Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>tcm_vhost: Initialize vq-&gt;last_used_idx when set endpoint</title>
<updated>2013-04-08T21:09:54Z</updated>
<author>
<name>Asias He</name>
<email>asias@redhat.com</email>
</author>
<published>2013-04-03T06:17:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dfd5d5692c7ddf27380511b80a3dc590acfc4eee'/>
<id>urn:sha1:dfd5d5692c7ddf27380511b80a3dc590acfc4eee</id>
<content type='text'>
This patch fixes guest hang when booting seabios and guest.

  [    0.576238] scsi0 : Virtio SCSI HBA
  [    0.616754] virtio_scsi virtio1: request:id 0 is not a head!

vq-&gt;last_used_idx is initialized only when /dev/vhost-scsi is
opened or closed.

   vhost_scsi_open -&gt; vhost_dev_init() -&gt; vhost_vq_reset()
   vhost_scsi_release() -&gt; vhost_dev_cleanup -&gt; vhost_vq_reset()

So, when guest talks to tcm_vhost after seabios does, vq-&gt;last_used_idx
still contains the old valule for seabios. This confuses guest.

Fix this by calling vhost_init_used() to init vq-&gt;last_used_idx when
we set endpoint.

Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>tcm_vhost: Use vq-&gt;private_data to indicate if the endpoint is setup</title>
<updated>2013-04-08T21:07:00Z</updated>
<author>
<name>Asias He</name>
<email>asias@redhat.com</email>
</author>
<published>2013-04-03T06:17:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4f7f46d32c9875004fae1d57ae3c02cc2e6cd6a3'/>
<id>urn:sha1:4f7f46d32c9875004fae1d57ae3c02cc2e6cd6a3</id>
<content type='text'>
Currently, vs-&gt;vs_endpoint is used indicate if the endpoint is setup or
not. It is set or cleared in vhost_scsi_set_endpoint() or
vhost_scsi_clear_endpoint() under the vs-&gt;dev.mutex lock. However, when
we check it in vhost_scsi_handle_vq(), we ignored the lock.

Instead of using the vs-&gt;vs_endpoint and the vs-&gt;dev.mutex lock to
indicate the status of the endpoint, we use per virtqueue
vq-&gt;private_data to indicate it. In this way, we can only take the
vq-&gt;mutex lock which is per queue and make the concurrent multiqueue
process having less lock contention. Further, in the read side of
vq-&gt;private_data, we can even do not take the lock if it is accessed in
the vhost worker thread, because it is protected by "vhost rcu".

(nab: Do s/VHOST_FEATURES/~VHOST_SCSI_FEATURES)

Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>tcm_vhost: Use ACCESS_ONCE for vs-&gt;vs_tpg[target] access</title>
<updated>2013-04-02T23:43:34Z</updated>
<author>
<name>Asias He</name>
<email>asias@redhat.com</email>
</author>
<published>2013-04-02T15:31:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=af0d9187f66db2711f94dc20d5a06ec9ba5845b3'/>
<id>urn:sha1:af0d9187f66db2711f94dc20d5a06ec9ba5845b3</id>
<content type='text'>
In vhost_scsi_handle_vq:

      tv_tpg = vs-&gt;vs_tpg[target];
      if (!tv_tpg) {
              ....
              return
      }

      tv_cmd = vhost_scsi_allocate_cmd(tv_tpg, &amp;v_req,

1) vs-&gt;vs_tpg[target] might change after the NULL check and 2) the above
line might access tv_tpg from vs-&gt;vs_tpg[target]. To prevent 2), use
ACCESS_ONCE. Thanks mst for catching this up!

Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending</title>
<updated>2013-03-30T20:13:05Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-03-30T20:13:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=13d2080db3472b3399ba32e6026960de5d32a344'/>
<id>urn:sha1:13d2080db3472b3399ba32e6026960de5d32a344</id>
<content type='text'>
Pull SCSI target fixes from Nicholas Bellinger:
 "This includes the bug-fix for a &gt;= v3.8-rc1 regression specific to
  iscsi-target persistent reservation conflict handling (CC'ed to
  stable), and a tcm_vhost patch to drop VIRTIO_RING_F_EVENT_IDX usage
  so that in-flight qemu vhost-scsi-pci device code can detect the
  proper vhost feature bits.

  Also, there are two more tcm_vhost patches still being discussed by
  MST and Asias for v3.9 that will be required for the in-flight qemu
  vhost-scsi-pci device patch to function properly, and that should
  (hopefully) be the last target fixes for this round."

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  target: Fix RESERVATION_CONFLICT status regression for iscsi-target special case
  tcm_vhost: Avoid VIRTIO_RING_F_EVENT_IDX feature bit
</content>
</entry>
<entry>
<title>tcm_vhost: Avoid VIRTIO_RING_F_EVENT_IDX feature bit</title>
<updated>2013-03-29T06:42:47Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-03-28T00:23:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5dade71050e799d8679698a6145e2ba46cdeac2a'/>
<id>urn:sha1:5dade71050e799d8679698a6145e2ba46cdeac2a</id>
<content type='text'>
This patch adds a VHOST_SCSI_FEATURES mask minus VIRTIO_RING_F_EVENT_IDX
so that vhost-scsi-pci userspace will strip this feature bit once
GET_FEATURES reports it as being unsupported on the host.

This is to avoid a bug where -&gt;handle_kicks() are missed when EVENT_IDX
is enabled by default in userspace code.

(mst: Rename to VHOST_SCSI_FEATURES + add comment)

Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Asias He &lt;asias@redhat.com&gt;
Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
