STRUCT AP_MATRIX_MDEV(9)
π struct ap_matrix_mdev(9) π
okay so bestie, welcome to the Kernel API Manual page for struct ap_matrix_mdev β it's giving "the data associated with a matrix mediated device" and honestly? it's a whole vibe. this struct is basically the main character of the vfio_ap world, holding everything the kernel needs to know about one of these bad boys. let's get into it π
β¨ SYNOPSIS β¨
struct ap_matrix_mdev {
struct vfio_device vdev;
struct list_head node;
struct ap_matrix matrix;
struct ap_matrix shadow_apcb;
struct kvm *kvm;
crypto_hook pqap_hook;
struct mdev_device *mdev;
struct ap_queue_table qtable;
struct eventfd_ctx *req_trigger;
struct eventfd_ctx *cfg_chg_trigger;
unsigned long apm_add[BITS_TO_LONGS( AP_DEVICES)];
unsigned long aqm_add[BITS_TO_LONGS( AP_DOMAINS)];
unsigned long adm_add[BITS_TO_LONGS( AP_DOMAINS)];
};
like, that's the whole shape of it. iconic. no notes. π«Ά
πΈ Members πΈ
here's the member-by-member breakdown, because every single field matters and we are not skipping any of them:
vdevβ the vfio device πnodeβ this is what lets theap_matrix_mdevstruct get added onto a list, lowkey doing the social-networking work of the struct worldmatrixβ the adapters, usage domains and control domains assigned to the mediated matrix device. the whole assigned squad, basically β¨shadow_apcbβ the shadow copy of the APCB field of the KVM guest's CRYCB. yes it's a mouthful, no we're not renaming it πkvmβ the struct holding guest's statepqap_hookβ the function pointer to the interception handler for thePQAP(AQIC)instruction. it's the bouncer at the club, catching that instruction on the way in π₯mdevβ the mediated deviceqtableβ table of queues (struct vfio_ap_queue) assigned to the mdev πreq_triggerβ eventfd ctx for signaling userspace to return a devicecfg_chg_triggerβ eventfd ctx to signal AP config changed to userspace. so userspace always knows when the AP config shifted, no surprises, we love communication π¦apm_addβ bitmap of APIDs added to the host's AP configurationaqm_addβ bitmap of APQIs added to the host's AP configurationadm_addβ bitmap of control domain numbers added to the host's AP configuration
ngl bestie, three separate bitmaps for three separate "added to the host's AP configuration" things β APIDs, APQIs, and control domain numbers. keep 'em straight and you're golden π
π¦ SEE ALSO π¦
- Kernel file
./drivers/s390/crypto/vfio_ap_private.h struct ap_matrix_dev(9)struct ap_matrix(9)struct ap_queue_table(9)struct vfio_ap_queue(9)
go read those too, iykyk πβ¨
and that's the whole page, bestie!! π this one came to you from the kernel file spot at ./drivers/s390/crypto, dated October 2026, and yeah β that's the struct ap_matrix_mdev(9) page, periodt. ππ slay responsibly π
π¦ 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