STRUCT AP_MATRIX_DEV(9)
π struct ap_matrix_dev(9)
okay bestie, so this is a page straight out of the Kernel API Manual β it's all about struct ap_matrix_dev, which (per the NAME, no cap) contains the data for the matrix device. That's the whole vibe. Let's get into it β¨
πΈ NAME
struct ap_matrix_dev β contains the data for the matrix device. yes that's it, that's the whole assignment, and she ate π
π SYNOPSIS
here's the whole struct, copied exactly, do not touch, do not "clean up", do not rename anything, i'm watching you π
struct ap_matrix_dev {
struct device device;
struct ap_config_info info;
struct list_head mdev_list;
struct mutex mdevs_lock;
struct ap_driver *vfio_ap_drv;
struct mutex guests_lock;
struct mdev_parent parent;
struct mdev_type mdev_type;
struct mdev_type *mdev_types;
};
π¦ Members
okay so these are the members this page actually tells you about β each one gets a lil breakdown π«Ά
deviceβ the generic device structure that's associated with the AP matrix device. the everyday, standard-device-struct bestie of the group, holdin' it down πinfoβ the struct containing the output from thePQAP(QCI)instruction. literally that instruction's whole output, living in here πmdev_listβ the list of mediated matrix devices that have been created. it's giving roster energy πmdevs_lockβ a mutex for locking the AP matrix device. and listen, it gets taken every single time we fiddle with state managed by thevfio_apdriver β whether that's throughmdev_listor through writing the state of a singleap_matrix_mdevdevice. yes, it's quite coarse π but fr fr, we don't expect much contention, so she's fine πvfio_ap_drvβ thevfio_apdevice driver. the driver in question, the main character π₯guests_lockβ a mutex for controlling access to a guest that's using AP devices passed through by thevfio_apdevice driver. it gets taken when the AP devices are plugged into or unplugged from a guest πΈ, and also when anap_matrix_mdevdevice is added to or removed frommdev_list, or when the list is iterated. so yeah, she's everywhere, and that's on periodt π
heads up bestie: the struct up top also hasparent,mdev_type, andmdev_typesin it β this page only documents the ones listed above, so i'm not out here making stuff up about the rest. no invented lore in this house π
π§ SEE ALSO
- Kernel file
./drivers/s390/crypto/vfio_ap_private.h struct ap_matrix(9)struct ap_queue_table(9)struct ap_matrix_mdev(9)struct vfio_ap_queue(9)
go read those too, iykyk πβ¨
okay that's the whole page!! π this iconic lil doc lives in ./drivers/s390/crypto and it's dated October 2026, all filed under struct ap_matrix_dev(9) in your Kernel API Manual. mwah, go forth and slay your AP matrix adventures ππ¦β
π¦ 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