linux-stable/drivers/s390/crypto
Tony Krowiak 774d10196e s390/vfio-ap: let on_scan_complete() callback filter matrix and update guest's APCB
When adapters and/or domains are added to the host's AP configuration, this
may result in multiple queue devices getting created and probed by the
vfio_ap device driver. For each queue device probed, the matrix of adapters
and domains assigned to a matrix mdev will be filtered to update the
guest's APCB. If any adapters or domains get added to or removed from the
APCB, the guest's AP configuration will be dynamically updated (i.e., hot
plug/unplug). To dynamically update the guest's configuration, its VCPUs
must be taken out of SIE for the period of time it takes to make the
update. This is disruptive to the guest's operation and if there are many
queues probed due to a change in the host's AP configuration, this could be
troublesome. The problem is exacerbated by the fact that the
'on_scan_complete' callback also filters the mdev's matrix and updates
the guest's AP configuration.

In order to reduce the potential amount of disruption to the guest that may
result from a change to the host's AP configuration, let's bypass the
filtering of the matrix and updating of the guest's AP configuration in the
probe callback - if due to a host config change - and defer it until the
'on_scan_complete' callback is invoked after the AP bus finishes its device
scan operation. This way the filtering and updating will be performed only
once regardless of the number of queues added.

Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Fixes: 48cae940c3 ("s390/vfio-ap: refresh guest's APCB by filtering AP resources assigned to mdev")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240115185441.31526-4-akrowiak@linux.ibm.com
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-01-17 13:53:05 +01:00
..
ap_bus.c s390/ap: handle outband SE bind state change 2023-11-30 16:24:23 +01:00
ap_bus.h s390/ap: handle outband SE bind state change 2023-11-30 16:24:23 +01:00
ap_card.c s390/ap: store TAPQ hwinfo in struct ap_card 2023-11-30 16:24:23 +01:00
ap_debug.h s390/zcrypt: rework of debug feature messages 2021-10-26 15:21:27 +02:00
ap_queue.c s390/ap: handle outband SE bind state change 2023-11-30 16:24:23 +01:00
Makefile s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
pkey_api.c s390/zcrypt_ep11misc: support API ordinal 6 with empty pin-blob 2023-08-18 15:07:57 +02:00
vfio_ap_debug.h s390-vfio-ap: introduces s390 kernel debug feature for vfio_ap device driver 2022-02-06 23:31:29 +01:00
vfio_ap_drv.c s390 updates for the 6.4 merge window 2023-04-30 11:43:31 -07:00
vfio_ap_ops.c s390/vfio-ap: let on_scan_complete() callback filter matrix and update guest's APCB 2024-01-17 13:53:05 +01:00
vfio_ap_private.h s390/vfio-ap: use work struct to verify queue reset 2023-08-18 15:09:29 +02:00
zcrypt_api.c s390/ap: store TAPQ hwinfo in struct ap_card 2023-11-30 16:24:23 +01:00
zcrypt_api.h s390/zcrypt: cleanup some debug code 2023-07-03 11:19:41 +02:00
zcrypt_card.c s390/zcrypt: don't report online if card or queue is in check-stop state 2023-11-05 22:34:57 +01:00
zcrypt_cca_key.h s390/zcrypt: rework arrays with length zero occurrences 2023-04-19 16:47:31 +02:00
zcrypt_ccamisc.c s390: fix various typos 2023-07-03 11:19:42 +02:00
zcrypt_ccamisc.h s390: fix various typos 2023-07-03 11:19:42 +02:00
zcrypt_cex2a.c s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_cex2a.h s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_cex2c.c s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_cex2c.h s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_cex4.c s390/ap: store TAPQ hwinfo in struct ap_card 2023-11-30 16:24:23 +01:00
zcrypt_cex4.h
zcrypt_debug.h s390/zcrypt: rework of debug feature messages 2021-10-26 15:21:27 +02:00
zcrypt_ep11misc.c s390/zcrypt_ep11misc: support API ordinal 6 with empty pin-blob 2023-08-18 15:07:57 +02:00
zcrypt_ep11misc.h s390/zcrypt_ep11misc: support API ordinal 6 with empty pin-blob 2023-08-18 15:07:57 +02:00
zcrypt_error.h s390/ap: show APFS value on error reply 0x8B 2023-10-16 13:04:09 +02:00
zcrypt_msgtype6.c s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_msgtype6.h s390/zcrypt: code cleanup 2022-04-25 13:54:14 +02:00
zcrypt_msgtype50.c s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_msgtype50.h s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_queue.c s390/zcrypt: don't report online if card or queue is in check-stop state 2023-11-05 22:34:57 +01:00