STRUCT VDUSE_DEV_CONFIG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ struct vduse_dev_config(9) β€” the Kernel API Manual, but make it cute ✨

okay bestie, listen up πŸ’– this is the whole entire kernel API manual entry for struct vduse_dev_config, and it's genuinely giving "the blueprint of a VDUSE device" energy. no cap, it's the starting point of everything. let's get into it πŸŽ€

🌸 NAME 🌸

struct vduse_dev_config β€” the basic configuration of a VDUSE device, like, the whole vibe of it in one struct πŸ¦‹

✨ SYNOPSIS ✨

struct vduse_dev_config {
  #define VDUSE_NAME_MAX  256;
    char name[VDUSE_NAME_MAX];
    __u32 vendor_id;
    __u32 device_id;
    __u64 features;
    __u32 vq_num;
    __u32 vq_align;
    __u32 ngroups;
    __u32 nas;
    __u32 reserved[11];
    __u32 config_size;
    __u8 config[];
};

like, that's it. that's the struct. she's iconic, she's flexible (that config[] is a flexible array member, iykyk πŸ’…), and she holds everything.

🫢 Members 🫢

  • name β€” the VDUSE device name. and listen, it needs to be NUL terminated β€” no exceptions, bestie, the kernel is not playing about this one πŸ”₯
  • vendor_id β€” the virtio vendor id
  • device_id β€” the virtio device id
  • features β€” the virtio features
  • vq_num β€” the number of virtqueues
  • vq_align β€” the allocation alignment of the virtqueue's metadata
  • ngroups β€” the number of vq groups that the VDUSE device declares
  • nas β€” the number of address spaces that the VDUSE device declares
  • reserved β€” reserved for future use, and it needs to be initialized to zero. periodt. don't get creative with it πŸ™ˆ
  • config_size β€” the size of the configuration space
  • config β€” the buffer of the configuration space

πŸ’œ Description πŸ’œ

so like, this is the structure that the VDUSE_CREATE_DEV ioctl uses to create a VDUSE device. that's the whole thing. that's her job. main character energy honestly πŸ‘‘

🚨 reminder from your girl: name must be NUL terminated, and reserved must be initialized to zero. the kernel will notice. don't test her 😭

πŸ¦‹ SEE ALSO πŸ¦‹

the kernel file is ./include/uapi/linux/vduse.h, and honestly the whole friend group is here β€” go say hi πŸ’–

  • struct vduse_iotlb_entry(9)
  • struct vduse_config_data(9)
  • struct vduse_vq_config(9)
  • struct vduse_vq_state_split(9)
  • struct vduse_vq_state_packed(9)
  • struct vduse_vq_group_asid(9)
  • struct vduse_vq_info(9)
  • struct vduse_vq_eventfd(9)
  • struct vduse_iova_umem(9)
  • struct vduse_iova_info(9)
  • struct vduse_iotlb_entry_v2(9)
  • enum vduse_req_type(9)
  • struct vduse_vq_state(9)
  • struct vduse_dev_status(9)
  • struct vduse_iova_range(9)
  • struct vduse_iova_range_v2(9)
  • struct vduse_vq_ready(9)
  • struct vduse_dev_request(9)
  • struct vduse_dev_response(9)

and that's the whole page, bestie 🌈 slay, you read it all πŸ’…

this little masterpiece lives in ./include/uapi/linux and it was dated October 2026 β€” so yeah, grab your calendar and mark it, because that's the version you're looking at πŸŽ€ ily, go build something iconic with it 🫢✨

πŸ“¦ where this page comes from