summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-09 10:19:24 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-09 10:19:24 -0400
commit8df7581de48340b88e02c1a993a4da4e69ed9867 (patch)
tree7d876f5b96e6723b0fa147718d0b5d8d8ea69305 /kernel
parent1f93ba7271c924c18c468372fc93c1dae8900c46 (diff)
downloadopen-iov-8df7581de48340b88e02c1a993a4da4e69ed9867.tar.gz
open-iov-8df7581de48340b88e02c1a993a4da4e69ed9867.zip
vgsp-sema: re-arm push-buffer and GR-ring discovery with the session (ISSUE-0002)
The push-buffer pairing bitmap (svc_pb_done), its pass budgets (svc_pb_passes/svc_pb_idle/svc_pb_last*) and the GR ring bitmap (svc_gr_ring_done) are boot-scoped, but svc_session_flush() only wiped the pins they stood for. The next client reuses the same CE/GR ranks, so discovery skipped every rank, its push pages could never be paired, and its decoded releases were dropped ('no slot registered'): the guest waited on a tracking semaphore that could never advance - the second-client hang. Re-arm the discovery state in the flush.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/gsp_sema_service.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index f46158e..39e0096 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -6401,6 +6401,22 @@ static void svc_session_flush(void)
svc_grce_dst_ring_next = 0;
svc_ring_done = 0;
/*
+ * Push-buffer and GR-ring discovery are boot-scoped bitmaps (and pass
+ * budgets): a rank marked done stays marked even though this flush
+ * just wiped the pins the mark stood for. The next client reuses the
+ * same ranks, so discovery would skip every one of them and its push
+ * pages could never be paired - the observed second-client hang where
+ * its releases are dropped ("no slot registered") and the guest waits
+ * forever. Re-arm the discovery state with the session (ISSUE-0002).
+ */
+ svc_pb_done = 0;
+ svc_pb_passes = 0;
+ svc_pb_idle = 0;
+ svc_pb_last = 0;
+ svc_pb_last_n = 0;
+ svc_gr_ring_done = 0;
+ svc_ring_n = 0;
+ /*
* The learned tables are session state too: the primary VA->PA pin
* table (consulted before every other source), the counter-derived
* cache (serves a cached PA without re-proving it) and the hot-page