__vdpa_alloc_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 device
  • map β€” the map operations that is supported by this device
  • ngroups β€” number of groups supported by this device
  • nas β€” number of address spaces supported by this device
  • size β€” size of the parent structure that contains private data
  • name β€” 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 🌈


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