Dynamically adding and removing cryptographic adapters
On an LPAR, you can add or remove cryptographic adapters without the need to reactivate the LPAR after a configuration change.
About this task
z/VM® does not support dynamically adding or removing cryptographic adapters.
Linux attempts to detect new cryptographic adapters and set them online every time a configuration timer expires. Read or modify the expiration time with the lszcrypt and chzcrypt commands.
Adding or removing of cryptographic adapters to or from an LPAR is transparent to applications that use clear key functions. If a cryptographic adapter is removed while cryptographic requests are being processed, the device driver automatically resubmits lost requests to the remaining adapters. Special handling is required for secure key.
Secure key requests are submitted to a dedicated cryptographic coprocessor. If this coprocessor is removed or lost, new requests cannot be submitted to a different coprocessor. Therefore, dynamically adding and removing adapters with a secure key application requires support within the application. For more information about secure key cryptography, see Secure Key Solution with the Common Cryptographic Architecture Application Programmer's Guide, SC33-8294. You can obtain this publication at www.ibm.com/support/knowledgecenter/linuxonibm/liaaf/lnz_r_cca.html .
Alternatively, you can
read or set the polling time through the config_time
sysfs
attribute. This read-write attribute can be found at the AP bus level. Valid values
for the config_time
sysfs attribute are in the range 5 - 120 seconds.
Procedure
You can work with cryptographic adapters in the following ways:
- Add or remove cryptographic adapters by using the SE or
HMC. After the configuration timer expires, the cryptographic adapter is added to or removed from Linux, and the corresponding sysfs entries are created or deleted.
- Enable or disable a cryptographic adapter by using the chzcrypt command.
The cryptographic adapter is only set online or offline in sysfs. The sysfs entries for the cryptographic adapter are retained. Use the lszcrypt command to check the results of the chzcrypt command.
Examples
- To use the lszcrypt and chzcrypt commands
to find out the current configuration timer setting, issue:
In the example, the timer is set to 30 seconds.# lszcrypt -b ... config_time=30 (seconds) ...
- To set the configuration timer to 60 seconds, issue:
# chzcrypt -c 60
- To read the configuration timer setting, issue:
# cat /sys/bus/ap/config_time
- To set the configuration timer to 60 seconds, issue:
# echo 60 > /sys/bus/ap/config_time