vfio_pci_co...ersect_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

vfio_pci_core_range_intersect_range β€” bestie, this one figures out whether a buffer and a register offset range are overlapping, and if they are, where and how much. Like a vibe check but for memory ranges. ✨

(This is from the Kernel API Manual, iykyk πŸŽ€)


🌸 SYNOPSIS 🌸

bool vfio_pci_core_range_intersect_range(loff_t buf_start, size_t buf_cnt,
                                         loff_t reg_start, size_t reg_cnt,
                                         loff_t *buf_offset,
                                         size_t *intersect_count,
                                         size_t *register_offset);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • buf_start β€” where the buffer starts, offset-wise. Main character energy for the buffer side πŸ’–
  • buf_cnt β€” how many bytes the buffer has. Like, its whole size, no cap.
  • reg_start β€” the starting register offset. The other half of this little meet-cute 🫢
  • reg_cnt β€” number of bytes in the register. Its size, periodt.
  • buf_offset β€” output! Where the overlap kicks off inside the buffer. πŸ‘‘
  • intersect_count β€” output! How many bytes actually overlap. The number we've all been waiting for πŸ’€
  • register_offset β€” output! Where the overlap starts inside the register. Slay. 🌈

πŸ”₯ RETURN πŸ”₯

true if there is overlap, false if there isn't β€” literally that simple, no crumbs. And when there is overlap, the start and size come back to you through the function args, which are those pointer params up there πŸ’…


🧚 SEE ALSO 🧚

Kernel file ./drivers/vfio/pci/vfio_pci_config.c β€” go read it, bestie, it's giving source of truth πŸ“–βœ¨


Ok that's the whole page, you ate it up ngl πŸ“

Alright that's it from ./drivers/vfio/pci, dated October 2026 β€” version vibes baked right in, mwah πŸ’‹πŸ¦‹ See you in the kernel, bestie πŸ’œ

πŸ“¦ where this page comes from