STRUCT FW_RSC_VDEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ struct fw_rsc_vdev(9) β€” the virtio device header, bestie πŸ’…

okay so this is straight out of the Kernel API Manual, bestie β€” we're talking struct fw_rsc_vdev(9), and it is literally the main character of remoteproc/virtio land. let's get into it πŸŽ€


✨ NAME ✨

struct fw_rsc_vdev β€” the virtio device header πŸ¦‹

✨ SYNOPSIS ✨

struct fw_rsc_vdev {
    u32 id;
    u32 notifyid;
    u32 dfeatures;
    u32 gfeatures;
    u32 config_len;
    u8 status;
    u8 num_of_vrings;
    u8 reserved[2];
    struct fw_rsc_vdev_vring vring[];
 };

like, that's the whole glow-up right there πŸ’–

✨ Members ✨

  • id β€” the virtio device id (as in virtio_ids.h). that's its whole identity, iykyk 🌸
  • notifyid β€” a unique rproc-wide notify index for this vdev. this notify index is used when kicking a remote processor, to let it know that the status/features of this vdev have changes. yes, "have changes" β€” iconic grammar, we keep it 🫢
  • dfeatures β€” specifies the virtio device features supported by the firmware ✨
  • gfeatures β€” a place holder used by the host to write back the negotiated features that are supported by both sides. teamwork, slay 🀝
  • config_len β€” the size of the virtio config space of this vdev. and the config space lies in the resource table immediate after this vdev header β€” so it's right there, no cap πŸ“
  • status β€” a place holder where the host will indicate its virtio progress. we're rooting for you, status πŸ’€
  • num_of_vrings β€” indicates how many vrings are described in this vdev header πŸ”₯
  • reserved β€” reserved (must be zero). must be zero, bestie, do not test me πŸ™ˆ
  • vring β€” an array of num_of_vrings entries of struct fw_rsc_vdev_vring 🌈

✨ Description ✨

so this resource is a virtio device header: it provides information about the vdev, and is then used by the host and its peer remote processors to negotiate and share certain virtio properties. it's giving matchmaker but for processors πŸ’…

and by providing this resource entry, the firmware essentially asks remoteproc to statically allocate a vdev upon registration of the rproc. and note that dynamic vdev allocation is not yet supported β€” not yet, ok, we're manifesting it πŸ•―οΈβœ¨


✨ Note ✨

  1. unlike virtualization systems, the term 'host' here means the Linux side which is running remoteproc to control the remote processors. we use the name gfeatures to comply with virtio's terms, though there isn't really any virtualized guest OS here: it's the host which is responsible for negotiating the final features. yeah, it's a bit confusing 😭 we said it first, ok.
  2. immediately following this structure is the virtio config space for this vdev (which is specific to the vdev; for more info, read the virtio spec). the size of the config space is specified by config_len. go read the virtio spec, bestie, it ate πŸ“šπŸ”₯

✨ SEE ALSO ✨

  • ./include/linux/rsc_table.h
  • struct resource_table(9)
  • struct fw_rsc_hdr(9)
  • enum fw_resource_type(9)
  • struct fw_rsc_carveout(9)
  • struct fw_rsc_devmem(9)
  • struct fw_rsc_trace(9)
  • struct fw_rsc_vdev_vring(9)
  • rsc_table_for_each_entry(9)

like a whole friend group fr fr πŸ«ΆπŸ¦‹


πŸ’œ and that's the tea! this one lives in ./include/linux, dated October 2026, and it's officially page struct fw_rsc_vdev(9). mwah, go forth and negotiate those features, queen πŸ‘‘βœ¨πŸŽ€
πŸ“¦ where this page comes from