STRUCT VIRTPROC_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, pull up a seat β€” this is struct virtproc_info(9) from the Kernel API Manual πŸ’–βœ¨

πŸŽ€ NAME πŸŽ€

struct virtproc_info β€” virtual remote processor state, no cap πŸ’…

✨ SYNOPSIS ✨

Here’s the struct in all its glory, bestie β€” every field exactly as it appears:

struct virtproc_info {
    struct virtio_device *vdev;
    struct virtqueue *rvq, *svq;
    void *rbufs, *sbufs;
    unsigned int num_bufs;
    unsigned int buf_size;
    int last_sbuf;
    dma_addr_t bufs_dma;
    struct mutex tx_lock;
    struct idr endpoints;
    struct mutex endpoints_lock;
    wait_queue_head_t sendq;
};

🫢 Members 🫢

  • vdev β€” the virtio device, literally the main character here πŸ’…
  • rvq β€” rx virtqueue
  • svq β€” tx virtqueue
  • rbufs β€” kernel address of rx buffers
  • sbufs β€” kernel address of tx buffers
  • num_bufs β€” total number of buffers for rx and tx
  • buf_size β€” size of one rx or tx buffer
  • last_sbuf β€” index of last tx buffer used
  • bufs_dma β€” dma base addr of the buffers
  • tx_lock β€” protects svq and sbufs, to allow concurrent senders. Sending a message might require waking up a dozing remote processor, which involves sleeping, hence the mutex. So yeah β€” it’s a mutex because sleep is involved 😭
  • endpoints β€” idr of local endpoints, allows fast retrieval
  • endpoints_lock β€” lock of the endpoints set
  • sendq β€” wait queue of sending contexts waiting for a tx buffers

🌸 Description 🌸

This structure stores the rpmsg state of a given virtio remote processor device β€” and heads up, there might be several virtio proc devices for each physical remote processor. It’s giving β€œstate keeper for the rpmsg vibes” βœ¨πŸ¦‹

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/rpmsg/virtio_rpmsg_bus.c β€” go read it, bestie β€” plus these cuties:


mwah πŸ’‹ this page was served fresh from ./drivers/rpmsg in October 2026 β€” struct virtproc_info(9), Kernel API Manual, periodt. 🫢✨

πŸ“¦ where this page comes from