diff options
author | Tony Krowiak <akrowiak@linux.ibm.com> | 2022-08-23 11:06:42 -0400 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2022-09-21 22:33:16 +0200 |
commit | 1918f2b20c3de73ef6f644979896e20a2e7dbb2d (patch) | |
tree | 680e2b9f75660cd2359e8070ab22d19244b73140 /drivers/ras | |
parent | 8d96bba75a43ba564bf8732e955d9f519d2bbaec (diff) | |
download | linux-stable-1918f2b20c3de73ef6f644979896e20a2e7dbb2d.tar.gz linux-stable-1918f2b20c3de73ef6f644979896e20a2e7dbb2d.tar.bz2 linux-stable-1918f2b20c3de73ef6f644979896e20a2e7dbb2d.zip |
s390/vfio-ap: bypass unnecessary processing of AP resources
It is not necessary to go through the process of validation, linking of
queues to mdev and vice versa and filtering the APQNs assigned to the
matrix mdev to build an AP configuration for a guest if an adapter or
domain being assigned is already assigned to the matrix mdev. Likewise, it
is not necessary to proceed through the process the unassignment of an
adapter, domain or control domain if it is not assigned to the matrix mdev.
Since it is not necessary to process assignment of a resource already
assigned or process unassignment of a resource that is been assigned,
this patch will bypass all assignment/unassignment operations for an
adapter, domain or control domain under these circumstances.
Not only is assignment of a duplicate adapter or domain unnecessary, it
will also cause a hang situation when removing the matrix mdev to which it is
assigned. The reason is because the same vfio_ap_queue objects with an
APQN containing the APID of the adapter or APQI of the domain being
assigned will get added multiple times to the hashtable that holds them.
This results in the pprev and next pointers of the hlist_node (mdev_qnode
field in the vfio_ap_queue object) pointing to the queue object itself
resulting in an interminable loop when the mdev is removed and the queue
table is iterated to reset the queues.
Cc: stable@vger.kernel.org
Fixes: 11cb2419fafe ("s390/vfio-ap: manage link between queue struct and matrix mdev")
Reported-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/ras')
0 files changed, 0 insertions, 0 deletions