Setting the LPAR configuration status

7.1 LPAR mode

You can use the HMC or SE to control which of the cryptographic devices that the hardware definition assigns to an LPAR are also available to operating systems within that LPAR. From a Linux® instance in LPAR mode, you can control device availability by setting the device configuration status for the LPAR in which it runs.

The LPAR configuration status of a cryptographic device persists across reboots and also applies if a different operating system is IPLed in the LPAR. Use the chzcrypt command to set the LPAR configuration status of cryptographic devices.

Cryptographic devices with an LPAR configuration status configured are available to the operating system that runs in the LPAR, devices with an LPAR configuration status not configured are not available. The configuration status of a cryptographic device extends to all associated AP queues.

Procedure

  • Preferably, use the chzcrypt command with the --config-on option to configure cryptographic devices and the associated AP queues for an LPAR, or use the --config-off option to change the status to not configured for the LPAR.
    Examples:
    • To configure cryptographic devices 0, 1, 4, 5, and 12, issue:
      # chzcrypt --config-on 0x00 0x01 0x04 0x05 0x0C
    • To configure all available cryptographic devices and their associated AP queues, issue:
      # chzcrypt --config-on -a
  • Alternatively, write 1 to the config sysfs attribute of a cryptographic device to configure the device, or write 0 to set the device status to not configured.
    Examples:
    • To configure a cryptographic device with adapter ID 0x04 for the LPAR, issue:
      # echo 1 > /sys/bus/ap/devices/card04/config
    • To set the LPAR configuration status of a cryptographic device with adapter ID 0x04 to not configured, issue:
      # echo 0 > /sys/bus/ap/devices/card04/config
    • To check the LPAR configuration status of the cryptographic device with adapter ID 0x04, issue:
      # cat /sys/bus/ap/devices/card04/config
      0
      The value is 1 if the device is configured or 0 otherwise.
      Alternatively, use the lszcrypt command to display the status.
      # lszcrypt
      CARD.DOMAIN TYPE  MODE        STATUS    REQUESTS
      ------------------------------------------------
      ...
      04          CEX7A Accelerator deconfig         0
      04.0011     CEX7A Accelerator deconfig         0
      04.0036     CEX7A Accelerator deconfig         0
      ...
      Status deconfig indicates that the device is not configured for the LPAR.

What to do next

For configured cryptographic devices, you can now set the device and any associated AP queues online in Linux, see Setting devices online or offline.