summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_phys_booter.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-06 21:18:34 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-06 21:18:34 -0400
commit87d84d6f6c16d33f39290c7d0551fc38f24ed4b8 (patch)
tree4341b25f4c54bf20d026e58cc4b125fc19a963ea /kernel/gsp_phys_booter.c
parentfc302430ea3723de071156ec2845b4f92e7abe63 (diff)
downloadopen-iov-87d84d6f6c16d33f39290c7d0551fc38f24ed4b8.tar.gz
open-iov-87d84d6f6c16d33f39290c7d0551fc38f24ed4b8.zip
vgsp: ctxshare_force probe - share on the proven mode-31 execution channel (V6+sibling A attach via params init)
Diffstat (limited to 'kernel/gsp_phys_booter.c')
-rw-r--r--kernel/gsp_phys_booter.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c
index 10ef3b7..4fc8b4f 100644
--- a/kernel/gsp_phys_booter.c
+++ b/kernel/gsp_phys_booter.c
@@ -13144,6 +13144,27 @@ static int gsp_phys_rmcall_stage3(void __iomem *bar0)
gsp_phys_rmcall_user_lane_kgr_queries(bar0);
/*
+ * Mode-31 share probe (gsp_phys_rmcall_ctxshare_force=1): allocate the
+ * share before the replay so every ladder-TSG channel (V6 and the mode-31
+ * sibling A) attaches to it via the channel-params helper, while the
+ * proven mode-31 construct/commit flow stays intact.
+ */
+ if (gsp_phys_rmcall_engine_is_gr() &&
+ gsp_phys_rmcall_ctxshare_force_value() &&
+ !boot_stage.rmcall_ctxshare) {
+ if (!gsp_phys_rmcall_vas_shared_value()) {
+ pr_err("vgsp-boot: rm-call: ctxshare_force needs the ladder SHARED_MANAGEMENT VAS (gsp_phys_rmcall_vas_shared=1); aborting with no retry\n");
+ return -EINVAL;
+ }
+ ret = gsp_phys_rmcall_alloc_ctxshare(bar0);
+ if (ret) {
+ pr_err("vgsp-boot: rm-call: stage 3 aborted: ctxshare_force FERMI_CONTEXT_SHARE_A alloc failed (%d); aborting with no retry\n",
+ ret);
+ return ret;
+ }
+ }
+
+ /*
* Golden-image replay (gsp_phys_rmcall_golden=1 + gsp_phys_gpu=1):
* replay the stock client's post-load golden channel allocations after
* the ladder's VAS/TSG exist and before the ladder's own channel/GR