virtqueue_map_single_attrs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ virtqueue_map_single_attrs ✨

okay so bestie, welcome to the virtqueue_map_single_attrs(9) page from the Kernel API Manual πŸ’… this is the one about mapping DMA for _vq and honestly? kind of iconic of it.


🌸 NAME 🌸

virtqueue_map_single_attrs β€” map DMA for _vq πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

dma_addr_t virtqueue_map_single_attrs (const struct virtqueue *_vq ,
void *ptr , size_t size , enum dma_data_direction dir , unsigned long
attrs );

πŸ’– ARGUMENTS πŸ’–

  • _vq β€” the struct virtqueue we're talking about. like, the vq in question, the main character πŸ‘‘
  • ptr β€” the pointer of the buffer to do dma 🫢
  • size β€” the size of the buffer to do dma. yes, it matters, don't skip it πŸ™ˆ
  • dir β€” DMA direction 🧭
  • attrs β€” DMA Attrs ✨

πŸ”₯ DESCRIPTION πŸ”₯

So the caller calls this to do dma mapping in advance. that's the whole vibe. the DMA address can then be passed to this _vq when it is in pre-mapped mode. periodt πŸ’…

It returns the mapped address. and bestie, the caller should check that by virtqueue_map_mapping_error β€” do not just assume it worked, that's not the move 😭


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/virtio/virtio_ring.c, plus the whole friend group πŸ‘‡


aaaand that's the page!! πŸ“ brought to you by the fine folks over at source ./drivers/virtio, dated October 2026, and yes she's literally called virtqueue_map_single_attrs(9) β€” iykyk πŸ’œ go map some DMA, bestie, you got this 🌈✨

πŸ“¦ where this page comes from