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: sta...@dpdk.org
>
> Signed-off-by: Adrian Moreno <amore...@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.coque...@redhat.com>
I will fix the fixline while applying.
Thanks!
Maxime