STRUCT AP_MATRIX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct ap_matrix(9) ✨

Okay bestie, welcome to the Kernel API Manual β€” today we're decoding struct ap_matrix, and honestly? It's giving organized chaos in the best way. This is a matrix of adapters, domains and control domains, and it's lowkey iconic if you're into AP (that's Adjunct Processor, iykyk) stuff. No cap, let's get into it. πŸŽ€


🌸 SYNOPSIS 🌸

struct ap_matrix {
    unsigned long apm_max;
    unsigned long apm[BITS_TO_LONGS( AP_DEVICES)];
    unsigned long aqm_max;
    unsigned long aqm[BITS_TO_LONGS( AP_DOMAINS)];
    unsigned long adm_max;
    unsigned long adm[BITS_TO_LONGS( AP_DOMAINS)];
};

Not me showing you the whole struct verbatim because every single line matters. πŸ’…


πŸ¦‹ Members πŸ¦‹

  • apm_max β€” the max adapter number chillin' in apm. Think of it as the ceiling for the adapter IDs, bestie. ✨
  • apm β€” this one identifies the AP adapters in the matrix. It's literally the adapter squad roll call. 🫢
  • aqm_max β€” max domain number in aqm. The upper bound, the limit, the main character number. πŸ‘‘
  • aqm β€” identifies the AP queues (aka domains) in the matrix. Queues but make it domain-coded. 🌈
  • adm_max β€” max domain number in adm. Same energy as aqm_max, different mask. πŸ’œ
  • adm β€” identifies the AP control domains in the matrix. Control domains have entered the chat. πŸ”₯

πŸ’– Description πŸ’–

So here's the tea: the AP matrix is comprised of three bit masks identifying the adapters, queues (domains) and control domains that belong to an AP matrix.

The bits in each mask, from left to right, correspond to IDs 0 to 255. That's right β€” 256 possible IDs per mask, and when a bit is set, the corresponding ID belongs to the matrix. Simple as that, bestie. When it's not set? Not invited to the party. πŸ’€πŸŽ€

Fr fr, left to right = 0 to 255. Don't flip it, don't reverse it, just read it correctly. πŸ™ˆ

🌟 SEE ALSO 🌟

  • Kernel file ./drivers/s390/crypto/vfio_ap_private.h struct ap_matrix_dev(9)
  • struct ap_queue_table(9)
  • struct ap_matrix_mdev(9)
  • struct vfio_ap_queue(9)

Go read those too, they're all connected, it's a whole friend group. 🧚✨


Alright bestie, that's the whole page β€” sourced from ./drivers/s390/crypto, dated October 2026, and yes the footer really says that. Slay, bye! πŸ’…πŸŒΈπŸ’–

πŸ“¦ where this page comes from