xe_pci_sriov_get_vf_pdev(9)
π xe_pci_sriov_get_vf_pdev(9) π
okay so bestie, welcome to the Kernel API Manual β¨ this one's a lil function from the xe driver that helps you find a specific VF's PCI device, and honestly? it's giving "small function, big responsibility" energy π
πΈ NAME πΈ
xe_pci_sriov_get_vf_pdev β literally just looks up the VF's PCI device using the VF identifier π¦
β¨ SYNOPSIS β¨
struct pci_dev * xe_pci_sriov_get_vf_pdev (struct pci_dev *pdev ,
unsigned int vfid );
like, you hand it a PF device and a VF id, and it hands you back a struct pci_dev * π
π ARGUMENTS π
pdevβ the PF'spci_dev. yep, the Physical Function, not the VF. important distinction, don't mix them up bestie πvfidβ the VF identifier, and heads up: it's 1-based β so no sneaky zero-indexing here, okay?
π«Ά DESCRIPTION π«Ά
so like, the actual description is short and sweet, but it's also the part where you cannot zone out π
the caller must decrement the reference count by calling pci_dev_put.
fr fr, this is the whole vibe check of the page β you get a reference, you are responsible for putting it back. no cap, if you forget, that reference just... stays. forever. π
π₯ RETURN π₯
it returns the VF's pci_dev π or NULL if the VF device was not found π (so yeah, check for that NULL, bestie, please π)
π SEE ALSO π
- the kernel file
./drivers/gpu/drm/xe/xe_pci_sriov.cβ that's where the magic lives, go read it iykyk π§ xe_pci_sriov_configure(9)β the sibling function, iconic behavior honestly π
aaaand that's the whole page! stay hydrated, put your pci_dev_put where your pci_dev_get is, and remember: reference counting is self care π
sign-off: this cutie lives in ./drivers/gpu/drm/xe, dated October 2026, and yes the manual name is Kernel API Manual in case you were wondering π ok bye ily π
π¦ 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