STRUCT VDPA_DEVICE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

struct vdpa_device β€” the representation of a vDPA device, no cap πŸ’…

okay so this is struct vdpa_device(9) from the Kernel API Manual, and we are about to get into it. bestie, it's giving kernel struct main character energy 🫢


🌸 SYNOPSIS 🌸

here's the whole struct, character-for-character, because we do not play about code:

struct vdpa_device {
    struct device dev;
    union virtio_map vmap;
    const struct vdpa_config_ops *config;
    const struct virtio_map_ops *map;
    struct rw_semaphore cf_lock;
    unsigned int index;
    bool features_valid;
    bool use_va;
    u32 nvqs;
    struct vdpa_mgmt_dev *mdev;
    unsigned int ngroups;
    unsigned int nas;
 };

πŸ‘‘ Members πŸ‘‘

field-by-field, because we do not skip a single one πŸ’–

  • dev β€” underlying device
  • vmap β€” the metadata passed to upper layer to be used for mapping
  • config β€” the configuration ops for this device
  • map β€” the map ops for this device
  • cf_lock β€” Protects get and set access to configuration layout
  • index β€” device index
  • features_valid β€” were features initialized? for legacy guests
  • use_va β€” indicate whether virtual address must be used by this device
  • nvqs β€” maximum number of supported virtqueues
  • mdev β€” management device pointer; caller must setup when registering device as part of dev_add mgmtdev ops callback before invoking _vdpa_register_device
  • ngroups β€” the number of virtqueue groups
  • nas β€” the number of address spaces

πŸ¦‹ SEE ALSO πŸ¦‹

go look at these too, iykyk:

  • Kernel file ./include/linux/vdpa.h
  • struct vdpa_callback(9)
  • struct vdpa_notification_area(9)
  • struct vdpa_vq_state_split(9)
  • struct vdpa_vq_state_packed(9)
  • struct vdpa_iova_range(9)
  • struct vdpa_map_file(9)
  • struct vdpa_config_ops(9)
  • vdpa_alloc_device(9)
  • struct vdpa_driver(9)
  • struct vdpa_mgmtdev_ops(9)
  • struct vdpa_mgmt_dev(9)

k bye bestie, this page is from ./include/linux, dated October 2026 β€” slay and stay hydrated πŸ’œπŸŽ€

πŸ“¦ where this page comes from