STRUCT GENWQE_MEM(9)
π NAME π
okay so this is struct genwqe_mem(9) from the Kernel API Manual, and it is literally all about Memory pinning/unpinning information β the vibe is βletβs keep memory pinned and not be chaotic about itβ β¨
π¦ SYNOPSIS π¦
struct genwqe_mem {
__u64 addr;
__u64 size;
__u64 direction;
__u64 flags;
};
not me presenting the whole struct like a little menu π
every field is __u64, no cap.
π Members π
addrβ virtual user space address. yes bestie, the address in user space, virtual-style πΈsizeβ size of the area pin/dma-map/unmap. thatβs the size of the area for pin/dma-map/unmap, periodt.directionβ0: read/1: read and write. lowkey important:0means read,1means read and write π₯flagsβ this member is in the struct, but the original page doesnβt give it a description. itβs just there, main character energy, no explanation attached π
π DESCRIPTION π
okay so the whole point: Avoid pinning and unpinning of memory pages dynamically. Instead the idea is to pin the whole buffer space required for DDCB opertionas in advance. (yes, opertionas β Iβm not fixing the sourceβs spelling, bestie π) The driver will reuse this pinning and the memory associated with it to setup the sglists for the DDCB requests without the need to allocate and free memory or map and unmap to get the DMA addresses.
The inverse operation needs to be called after the pinning is not needed anymore. The pinnings else the pinnings will get removed after the device is closed. Note that pinnings will required memory. (the sourceβs grammar is doing its own thing, but the point is: pinnings need memory π«Ά)
π SEE ALSO π
- Kernel file
./include/uapi/linux/genwqe/genwqe_card.h struct genwqe_ddcb_cmd(9)
mwah π this lil page is from the ./include/uapi/linux/genwqe source/version, dated October 2026, and itβs all about struct genwqe_mem(9) β slay and goodbye π
π¦ 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