diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-02 10:58:17 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-02 10:58:17 -0400 |
| commit | 2f249817df327f5dcccf0464ad517fa60d6071d3 (patch) | |
| tree | e939b19b183dbd1691770d7811087508a02a6737 /kernel/gsp_phys_gpu.h | |
| parent | ead34850aa8ba623b097b403830f3d793bddbdf7 (diff) | |
| download | open-iov-2f249817df327f5dcccf0464ad517fa60d6071d3.tar.gz open-iov-2f249817df327f5dcccf0464ad517fa60d6071d3.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.h | 23 |
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 |
