__vdpa_alloc_device(9)
πΈ NAME πΈ
Hey bestie, welcome to __vdpa_alloc_device(9) from the Kernel API Manual! β¨ This is the function that will allocate and initilaize a vDPA device β yes, initilaize is the original spelling and I am obsessed with the chaos π. The way that itβs all about letting a driver do some prepartion after the device is initialized but before it gets registered β prepartion spelling included, no cap.
π¦ SYNOPSIS π¦
struct vdpa_device * __vdpa_alloc_device (struct device *parent , const
struct vdpa_config_ops *config , const struct virtio_map_ops *map ,
unsigned int ngroups , unsigned int nas , size_t size , const char *name
, bool use_va );
π ARGUMENTS π
parentβ the parent device πconfigβ the bus operations that is supported by this devicemapβ the map operations that is supported by this devicengroupsβ number of groups supported by this devicenasβ number of address spaces supported by this devicesizeβ size of the parent structure that contains private datanameβ name of the vdpa device; optional. β¨use_vaβ indicate whether virtual address must be used by this device
π DESCRIPTION π
Okay so the big vibe here: drivers should use the vdpa_alloc_device wrapper macro instead of using this directly. Thatβs literally the whole note, bestie β do not come for this function directly unless youβre the wrapper macro living your main character energy. Periodt. π
The manual is very clear: βDriver should use vdpa_alloc_device wrapper macro instead of using this directly.β Not me making it up. π«Ά
π₯ RETURN π₯
Returns an error when parent/config/map is not set or fail to get ida. Thatβs the whole return section, fr fr. π
π SEE ALSO π
- Kernel file
./drivers/vdpa/vdpa.cβ the source file reference, iykyk. _vdpa_register_device(9)vdpa_register_device(9)_vdpa_unregister_device(9)vdpa_unregister_device(9)__vdpa_register_driver(9)vdpa_unregister_driver(9)vdpa_mgmtdev_register(9)vdpa_get_config(9)vdpa_set_config(9)
Thatβs the page, bestie! Footer energy: source path ./drivers/vdpa, date October 2026, and title __vdpa_alloc_device(9). Bye bestie, go slay your vDPA device allocation π
π«Άβ¨
π¦ 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