virtqueue_ma...e_for_device(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ β€” today's main character is virtqueue_map_sync_single_range_for_device πŸŽ€ and what it does is map sync for device 🫢


✨ SYNOPSIS ✨

void virtqueue_map_sync_single_range_for_device (const struct virtqueue
*_vq , dma_addr_t addr , unsigned long offset , size_t size , enum
dma_data_direction dir );

like, that's the whole signature, no cap πŸ’–


🌸 ARGUMENTS 🌸

  • _vq β€” the struct virtqueue we're talking about πŸ’« literally the vq in question
  • addr β€” DMA address πŸ“
  • offset β€” DMA address offset, like how far in we're going 🎯
  • size β€” buf size for sync, i.e. how much we're syncing 🧚
  • dir β€” DMA direction, which way the data's vibing ➑️

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen πŸ”₯ before you call this function, you gotta use virtqueue_map_need_sync to confirm that the DMA address really needs to be synchronized πŸ‘‘

no fr, do the vibe check first β€” virtqueue_map_need_sync is the pre-check, don't skip it πŸ™ˆ

like it's giving "look before you leap" but for DMA addresses πŸ’…


⭐ SEE ALSO ⭐

the whole friend group 🫢 β€” kernel file ./drivers/virtio/virtio_ring.c and:


k byeee πŸ’œ this one came out of ./drivers/virtio dated October 2026, and the page itself is virtqueue_ma...e_for_device(9) β€” mwah, stan, periodt 🌈✨

πŸ“¦ where this page comes from