[dpdk-dev] [PATCH v2] vhost: flush IOTLB cache on new mem table handling
Jens Freimann
jfreiman at redhat.com
Fri Aug 3 13:27:33 CEST 2018
On Thu, Aug 02, 2018 at 07:21:22PM +0200, Maxime Coquelin wrote:
>IOTLB entries contain the host virtual address of the guest
>pages. When receiving a new VHOST_USER_SET_MEM_TABLE request,
>the previous regions get unmapped, so the IOTLB entries, if any,
>will be invalid. It does cause the vhost-user process to
>segfault.
>
>This patch introduces a new function to flush the IOTLB cache,
>and call it as soon as the backend handles a VHOST_USER_SET_MEM
>request.
>
>Fixes: 69c90e98f483 ("vhost: enable IOMMU support")
>Cc: stable at dpdk.org
>
>Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
>---
>Changes since v1:
>- Fix indentation (Stephen)
>- Fix double iotlb-lock lock
>
> lib/librte_vhost/iotlb.c | 10 ++++++++--
> lib/librte_vhost/iotlb.h | 2 +-
> lib/librte_vhost/vhost_user.c | 5 +++++
> 3 files changed, 14 insertions(+), 3 deletions(-)
>
Reviewed-by: Jens Freimann <jfreimann at redhat.com>
More information about the dev
mailing list