STRUCT AP_MATRIX(9)
β¨ 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' inapm. 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 inaqm. 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 inadm. Same energy asaqm_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.hstructap_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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms