virtqueue_unmap_page_attrs(9)
π virtqueue_unmap_page_attrs(9) β a Kernel API Manual moment
okay so bestie, welcome to the Kernel API Manual, section 9, and today's main character is virtqueue_unmap_page_attrs. say hi π
β¨ NAME β¨
virtqueue_unmap_page_attrs β map a page to the device
yeah. i know. the name says unmap and the description says map and i'm just the messenger π«Ά that's literally what the page says, so that's literally what you get. no cap, don't come for me.
πΈ SYNOPSIS πΈ
void virtqueue_unmap_page_attrs (const struct virtqueue *_vq ,
dma_addr_t map_handle , size_t size , enum dma_data_direction dir ,
unsigned long attrs );
it returns void, meaning it gives you nothing back β it's giving mysterious, it's giving "the journey was the friends we made along the way" π
π ARGUMENTS π
five of them. count 'em. five. let's go π
_vqβ the virtqueue we are talking to. your conversational partner. be polite to her πmap_handleβ the mapped address. yes, that one π¦sizeβ the buffer size. how much buffer we're buffering β¨dirβ mapping direction. anenum dma_data_direction, so it's got opinions about where things flow π§attrsβ unmapping attributes. anunsigned longof pure vibes-and-flags πΈ
π« SEE ALSO π«
this list is LONG and honestly iconic β the whole virtio friend group showed up. Kernel file ./drivers/virtio/virtio_ring.c says hi, and so do literally all of these:
virtqueue_add_sgs(9)virtqueue_add_outbuf(9)virtqueue_add_outbuf_premapped(9)virtqueue_add_inbuf(9)virtqueue_add_inbuf_cache_clean(9)virtqueue_add_inbuf_ctx(9)virtqueue_add_inbuf_premapped(9)virtqueue_dma_dev(9)virtqueue_kick_prepare(9)virtqueue_notify(9)virtqueue_kick(9)virtqueue_get_buf_ctx(9)virtqueue_disable_cb(9)virtqueue_enable_cb_prepare(9)virtqueue_poll(9)virtqueue_enable_cb(9)virtqueue_enable_cb_delayed(9)virtqueue_detach_unused_buf(9)vring_interrupt(9)virtqueue_resize(9)virtqueue_reset(9)virtqueue_get_vring_size(9)virtqueue_map_alloc_coherent(9)virtqueue_map_free_coherent(9)virtqueue_map_page_attrs(9)virtqueue_map_single_attrs(9)virtqueue_unmap_single_attrs(9)virtqueue_map_mapping_error(9)virtqueue_map_need_sync(9)virtqueue_map_sync_single_range_for_cpu(9)virtqueue_map_sync_single_range_for_device(9)
thirty-one entries. thirty-one!! the group chat is POPPIN' π₯ (and yes, virtqueue_map_page_attrs(9) is right there in the list being the unmap's little sibling β family reunion π)
so that's the whole page, bestie. short, sweet, void, and sourced from ./drivers/virtio, dated October 2026, page virtqueue_unmap_page_attrs(9). go forth and unmap (or map, per the NAME section, we don't gatekeep) ππ§β
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms