summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-08 23:58:49 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-08 23:58:49 -0400
commitf4bad9907c9cf909c532dae6e7f96fcd33360721 (patch)
treeac61d7c251ccbd0011450158bec4388641916520
parent828479d2aa9f668ececc866dc9cf00ee74662ebc (diff)
downloadopen-iov-f4bad9907c9cf909c532dae6e7f96fcd33360721.tar.gz
open-iov-f4bad9907c9cf909c532dae6e7f96fcd33360721.zip
vgsp-sema: include the learned pin table, counter-derived cache and hot map in the session flush (ISSUE-0002)
The second client still resolved through the first client's pages because three session-scoped tables survive svc_session_flush: svc.pin (the primary learned VA->PA table, consulted before every other source), svc_cnt_der (serves a cached PA without re-proving it) and svc_hot (scan bitmap). Clear all three with the rest; svc.ipin is left alone (injected pins are the external pin tool's domain).
-rw-r--r--kernel/gsp_sema_service.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index 715e458..369f854 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -6328,6 +6328,18 @@ static void svc_session_flush(void)
svc_fwd_rel_n = 0;
svc_grce_dst_ring_next = 0;
svc_ring_done = 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
+ * scan bitmap. Leaving them made the second client resolve through
+ * the first client's pages.
+ */
+ memset(svc.pin, 0, sizeof(svc.pin));
+ svc.pin_n = 0;
+ memset(svc_cnt_der, 0, sizeof(svc_cnt_der));
+ svc_cnt_der_n = 0;
+ memset(svc_hot, 0, sizeof(svc_hot));
memset(svc_retry_q, 0, sizeof(svc_retry_q));
memset(svc_pool_pa, 0, sizeof(svc_pool_pa));
memset(svc_fwd_rel, 0, sizeof(svc_fwd_rel));