[dpdk-dev] [PATCH] vhost: protect log addr translation in iotlb updates
Maxime Coquelin
maxime.coquelin at redhat.com
Thu Feb 13 17:18:00 CET 2020
On 2/13/20 11:04 AM, Adrian Moreno wrote:
> 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: 657414f3788a ("vhost: protect log addr translation in iotlb updates")
> Cc: stable at dpdk.org
>
> Signed-off-by: Adrian Moreno <amorenoz at redhat.com>
> ---
> lib/librte_vhost/vhost.c | 55 +++++++++++++++++++++++++++++++++
> lib/librte_vhost/vhost.h | 15 +++++++--
> lib/librte_vhost/vhost_user.c | 57 +++++++++++++++--------------------
> 3 files changed, 92 insertions(+), 35 deletions(-)
>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
I will fix the fixline while applying.
Thanks!
Maxime
More information about the dev
mailing list