OSDN Git Service

vdpa/mlx5: Avoid overwriting CVQ iotlb
authorEli Cohen <elic@nvidia.com>
Mon, 14 Nov 2022 13:17:56 +0000 (15:17 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 28 Dec 2022 10:28:09 +0000 (05:28 -0500)
commit38fc462f57ef4e5dc722bab6824854b105de8aa2
tree85d3c4261aadb76c5c57f735696255ea4fefb5a5
parent0dbc1b4ae07d003b2e88ba9d4142846320f8e349
vdpa/mlx5: Avoid overwriting CVQ iotlb

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>
drivers/vdpa/mlx5/core/mlx5_vdpa.h
drivers/vdpa/mlx5/core/mr.c
drivers/vdpa/mlx5/net/mlx5_vnet.c