diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-24 08:58:59 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-24 08:58:59 -0400 |
| commit | f359b91af0b7ee1660a38856bbff05d0132bd50f (patch) | |
| tree | d61dffcf9071dccffe089926a43aa67ad2417369 /kernel/main.c | |
| parent | 9e6b6c74d7321e3dc6d67afc0b9c2d506e4b4bcd (diff) | |
| download | open-iov-f359b91af0b7ee1660a38856bbff05d0132bd50f.tar.gz open-iov-f359b91af0b7ee1660a38856bbff05d0132bd50f.zip | |
kernel: aperture-aware pinning and UVM CE channel USERD discovery
Debug injections could only teach sysmem translations, but the UVM CE
channel rings and USERDs live in the frame buffer window, and the
progress service had no candidate for their USERD (the allocation
parameters carry an offset relative to a client pool, not the FB
offset). Add an aperture field to the pinned translations and to the
sema_map_add debug parameter (va,pa[,len[,aperture]]), and probe the
observed UVM layout as well: the USERD sits one 0x10000 block after the
ring for the data-path channels.
With the rings pinned, the pump now resolves and decodes the CE rings
(the entries point at 1 MB pushbuffer regions); only the pushbuffer
VA->PA translation is still missing, so the entries are kept pending.
Diffstat (limited to 'kernel/main.c')
| -rw-r--r-- | kernel/main.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/kernel/main.c b/kernel/main.c index 25bd5eb..63657f3 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -2256,8 +2256,8 @@ MODULE_PARM_DESC(sema_probe, "Dump sema-service map + slot values for a GPU VA") static int nv_vgpu_sema_map_add_set(const char *val, const struct kernel_param *kp) { char buf[64]; - char *comma, *comma2; - u64 va = 0, pa = 0, len = 0; + char *comma, *comma2, *comma3; + u64 va = 0, pa = 0, len = 0, ap = 0; strscpy(buf, val, sizeof(buf)); comma = strchr(buf, ','); @@ -2269,10 +2269,17 @@ static int nv_vgpu_sema_map_add_set(const char *val, const struct kernel_param * *comma2 = '\0'; if (kstrtoull(buf, 0, &va) || kstrtoull(comma + 1, 0, &pa)) return -EINVAL; - if (comma2 && kstrtoull(comma2 + 1, 0, &len)) - return -EINVAL; + if (comma2) { + comma3 = strchr(comma2 + 1, ','); + if (comma3) + *comma3 = '\0'; + if (kstrtoull(comma2 + 1, 0, &len)) + return -EINVAL; + if (comma3 && kstrtoull(comma3 + 1, 0, &ap)) + return -EINVAL; + } - return gsp_sema_service_add_map(va, pa, len); + return gsp_sema_service_add_map(va, pa, len, (u32)ap); } static const struct kernel_param_ops nv_vgpu_sema_map_add_ops = { |
