pci_tsm_bind(9)
π pci_tsm_bind(9) π
okay bestie, welcome to the Kernel API Manual, section 9 β this is where the kernel girlies hang out. today we're talking about pci_tsm_bind, and honestly? she's an icon. let's get into it β¨
πΈ NAME πΈ
pci_tsm_bind β bind @pdev as a TDI for @kvm. that's it, that's the vibe π
π¦ SYNOPSIS π¦
int pci_tsm_bind (struct pci_dev *pdev , struct kvm *kvm , u32 tdi_id );
like, literally the whole signature. look at her go π
π ARGUMENTS π
pdevβ the PCI device function you're binding. the main character of this operation, ngl π«Άkvmβ private memory attach context. think of it as the group chat where all the memory stuff gets discussed π¬tdi_idβ the identifier (that's a virtual BDF, fyi) for the TDI as referenced by the TSM and DSM. lowkey the β¨ name tag β¨ of the whole thing π
β¨ DESCRIPTION β¨
returns 0 on success, or a negative error code on failure. periodt. that's the entire description bestie, she's a woman of few words and honestly? respect π
π₯ CONTEXT π₯
heads up, this one's important, don't skip it π«£
the caller is responsible for constraining the bind lifetime to the registered state of the device. like, you gotta keep the bind alive only as long as the device is in its registered state β no cap.
for example: pci_tsm_bind / pci_tsm_unbind limited to the VFIO driver bound state of the device. so basically the bind and unbind are stuck together inside that VFIO-bound window, and if you're not tracking that you're gonna have a bad time π
π SEE ALSO π
the kernel file ./drivers/pci/tsm.c is where the magic lives, and here's the whole friend group you should also go say hi to:
pci_tsm_guest_req(9)pci_tsm_tdi_constructor(9)pci_tsm_link_constructor(9)pci_tsm_pf0_constructor(9)__pci_tsm_destroy(9)
go read them bestie, they're all so valid π
okay that's the whole page! huge shoutout to the source at ./drivers/pci, dated October 2026 β mark your calendars, the PCI girlies ate that month and left no crumbs ππβ¨
π¦ 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