]> git.baikalelectronics.ru Git - kernel.git/commit
vdpa/mlx5: Delete control vq iotlb in destroy_mr only when necessary
authorEugenio Pérez <eperezma@redhat.com>
Wed, 2 Aug 2023 17:12:20 +0000 (20:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Aug 2023 15:52:29 +0000 (17:52 +0200)
commitcba26abc3f9485871eadd4c8015be3dd4f739a73
tree6c117e0e424a7f51e69eae7c507ef3ae925e6980
parentbb4983ec9e752c4cb73b76e6d6e904feac371205
vdpa/mlx5: Delete control vq iotlb in destroy_mr only when necessary

[ Upstream commit ad03a0f44cdb97b46e5c84ed353dac9b8ae2c276 ]

mlx5_vdpa_destroy_mr can be called from .set_map with data ASID after
the control virtqueue ASID iotlb has been populated. The control vq
iotlb must not be cleared, since it will not be populated again.

So call the ASID aware destroy function which makes sure that the
right vq resource is destroyed.

Fixes: 8fcd20c30704 ("vdpa/mlx5: Support different address spaces for control and data")
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Message-Id: <20230802171231.11001-5-dtatulea@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/vdpa/mlx5/core/mlx5_vdpa.h
drivers/vdpa/mlx5/core/mr.c
drivers/vdpa/mlx5/net/mlx5_vnet.c