numam-dpdk/lib/librte_vhost
Adrian Moreno 4f37df14c4 vhost: protect log address translation in IOTLB update
Currently, the log address translation only  happens in the vhost-user's
translate_ring_addresses(). However, the IOTLB update handler is not
checking if it was mapped to re-trigger that translation.

Since the log address mapping could fail, check it on iotlb updates.
Also, check it on vring_translate() so we do not dirty pages if the
logging address is not yet ready.

Additionally, properly protect the accesses to the iotlb structures.

Fixes: fbda9f1459 ("vhost: translate incoming log address to GPA")
Cc: stable@dpdk.org

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2020-02-14 12:42:13 +01:00
..
fd_man.c vhost: fix race condition when adding fd in the fdset 2018-12-21 16:22:40 +01:00
fd_man.h vhost: fix race condition when adding fd in the fdset 2018-12-21 16:22:40 +01:00
iotlb.c vhost: add dynamic logging system 2020-01-17 19:46:01 +01:00
iotlb.h vhost: replace IOTLB license with SPDX tag 2019-08-05 16:06:11 +02:00
Makefile build: remove individual library versions 2019-11-20 23:05:39 +01:00
meson.build build: remove individual library versions 2019-11-20 23:05:39 +01:00
rte_vdpa.h enforce experimental tag at beginning of declarations 2019-06-29 19:04:48 +02:00
rte_vhost_crypto.h enforce experimental tag at beginning of declarations 2019-06-29 19:04:48 +02:00
rte_vhost_version.map vhost: support config change slave message 2020-01-17 19:46:26 +01:00
rte_vhost.h vhost: support config change slave message 2020-01-17 19:46:26 +01:00
socket.c vhost: do not treat empty socket message as error 2020-02-05 11:47:18 +01:00
vdpa.c vhost: convert buffer addresses to GPA for logging 2019-10-23 16:43:09 +02:00
vhost_crypto.c vhost/crypto: fix fetch size 2020-02-05 11:47:18 +01:00
vhost_user.c vhost: protect log address translation in IOTLB update 2020-02-14 12:42:13 +01:00
vhost_user.h vhost: support config change slave message 2020-01-17 19:46:26 +01:00
vhost.c vhost: protect log address translation in IOTLB update 2020-02-14 12:42:13 +01:00
vhost.h vhost: protect log address translation in IOTLB update 2020-02-14 12:42:13 +01:00
virtio_crypto.h vhost: add virtio crypto header file 2018-04-14 00:43:30 +02:00
virtio_net.c vhost: flush shadow Tx if no more packets 2020-02-05 11:47:18 +01:00