numam-spdk/lib
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
..
bdev include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
blob include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
blobfs include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
conf include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
copy include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
cunit include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
env_dpdk include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
event include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
ioat include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
iscsi include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
json include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
jsonrpc include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
log include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
net build: Automatically detect use of POSIX includes 2017-05-08 13:20:37 -07:00
nvme include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
nvmf include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
rpc include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
scsi include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
trace include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
util include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
vhost vhost: destroy vhost device before updating public vring data 2017-05-08 17:04:29 -07:00
Makefile blobfs: Add a lightweight filesystem built on the blobstore 2017-03-24 14:15:45 -07:00