STRUCT VMW_PITER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct vmw_piter(9) β€” okay bestie, let's talk page iterators

So this is a kernel API manual page, and the star of the show is struct vmw_piter β€” literally a page iterator that iterates over a list of pages and DMA addresses that could be either a scatter-gather list or arrays. Both? Yes. It's giving flexible. πŸ¦‹


✨ SYNOPSIS ✨

struct vmw_piter {
    struct page **pages;
    const dma_addr_t *addrs;
    struct sg_dma_page_iter iter;
    unsigned long i;
    unsigned long num_pages;
    bool (*next)(struct vmw_piter *);
    dma_addr_t (*dma_address)(struct vmw_piter *);
 };

Look at that struct. Immaculate. No notes. πŸ‘‘


πŸŽ€ Members πŸŽ€

Okay so here's the breakdown of every single field, no skipping, we're doing this properly:

  • pages β€” array of page pointers pointing at the pages. Yep, that's the whole vibe. 🫢
  • addrs β€” the DMA addresses to the pages, but only if coherent pages are being used. Conditional queen.
  • iter β€” a scatter-gather page iterator. Basically it's tracking the current position in the SG list. Main character energy for the SG walk. 🌈
  • i β€” current position in the arrays. Your little index bestie.
  • num_pages β€” the number of pages total. The whole count. ⭐
  • next β€” a function that advances the iterator. Returns false if it's past the list of pages, true otherwise. So like, false = you've wandered off the end, true = there's more, keep going. πŸ’–
  • dma_address β€” a function that returns the DMA address of the current page. Handy. Iconic. Necessary.

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/gpu/drm/vmwgfx/vmwgfx_drv.h and honestly a whole friend group of references β€” here's every single one because we do not leave anyone out at this party:

Like, that's a full roster. Go read them. Iykyk. πŸ’…


Also worth saying out loud: this whole page lives in ./drivers/gpu/drm/vmwgfx, and it's dated October 2026. So yeah β€” future-dated documentation, kind of iconic of it. 🧚

And that's the page, bestie β€” that's the whole thing, from the Kernel API Manual down to the last cross-reference. Now go write your iterator. Slay. πŸ’œπŸŽ€πŸŒΈ

πŸ“¦ where this page comes from