From f4bad9907c9cf909c532dae6e7f96fcd33360721 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Thu, 8 Oct 2026 23:58:49 -0400 Subject: 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). --- kernel/gsp_sema_service.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'kernel') 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)); -- cgit v1.2.3