diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/gsp_sema_service.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c index a67107b..34b9ffd 100644 --- a/kernel/gsp_sema_service.c +++ b/kernel/gsp_sema_service.c @@ -1068,7 +1068,16 @@ static int svc_resolve_va(struct nv_vgpu_device *vgpu, u64 va, u64 *addr, { int ap = SVC_APERTURE_SYS; - if (svc_lookup(vgpu, va, addr, &ap)) + /* + * Semaphore I/O must never go through the vidmem window convention. + * The convention turns any VA above the window base into a vidmem + * offset, and the client's GPU semaphores are sysmem objects mapped + * into its address space at those same VAs: the write would land in + * the vidmem shadow instead of the page the client polls, silently + * losing the release. Trusted translations only; an unresolved + * semaphore is counted as a miss so the gap stays visible. + */ + if (svc_lookup_trusted(vgpu, va, addr, &ap)) return -ENOENT; *aperture = (ap == SVC_APERTURE_FB) ? 1 : 0; return 0; |
