struct fw_rsc_vdev - virtio device header @id: virtio device id (as in virtio_ids.h) @notifyid is a unique rproc-wide notify index for this vdev. This notify index is used when kicking a remote remoteproc, to let it know that the status/features of this vdev have changes. @dfeatures specifies the virtio device features supported by the firmware @gfeatures is a place holder used by the host to write back the negotiated features that are supported by both sides. @config_len is the size of the virtio config space of this vdev. The config space lies in the resource table immediate after this vdev header. @status is a place holder where the host will indicate its virtio progress. @num_of_vrings indicates how many vrings are described in this vdev header @reserved: reserved (must be zero) @vring is an array of @num_of_vrings entries of 'struct fw_rsc_vdev_vring'.
This resource is a virtio device header: it provides information about the vdev, and is then used by the host and its peer remote remoteprocs to negotiate and share certain virtio properties.
By providing this resource entry, the firmware essentially asks remoteproc to statically allocate a vdev upon registration of the rproc (dynamic vdev allocation is not yet supported).
Note: unlike virtualization systems, the term 'host' here means the Linux side which is running remoteproc to control the remote remoteprocs. 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.
Note: 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.