release_upd...cks_for_mdev(9)
π release_update_locks_for_mdev(9) β the Kernel API Manual, bestie
okay so picture this: you're deep in the kernel, you just finished updating a KVM guest's APCB, and now you have to let go of the locks in exactly the right order or everything's gonna be a mess. That's this function. It's from the Kernel API Manual and honestly? It's giving "quietly iconic cleanup era." π
β¨ NAME β¨
release_update_locks_for_mdev β releases the locks used to dynamically update a KVM guest's APCB, in the proper order. no cap, the order is the whole point. π¦
πΈ SYNOPSIS πΈ
void release_update_locks_for_mdev (struct ap_matrix_mdev *matrix_mdev
);
π ARGUMENTS π
matrix_mdevβ a pointer to astruct ap_matrix_mdevobject containing the AP configuration data to use to update a KVM guest's APCB. like, that's the data you're working with. π«Ά
π₯ DESCRIPTION π₯
The proper unlocking order is literally this, do not freestyle it:
matrix_dev->mdevs_lockmatrix_mdev->kvm->lockmatrix_dev->guests_lock
that's the sequence. that's the vibe check. release them out of order and, well, the manpage doesn't even want to talk about it. π
the ordering is the whole personality of this function β item 1, then 2, then 3. periodt. π
π NOTE π
If matrix_mdev is NULL or is not attached to a KVM guest, the KVM lock will not be released. so likeβ¦ don't count on it. it's not being shady, it's just how it is. π
π§ SEE ALSO π§
Kernel file ./drivers/s390/crypto/vfio_ap_ops.c β that's where the magic lives.
get_update_locks_for_kvm(9)release_update_locks_for_kvm(9)get_update_locks_for_mdev(9)get_update_locks_by_apqn(9)get_update_locks_for_queue(9)vfio_ap_mdev_get_queue(9)vfio_ap_wait_for_irqclear(9)vfio_ap_free_aqic_resources(9)vfio_ap_irq_disable(9)vfio_ap_validate_nib(9)ensure_nib_shared(9)vfio_ap_irq_enable(9)vfio_ap_le_guid_to_be_uuid(9)handle_pqap(9)vfio_ap_mdev_verify_no_sharing(9)vfio_ap_mdev_validate_masks(9)assign_adapter_store(9)vfio_ap_mdev_unlink_adapter(9)unassign_adapter_store(9)assign_domain_store(9)unassign_domain_store(9)assign_control_domain_store(9)unassign_control_domain_store(9)vfio_ap_mdev_set_kvm(9)vfio_ap_mdev_unset_kvm(9)vfio_ap_mdev_resource_in_use(9)vfio_ap_mdev_hot_unplug_cfg(9)vfio_ap_mdev_cfg_remove(9)vfio_ap_mdev_on_cfg_remove(9)vfio_ap_filter_apid_by_qtype(9)vfio_ap_mdev_cfg_add(9)vfio_ap_mdev_on_cfg_add(9)vfio_ap_on_cfg_changed(9)
like yes that's a lot of friends but they're all important, i don't make the rules π
mwah, that's the page! π this lil masterpiece lives at ./drivers/s390/crypto and it dropped in October 2026 β go read it, slay, and always unlock in order. π
β¨
π¦ 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