]> git.baikalelectronics.ru Git - kernel.git/commit
s390/vfio-ap: allow assignment of unavailable AP queues to mdev device
authorTony Krowiak <akrowiak@linux.ibm.com>
Tue, 15 Dec 2020 02:14:54 +0000 (21:14 -0500)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Tue, 19 Jul 2022 14:18:09 +0000 (16:18 +0200)
commitfc58a2eda91bb6351964fdf40f4a85eb87dc97eb
tree311cfd66f24cbefa7222af0a7610a89cbe2dd7ad
parent30749d99777a56842c160c85906e257eb2eed728
s390/vfio-ap: allow assignment of unavailable AP queues to mdev device

The current implementation does not allow assignment of an AP adapter or
domain to an mdev device if each APQN resulting from the assignment
does not reference an AP queue device that is bound to the vfio_ap device
driver. This patch allows assignment of AP resources to the matrix mdev as
long as the APQNs resulting from the assignment:
   1. Are not reserved by the AP BUS for use by the zcrypt device drivers.
   2. Are not assigned to another matrix mdev.

The rationale behind this is that the AP architecture does not preclude
assignment of APQNs to an AP configuration profile that are not available
to the system.

Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
drivers/s390/crypto/vfio_ap_ops.c