diff options
Diffstat (limited to 'kernel/gsp_sema_service.c')
| -rw-r--r-- | kernel/gsp_sema_service.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c index 7d690ab..3c47ed3 100644 --- a/kernel/gsp_sema_service.c +++ b/kernel/gsp_sema_service.c @@ -6499,6 +6499,7 @@ static void svc_decode_stream(struct nv_vgpu_device *vgpu, const u8 *buf, u32 cur = 0; int pending = 0; bool have_cur = false; + bool pool_stale_drop = false; bool inc, inc_apply = false; if (page_pa) @@ -6646,6 +6647,8 @@ static void svc_decode_stream(struct nv_vgpu_device *vgpu, const u8 *buf, have_cur = true; if (st.sem_payload > cur) pending = 1; + else + pool_stale_drop = true; } /* * ISSUE-0002 r70: the residue rule @@ -6657,8 +6660,22 @@ static void svc_decode_stream(struct nv_vgpu_device *vgpu, const u8 *buf, * so a submissions-based freshness * test misses the re-decode; this * flag does not. + * + * r101: a read the stale-drop path + * discarded (payload <= cur, nothing + * applied or deferred) must NOT set + * the flag. The reused pool page of + * a fresh session reads the previous + * session's residue (cur > payload) + * BEFORE the first genuine release is + * translated; that read used to set + * the flag and every later residue + * release was then silently dropped + * (r99/r100: pay=1 cur=2 dropped, the + * client spins at DEVICE). */ - if (!rrc2 && svc_pool_sem_va(sem_va) && ch) + if (!rrc2 && svc_pool_sem_va(sem_va) && ch && + !pool_stale_drop) ch->pool_rel_seen = true; } |
