s390/ap: implement SE AP bind, unbind and associate
authorHarald Freudenberger <freude@linux.ibm.com>
Fri, 10 Mar 2023 16:46:49 +0000 (17:46 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Mon, 20 Mar 2023 10:12:49 +0000 (11:12 +0100)
commit2d72eaf036d2f2b7ec16cda2d0e7ce292537dad9
treef1bb1e46d956db7f1e6d308b6b869b83ee42727f
parent263c8454dbffd4b878ea9bb403e157a56de98aca
s390/ap: implement SE AP bind, unbind and associate

Implementation of the new functions for SE AP support:
bind, unbind and associate. There are two new sysfs
attributes for this:

/sys/devices/ap/cardxx/xx.yyyy/se_bind
/sys/devices/ap/cardxx/xx.yyyy/se_associate

Writing a 1 into the se_bind attribute triggers the
SE AP bind for this AP queue, writing a 0 into does
an unbind - that's a reset (RAPQ) with the F bit enabled.

The se_associate attribute needs an integer value in
range 0...2^16-1 written in. This is the index into a
secrets table feed into the ultravisor. For more details
please see the Architecture documents.

These both new ap queue attributes are only visible
inside a SE guest with SB (Secure Binding) available.

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>
arch/s390/include/asm/ap.h
drivers/s390/crypto/ap_bus.h
drivers/s390/crypto/ap_queue.c