summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_sema_service.h
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-02 07:43:05 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-02 07:43:05 -0400
commitfe95eadb2bc1cb9af49814528edecbc5e497d6cd (patch)
treee6664933422202b4c9eae77446aa6431f457af66 /kernel/gsp_sema_service.h
parent941ceedd33dcdbb34741af6c04865a7024e3e849 (diff)
downloadopen-iov-fe95eadb2bc1cb9af49814528edecbc5e497d6cd.tar.gz
open-iov-fe95eadb2bc1cb9af49814528edecbc5e497d6cd.zip
gsp-phys: P6c C0+C1 - engine-authored guest CE semaphore (default off)
New default-off gsp_phys_relay: for a forwarded guest CE copy whose push ends in a one-word release, the release page is resolved at forward time, mapped on a fresh scratch line, and the real engine writes the payload directly into the guest-visible semaphore page; the deferred-release hold then verifies that page and skips only that record's software apply. Any failure (unresolvable target, refused kind, pool exhaustion, poll timeout, data mismatch, channel teardown) falls back to applying every release in software, so a release is never lost or duplicated. - new exported gsp_phys_backend_guest_ce_copy_ex() + relay counters; gsp_phys_backend_guest_ce_copy() behavior unchanged (wrapper) - new work_relay: counters line in gsp-phys-state - relay limited to CE channels and one-word absolute releases; counter and reduction releases stay on the existing paths Live: param-off regression matched the wave-2 baseline exactly (req=101 ok=101 verify_ok=101, copy_skipped=119, smoke matched=64/64, relay zeros). With the parameter on: requested=68 ok=67 skipped_sw=67, verify_fail=0, resolve_fail=0, timeouts=0, smoke 64/64, and the engine-authored guest semaphore was observed directly (sem=0x00000003 / 0x0000007e at the guest page). One copy in 68 released its semaphore but failed the host-side data compare; it fell back to the software apply (fallback accounting applied+fallback==engaged) with the smoke green - residual to triage, which is why the parameter stays default-off. A forced-unresolvable run (requested=103, fallback=105, no relay submissions) kept the smoke green. Every cycle: 5 power-domain locks held, driver rebound, WPR2 down, no rail cycles, pstore empty, same boot.
Diffstat (limited to 'kernel/gsp_sema_service.h')
-rw-r--r--kernel/gsp_sema_service.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.h b/kernel/gsp_sema_service.h
index 35d1c0f..ffb7df6 100644
--- a/kernel/gsp_sema_service.h
+++ b/kernel/gsp_sema_service.h
@@ -118,6 +118,20 @@ void gsp_sema_service_fwd_hold_stats(u64 *copy_skipped, u64 *copy_soft,
u64 *canceled);
/*
+ * P6c completion-relay counters for the gsp-phys-state work_relay line:
+ * requested relay selections armed on a deferred guest request, relays whose
+ * engine-authored guest semaphore was verified (ok) with their software
+ * applies skipped (skipped_sw), relays that fell back to the software apply
+ * (fallback: engine failure/timeout/abort or a word that did not carry the
+ * payload), hold re-reads that did not see the payload (verify_fail) and
+ * work-item semaphore HPA resolution failures (resolve_fail). All zero while
+ * gsp_phys_relay=0. Plain reads, safe from the debugfs show path.
+ */
+void gsp_sema_service_fwd_relay_stats(u64 *requested, u64 *ok, u64 *fallback,
+ u64 *skipped_sw, u64 *verify_fail,
+ u64 *resolve_fail);
+
+/*
* Discover and pin GR (compute) channel rings after the CE region of the
* channel video-memory allocation. Set false to leave GR rings untranslated
* (the pump then only runs the CE channels).