]> git.baikalelectronics.ru Git - kernel.git/commit
vdpa/mlx5: Avoid overwriting CVQ iotlb
authorEli Cohen <elic@nvidia.com>
Mon, 14 Nov 2022 13:17:56 +0000 (15:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jan 2023 06:24:31 +0000 (07:24 +0100)
commitd8e926c3da60d981b0397ee8ea9f77ae542cda43
tree2c4550e82dc238899ce98a80b1de14806a399641
parentceaaedc9a4e2fae4e65b2cdd65ad4126d1da534e
vdpa/mlx5: Avoid overwriting CVQ iotlb

[ Upstream commit 74d6c45c1e54f6cd7236b42aa2e2ff511ab3d9ad ]

When qemu uses different address spaces for data and control virtqueues,
the current code would overwrite the control virtqueue iotlb through the
dup_iotlb call. Fix this by referring to the address space identifier
and the group to asid mapping to determine which mapping needs to be
updated. We also move the address space logic from mlx5 net to core
directory.

Reported-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Eli Cohen <elic@nvidia.com>
Message-Id: <20221114131759.57883-6-elic@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Eugenio Pérez <eperezma@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