STRUCT VDUSE_DEV_CONFIG(9)
π 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 iddevice_idβ the virtio device idfeaturesβ the virtio featuresvq_numβ the number of virtqueuesvq_alignβ the allocation alignment of the virtqueue's metadatangroupsβ the number of vq groups that the VDUSE device declaresnasβ the number of address spaces that the VDUSE device declaresreservedβ 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 spaceconfigβ 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:namemust be NUL terminated, andreservedmust 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
- 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