summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_sema_service.h
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-02 08:07:10 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-02 08:07:10 -0400
commit22105e4ec738ac72d010d930222f6d8e62b4116c (patch)
tree0ac34da3b20bc504d3c070e87e42e20ed6037e7e /kernel/gsp_sema_service.h
parentfe95eadb2bc1cb9af49814528edecbc5e497d6cd (diff)
downloadopen-iov-22105e4ec738ac72d010d930222f6d8e62b4116c.tar.gz
open-iov-22105e4ec738ac72d010d930222f6d8e62b4116c.zip
gsp-phys: P6c C3 - relay forwarded-engine faults to the guest (default off)
New default-off gsp_phys_fault_relay: when a relayed copy times out, the GSP-RM status queue is drained and the first OS_ERROR_LOG (0x1006) recorded after the submission's doorbell is decoded (NOCAT corroboration), matched against the ladder channel's runlist/chid, and delivered to the guest by writing its channel notifier (info32=exceptType, info16=engine type, status=0xffff) and posting the channel event. A late-release recheck skips delivery if the engine actually completed, one delivery per hold, and the existing software fallback always runs first, so no release or data is lost. - pure decode helpers extracted from the status printers; prints unchanged - status-queue walks serialized with a mutex; unmatched 0x1006 records are no longer silently dropped - fault epoch snapshot at the doorbell prevents stale records from matching - fault counters and faults:/fault_relay: state lines - default-off gsp_phys_fault_inject debug knob forces the next relayed pair's source PTE to zero to produce a real engine fault - pump notifier latch prevents clobbering a delivered fault Live: injection run produced a real CE0 FAULT_PTE (0x1f @0x200000), decoded with errString, chid/runlist matched, notifier delivered, software fallback applied (applied+fallback==engaged), clean release; the guest RM reacted to the delivered fault by tearing down its channels (faithful semantics). Healthy control: faults all zero, relay requested=40 ok=40, smoke matched=64/64, clean release. Caveat: the auxiliary event post failed (no_event=1, no MSI-X) and the guest teardown means fault injection is not smoke-compatible; the parameter stays off.
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 ffb7df6..4b429ea 100644
--- a/kernel/gsp_sema_service.h
+++ b/kernel/gsp_sema_service.h
@@ -132,6 +132,20 @@ void gsp_sema_service_fwd_relay_stats(u64 *requested, u64 *ok, u64 *fallback,
u64 *resolve_fail);
/*
+ * P6c C3 fault-relay delivery counters for the gsp-phys-state fault_relay
+ * line: faults that matched the ladder runlistId/chid and were delivered
+ * (matched), faults refused because they did not match or had no notifier
+ * (unmatched), notifiers written with the channel event posted (delivered),
+ * notifier writes whose event post found no event object (no_event) and
+ * faults skipped because the relayed guest semaphore already carried the
+ * payload (late_release). All zero while gsp_phys_fault_relay=0. Plain reads,
+ * safe from the debugfs show path.
+ */
+void gsp_sema_service_fwd_fault_stats(u64 *matched, u64 *unmatched,
+ u64 *delivered, u64 *no_event,
+ u64 *late_release);
+
+/*
* 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).