summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_phys_gpu.h
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-02 10:58:17 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-02 10:58:17 -0400
commit09f241601423b1ae98e97846ee451768ff8a0a9e (patch)
tree7c8cb9c17a91ece09e6e0d525e53e98d1c1fe729 /kernel/gsp_phys_gpu.h
parent55eeaeb12fa8a7d493966f6057f4d34790b8a822 (diff)
downloadopen-iov-09f241601423b1ae98e97846ee451768ff8a0a9e.tar.gz
open-iov-09f241601423b1ae98e97846ee451768ff8a0a9e.zip
gsp-phys: GR engine context allocate/map/promote before the GR sem push (default off; live-unverified at promote)
Diffstat (limited to 'kernel/gsp_phys_gpu.h')
-rw-r--r--kernel/gsp_phys_gpu.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/kernel/gsp_phys_gpu.h b/kernel/gsp_phys_gpu.h
index f34d7a2..4e5e823 100644
--- a/kernel/gsp_phys_gpu.h
+++ b/kernel/gsp_phys_gpu.h
@@ -176,6 +176,29 @@ bool gsp_phys_fault_inject_enabled(void);
int gsp_phys_rmcall_engine_value(void);
/*
+ * GR context-promote bisection selector (gsp_phys_rmcall_gr_promote; default
+ * 0). Returns the module-parameter value, one of:
+ * 0 = never send NV2080_CTRL_CMD_GPU_PROMOTE_CTX. The GR ladder still runs
+ * the engine-context geometry queries, allocates and PDB-maps the MAIN
+ * buffer, allocates the channel/compute object, then stops before BIND
+ * with a clear log (the whole safe half; reviewable without a promote);
+ * 1 = single MAIN entry, bInitialize=1/bNonmapped=0, size =
+ * ALIGN_UP(raw save size, 4 KB) + maxSubctx * 4 KB (the p6h1b shape
+ * that asserted GSP-RM with errorCode 0x52a8b04);
+ * 2 = reference external-VAS two-phase shape: a PA-only nonmapped entry
+ * (bInitialize=1/bNonmapped=1, no VA) first, then a VA-only entry
+ * (bInitialize=0/bNonmapped=0) with the same PA/VA/size;
+ * 3 = single MAIN entry like 1 but with size = the exact raw save size.
+ * The parameter's set callback clamps any value outside 0..3 to 0 with a
+ * warning and warns on every nonzero enable (a failed promote can assert
+ * GSP-RM and wedge the device; recovery needs a reboot with human approval).
+ * The booter snapshots the value when the rm-call ladder's stage 3 starts
+ * and ignores later changes, so this accessor is for the snapshot and
+ * diagnostics only.
+ */
+int gsp_phys_rmcall_gr_promote_value(void);
+
+/*
* Translate a guest GPA to the pinned host PA (gsp_phys_guest_mem ladder
* support). The mdev is registered with vfio_register_emulated_iommu_dev():
* its VFIO type-1 container keeps the guest DMA mappings privately, so