From c886760efda836b060fee03bfce852f16f04b5b8 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Fri, 2 Oct 2026 02:07:52 -0400 Subject: gsp-phys: freeze-safe release, boot-proof READY, and guest-wiring P2/P3/P5-wave1 Host-freeze fix bundle (validated 2/2 supervised cycles): - power unlock now latches D0/D3cold by default (new gsp_phys_repower, default 0); releasing the claim can no longer power-gate the board and hard-freeze the host on resume - bounded post-rebind readiness gate before dropping the locks; bounded D0 settle/verify before the unbind - READY means a live GSP-RM session: the async worker and the module-owned join only expose READY when init-done is seen and no unload was sent; otherwise the claim is released fail-open - FWSEC reads DMEM0/IMEM back before STARTCPU and fails fast when the staging is not visible - the claim harness leaves the board latched by default and takes --restore-power to opt back into the old restore Guest-wiring: - P2: generation-keyed fn65 static-config snapshot cache plus a default-off identity overlay (new gsp_phys_static_live) for name/short-name/VBIOS; the probe cycle runs once per backend generation at READY - P3: default-off read-only RM_CONTROL forwarding whitelist (new gsp_phys_ctrl_forward) with emulated-handle translation to the adopted server handles and full emulation fallback - P5 wave 1: default-off shadow execution of guest CE pushes on the ladder channel (new gsp_phys_work_forward) via a dedicated ordered work item; the ladder stage-4 submission is refactored into a shared bounded helper and the software release path stays authoritative Live: module-owned boot to init-done, guest smoke ALL OK 64/64 with P2/P3 enabled, 514 shadow copies observed on the physical CE; all cycles released cleanly with WPR2 down and no reboot. --- kernel/gsp_phys_gpu.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'kernel/gsp_phys_gpu.h') diff --git a/kernel/gsp_phys_gpu.h b/kernel/gsp_phys_gpu.h index c8beb1d..709b3a6 100644 --- a/kernel/gsp_phys_gpu.h +++ b/kernel/gsp_phys_gpu.h @@ -11,6 +11,7 @@ bool gsp_phys_gpu_claimed(void); int gsp_phys_gpu_claim(void); void gsp_phys_gpu_release(void); void __iomem *gsp_phys_gpu_bar0(void); +u32 gsp_phys_gpu_fw_crc32(void); /* * Read by the backend session to enforce the mdev-owned start gate; the @@ -61,4 +62,30 @@ u32 gsp_phys_backend_generation(void); */ bool gsp_phys_mdev_owned_enabled(void); +/* + * True when the gsp_phys_static_live module parameter is set (default 0: + * the guest GET_GSP_STATIC_INFO reply is the emulated model unchanged). When + * set, the handler overlays the live GPU name/short-name/VBIOS identity from + * the backend snapshot, failing open to the emulated reply on any miss. + */ +bool gsp_phys_static_live_enabled(void); + +/* + * True when the gsp_phys_ctrl_forward module parameter is set (default 0: + * guest GSP_RM_CONTROL replies are the emulated answers unchanged). When set, + * a whitelist of side-effect-free control queries is forwarded to the live + * backend with the snapshot's adopted internal handles, falling back to the + * emulated per-command handler on any miss. + */ +bool gsp_phys_ctrl_forward_enabled(void); + +/* + * True when the gsp_phys_work_forward module parameter is set (default 0: the + * guest's CE pushes stay software-emulated exactly as before). When set, the + * sema service shadows each decoded CE push as one copy on the debugfs ladder's + * real channel using only module-owned ladder buffers; the software release + * remains authoritative and is applied unchanged either way. + */ +bool gsp_phys_work_forward_enabled(void); + #endif /* GSP_PHYS_GPU_H */ -- cgit v1.2.3