Binding an accelerator AP queue using the pvapconfig command

You can use the pvapconfig command to implement AP queue device configurations that are defined in a YAML configuration file to bind an AP queue from a Crypto Express adapter that is configured as an accelerator.

About this task

To use a Crypto Express adapter in accelerator mode, all you need to do is bind it to the secure guest.

You use a YAML configuration file with the specifications of your Crypto Express adapters as input for the pvapconfig command. The command triggers a search for AP queues that are available to the secure guest and that satisfy the specifications in the YAML configuration file. All AP queues that satisfy the entries in the YAML configuration file are bound to the guest.

Any existing AP queue configurations that do not match any of the entries in the configuration file are reset and unbound.

Procedure

  1. Optionally, on the secure-execution guest, list the available AP queues.
    Use the lszcrypt command with the -V option to see AP queues listed under SESTAT.
    For example:
    [secguest]: lszcrypt -V
    CARD.DOMAIN  TYPE   MODE        STATUS  REQ... PENDING HWTYPE QDEPTH FUNCTIONS   DRIVER    SESTAT
    --------------------------------------------------------------------------------------------------------
    00           CEX8A  Accelerator online       0       0     14     08 -MC-A-NF-   cex4card  -
    00.0005      CEX8A  Accelerator online       0       0     14     08 -MC-A-NF-   cex4queue unbound
    00.0042      CEX8A  Accelerator online       0       0     14     08 -MC-A-NF-   cex4queue unbound
    03           CEX8A  Accelerator online       0       0     13     08 -MC-A-NF-   cex4card -
    03.0005      CEX8A  Accelerator online       0       0     13     08 -MC-A-NF-   cex4queue unbound
    03.0042      CEX8A  Accelerator online       0       0     13     08 -MC-A-NF-   cex4queue unbound
    In the SESTAT column, AP queues that are available for binding are marked unbound.
  2. Create a pvapconfig configuration file (a .yaml file) with an entry that describes the Crypto Express adapters from which you want to use AP queues.
    For example, a simple pvapconfig configuration file can look like this:
    # my_acc_apconfig.yaml, a configuration file for an accelerator
    - name: my Accelerator
      mode: Accel
      mingen: CEX8
    where:
    • name is optional and any name you give the configuration.
    • mode must be Accel for an accelerator.
    • mingen must be CEX8.

    For details about the syntax of the .yaml file, see pvapconfig configuration file.

  3. Run the pvapconfig command with your .yaml configuration file as input.
    The command now attempts to establish the configuration in the configuration file.
    For example:
    [secguest]# pvapconfig my_acc_apconfig.yaml

    For details about the pvapconfig command, see pvapconfig - Implement an AP queue configuration.

  4. Optionally confirm that the AP queues are now bound and usable.
    Use the lszcrypt command again to check that the status of the available AP queues is now usable.
    For example:
    [secguest]: lszcrypt -V
    CARD.DOMAIN  TYPE   MODE        STATUS  REQ... PENDING HWTYPE QDEPTH FUNCTIONS   DRIVER   SESTAT
    --------------------------------------------------------------------------------------------------------
    00           CEX8A  Accelerator online       0       0     14     08 -MC-A-NF-   cex4card  -
    00.0005      CEX8A  Accelerator online       0       0     14     08 -MC-A-NF-   cex4queue usable
    00.0042      CEX8A  Accelerator online       0       0     14     08 -MC-A-NF-   cex4queue usable
    03           CEX8A  Accelerator online       0       0     13     08 -MC-A-NF-   cex4card -
    03.0005      CEX8A  Accelerator online       0       0     13     08 -MC-A-NF-   cex4queue usable
    03.0042      CEX8A  Accelerator online       0       0     13     08 -MC-A-NF-   cex4queue usable
    AP queues that are available for binding are marked usable.

What to do next

To unbind AP queues, remove them from the configuration file and run pvapconfig again. If the pvapconfig command finds AP queues that are bound, but no longer exist in the configuration file, it attempts to unbind them.