aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-sub-ui.c
diff options
context:
space:
mode:
authorTony Krowiak <[email protected]>2022-03-16 17:46:38 -0400
committerAlexander Gordeev <[email protected]>2022-07-19 16:18:10 +0200
commitb84eb8e05057f6f329e28f2563668340ea14184b (patch)
treeae7a2fa14b460e6a46b8e464f812bbdea4f21f2c /lib/mpi/mpi-sub-ui.c
parent21195eb038bcb4c21daef761e8b18f3cc9f22020 (diff)
s390/vfio-ap: use proper locking order when setting/clearing KVM pointer
The group notifier that handles the VFIO_GROUP_NOTIFY_SET_KVM event must use the required locks in proper locking order to dynamically update the guest's APCB. The proper locking order is: 1. matrix_dev->guests_lock: required to use the KVM pointer to update a KVM guest's APCB. 2. matrix_mdev->kvm->lock: required to update a KVM guest's APCB. 3. matrix_dev->mdevs_lock: required to store or access the data stored in a struct ap_matrix_mdev instance. Two macros are introduced to acquire and release the locks in the proper order. These macros are now used by the group notifier functions. Signed-off-by: Tony Krowiak <[email protected]> Reviewed-by: Jason J. Herne <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions