alistair23-linux/drivers/vhost
Asias He dfd5d5692c tcm_vhost: Initialize vq->last_used_idx when set endpoint
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->last_used_idx is initialized only when /dev/vhost-scsi is
opened or closed.

   vhost_scsi_open -> vhost_dev_init() -> vhost_vq_reset()
   vhost_scsi_release() -> vhost_dev_cleanup -> vhost_vq_reset()

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

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

Signed-off-by: Asias He <asias@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2013-04-08 14:09:54 -07:00
..
Kconfig drivers/vhost: remove depends on CONFIG_EXPERIMENTAL 2013-01-21 14:52:45 -08:00
Kconfig.tcm drivers/vhost: remove depends on CONFIG_EXPERIMENTAL 2013-01-21 14:52:45 -08:00
Makefile
net.c vhost_net: handle polling errors when setting backend 2013-01-29 15:43:03 -05:00
tcm_vhost.c tcm_vhost: Initialize vq->last_used_idx when set endpoint 2013-04-08 14:09:54 -07:00
tcm_vhost.h tcm_vhost: Multi-queue support 2013-02-13 11:30:14 -08:00
test.c
test.h
vhost.c vhost_net: handle polling errors when setting backend 2013-01-29 15:43:03 -05:00
vhost.h vhost_net: handle polling errors when setting backend 2013-01-29 15:43:03 -05:00