AP queue status overview

Red Hat Enterprise Linux 9.2 LPAR mode z/VM guest KVM guest

Multiple configuration steps are required to make AP queues available to user space programs on Linux®.

Linux reflects the configuration progress in two configuration states of an AP queue:
LPAR configuration status
a hardware status that can either be configured or not configured.
Online status
a state, online or offline, that is controlled by the zcrypt device driver and that is maintained by the Linux kernel.

Changing the online status of an AP queue does not affect its LPAR configuration status. In contrast, changing the LPAR configuration status can affect a queue's online status. For example, changing the LPAR configuration status from not configured to configured also changes its online status from offline to online. AP queues that are not configured are always offline. Configured AP queues can be online or offline, but an AP queue that is not configured cannot be online.

An AP queue is available to cryptographic applications on Linux if its LPAR configuration status is configured and its on line status is online.

Figure 1. AP queue configuration steps and status
This graphic is explained in the text that follows it.
Figure 1 illustrates the steps for making AP queues available and how the steps affect the configuration states.
Assigning adapters and domains to the LPAR
You use the HMC to assign cryptographic adapters and domains to an LPAR. Implicitly, this assignment provides a matrix of AP queues to the LPAR. These queues can now be detected by operating systems in the LPAR.
Setting the LPAR configuration status of adapters
Before AP queues can be used by an operating system, the LPAR configuration status of the corresponding adapter must be set to configured. AP queues inherit the LPAR configuration status of the associated adapter.

Depending on the version, your HMC interface might show AP queues in the state not configured as Candidate and AP queues in the state configured as Candidate and Online. Do not confuse this online designation with the online status in Linux.

Although the LPAR configuration status is controlled by the HMC, you can trigger this setting from Linux, see Setting the LPAR configuration status.

Controlling the online status of AP queues in Linux
An AP queue can be used by a cryptographic application if it is online within Linux. Initially, all AP queues of an AP adapter are online when the LPAR configuration status of the adapter becomes configured.

For information about setting AP queues offline and back online, see Setting devices online or offline.