linux-stable/drivers/s390/crypto
Harald Freudenberger 778412ab91 s390/ap: rearm APQNs bindings complete completion
The APQN bindings complete completion was used to reflect
that 1st the AP bus initial scan is done and 2nd all the
detected APQNs have been bound to a device driver.
This was a single-shot action. However, as the AP bus
supports hot-plug it may be that new APQNs appear reflected
as new AP queue and card devices which need to be bound
to appropriate device drivers. So the condition that
all existing AP queue devices are bound to device drivers
may go away for a certain time.

This patch now checks during AP bus scan for maybe new AP
devices appearing and does a re-init of the internal completion
variable. So the AP bus function ap_wait_apqn_bindings_complete()
now may block on this condition variable even later after
initial scan is through when new APQNs appear which need to
get bound.

This patch also moves the check for binding complete invocation
from the probe function to the end of the AP bus scan function.
This change also covers some weird scenarios where during a
card hotplug the binding of the card device was sufficient for
binding complete but the queue devices where still in the
process of being discovered.

As of now this change has no impact on existing code. The
behavior change in the now later bindings complete should not
impact any code (and has been tested so far). The only
exploiter is the zcrypt function zcrypt_wait_api_operational()
which only initial calls ap_wait_apqn_bindings_complete().

However, this new behavior of the AP bus wait for APQNs bindings
complete function will be used in a later patch exploiting
this for the zcrypt API layer.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2024-03-07 14:41:14 +01:00
..
ap_bus.c s390/ap: rearm APQNs bindings complete completion 2024-03-07 14:41:14 +01:00
ap_bus.h s390/ap: rearm APQNs bindings complete completion 2024-03-07 14:41:14 +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: introduce dynamic debugging for AP and zcrypt code 2024-02-16 14:30:12 +01:00
ap_queue.c s390/ap: add debug possibility for AP messages 2024-02-16 14:30:13 +01:00
Makefile s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
pkey_api.c s390/pkey: introduce dynamic debugging for pkey 2024-02-16 14:30:13 +01: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/vfio-ap: make matrix_bus const 2024-02-09 13:58:16 +01:00
vfio_ap_ops.c s390/vfio-ap: handle hardware checkstop state on queue reset operation 2024-03-07 14:41:14 +01:00
vfio_ap_private.h s390/vfio-ap: reset queues filtered from the guest's AP config 2024-01-17 13:53:05 +01:00
zcrypt_api.c s390/ap: rearm APQNs bindings complete completion 2024-03-07 14:41:14 +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/zcrypt: harmonize debug feature calls and defines 2024-02-16 14:30:12 +01: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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
zcrypt_debug.h s390/zcrypt: introduce dynamic debugging for AP and zcrypt code 2024-02-16 14:30:12 +01:00
zcrypt_ep11misc.c s390/zcrypt: harmonize debug feature calls and defines 2024-02-16 14:30:12 +01: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: introduce dynamic debugging for AP and zcrypt code 2024-02-16 14:30:12 +01:00
zcrypt_msgtype6.h s390/zcrypt: code cleanup 2022-04-25 13:54:14 +02:00
zcrypt_msgtype50.c s390/zcrypt: introduce dynamic debugging for AP and zcrypt code 2024-02-16 14:30:12 +01: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