s390/vfio-ap: Ignore duplicate link requests in vfio_ap_mdev_link_queue
vfio_ap_mdev_link_queue is changed to detect if a matrix_mdev has already linked the given queue. If so, it bails out. Signed-off-by: "Jason J. Herne" <jjherne@linux.ibm.com> Reviewed-by: Tony Krowiak <akrowiak@linux.ibm.com> Link: https://lore.kernel.org/r/20240415152555.13152-4-jjherne@linux.ibm.com Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
This commit is contained in:
committed by
Alexander Gordeev
parent
e12aa0b5b2
commit
f3e3a4008c
@@ -794,10 +794,11 @@ err_put_vdev:
|
||||
static void vfio_ap_mdev_link_queue(struct ap_matrix_mdev *matrix_mdev,
|
||||
struct vfio_ap_queue *q)
|
||||
{
|
||||
if (q) {
|
||||
q->matrix_mdev = matrix_mdev;
|
||||
hash_add(matrix_mdev->qtable.queues, &q->mdev_qnode, q->apqn);
|
||||
}
|
||||
if (!q || vfio_ap_mdev_get_queue(matrix_mdev, q->apqn))
|
||||
return;
|
||||
|
||||
q->matrix_mdev = matrix_mdev;
|
||||
hash_add(matrix_mdev->qtable.queues, &q->mdev_qnode, q->apqn);
|
||||
}
|
||||
|
||||
static void vfio_ap_mdev_link_apqn(struct ap_matrix_mdev *matrix_mdev, int apqn)
|
||||
|
||||
Reference in New Issue
Block a user