GSP MESSAGE QUEUE ELEMENT(9)
β¨ GSP message queue element(9) β¨
okay bestie, welcome to the Kernel API Manual entry for GSP message queue element(9) π«Ά The source file is right here:
The GSP command queue and status queue are message queues for the communication between software and GSP. The software submits the GSP RPC via the GSP command queue, GSP writes the status of the submitted RPC in the status queue.
A GSP message queue element consists of three parts:
- message element header (
struct r535_gsp_msg), which mostly maintains the metadata for queuing the element. - RPC message header (
struct nvfw_gsp_rpc), which maintains the info of the RPC. E.g., the RPC function number. - The payload, where the RPC message stays. E.g. the params of a specific RPC function. Some RPC functions also have their headers in the payload. E.g.
rm_alloc,rm_control.
The memory layout of a GSP message element can be illustrated below β itβs giving diagram realness πΈ:
+------------------------+
| Message Element Header |
| (r535_gsp_msg) |
| |
| (r535_gsp_msg.data) |
| | |
|----------V-------------|
| GSP RPC Header |
| (nvfw_gsp_rpc) |
| |
| (nvfw_gsp_rpc.data) |
| | |
|----------V-------------|
| Payload |
| |
| header(optional) |
| params |
+------------------------+
No cap, the max size of a message queue element is 16 pages (including the headers). When a GSP message to be sent is larger than 16 pages, the message should be split into multiple elements and sent accordingly.
In the bunch of the split elements, the first element has the expected function number, while the rest of the elements are sent with the function number NV_VGPU_MSG_FUNCTION_CONTINUATION_RECORD.
GSP consumes the elements from the cmdq and always writes the result back to the msgq. The result is also formed as split elements.
Terminology: π
gsp_msg(msg): GSP message element (element header + GSP RPC header + payload)gsp_rpc(rpc): GSP RPC (RPC header + payload)gsp_rpc_buf: buffer for (GSP RPC header + payload)gsp_rpc_len: size of (GSP RPC header + payload)params_size: size of params in the payloadpayload_size: size of (header if exists + params) in the payload
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/rpc.c - Receive a GSP message queue element(9)
okay bye bestie π this page is from the Kernel API Manual, source/version ./drivers/gpu/drm/nouveau/nvkm..., dated October 2026 β and the manual name is GSP message queue element(9), slay π
β¨
π¦ 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