Spdk/lib/vhost
Dariusz Stojaczyk fab374a7c6 vhost: destroy vhost device before updating public vring data
For now DPDK assumes that callfd, kickfd and last_idx are being set just
once during vring initialization and device cannot be running while DPDK
receives SET_VRING_KICK, SET_VRING_CALL and SET_VRING_BASE messages.
However, that assumption is wrong. For Vhost SCSI messages might arrive
at any point of time, possibly multiple times, one after another.

QEMU issues SET_VRING_CALL once during device initialization, then again
during device start. The second message will close previous callfd,
which is still being used by the user-implementation of vhost device.
This results in writing to invalid (closed) callfd.

This patch destroys vhost device before setting callfd, kickfd and last
vring indices. It will be recreated right after (with updated vring
data).

Change-Id: I293bd91106f53f6c2f65d8b8a41f47ae7548cddc
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2017-05-08 17:04:29 -07:00
..
linux vhost: add copy of virtio headers 2017-03-23 13:51:04 -07:00
rte_vhost vhost: Rename LOG_DEBUG to VHOST_LOG_DEBUG 2017-05-08 13:19:20 -07:00
rte_vhost_17_05 vhost: destroy vhost device before updating public vring data 2017-05-08 17:04:29 -07:00
Makefile vhost: enable VFIO 2017-04-24 12:20:04 -07:00
task.c include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
task.h vhost: add a library and app for userspace vhost-scsi processing 2017-03-06 12:44:35 -07:00
vhost_iommu.c include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
vhost_iommu.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
vhost_rpc.c include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
vhost.c include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00