UVM_VSLOCK(9)

πŸ“¦ in nixpkgs unstable

✨ NAME ✨

okay bestie, welcome to UVM_VSLOCK(9) from the Kernel Developer's Manual β€” this is the one about wiring user memory for I/O πŸ’…

uvm_vslock, uvm_vsunlock, uvm_vslock_device, uvm_vsunlock_device β€” wire user memory for I/O πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <uvm/uvm_extern.h>

void
uvm_vslock(struct proc *p, caddr_t addr, size_t len,
    vm_prot_t access_type);

void
uvm_vsunlock(struct proc *p, caddr_t addr, size_t len);

int
uvm_vslock_device(struct proc *p, void *addr, size_t len,
    vm_prot_t access_type, void **retp);

void
uvm_vsunlock_device(struct proc *p, void *addr, size_t len, void *map);

πŸ’… DESCRIPTION πŸ’…

So the uvm_vslock() family of functions control the wiring and unwiring of pages for process p from addr to addr + len ✨

The access_type argument is passed to uvm_fault(9) β€” that’s the whole vibe there, no cap.

uvm_vslock_device() also checks if the pages are DMA reachable πŸ‘€ When they aren’t, it bounces their content into a newly created mapping returned in retp πŸ¦‹

uvm_vsunlock_device() will release this memory mapping pointed by map β€” cleanup queen behavior fr fr 🫢


πŸ”₯ SEE ALSO πŸ”₯


mwah πŸ’‹ this page is from the Debian fam, dated December 6, 2019 β€” that’s the cute little sign-off, bestie 🌸

πŸ“¦ where this page comes from