summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_phys_booter.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-07 15:33:31 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-07 15:33:31 -0400
commit7f37c4197c95e5d91b633c10025d012715e04a8e (patch)
tree122b034801f52f3e2cadd9aa3d027e92f056c778 /kernel/gsp_phys_booter.c
parent9a3140ddb465ab26594799197de3b41f32b528bc (diff)
downloadopen-iov-7f37c4197c95e5d91b633c10025d012715e04a8e.tar.gz
open-iov-7f37c4197c95e5d91b633c10025d012715e04a8e.zip
vgsp: m113 - re-register the VAS page directory after planting data (re-commit probe)
All late engine-tree writes are invisible to the SM walker (only the commit-time snapshot resolves); the mail injection at a main-window fresh slot also fails (m112). Probe whether UNSET+SET_PAGE_DIRECTORY on the ladder VAS after planting forces the server walker to re-snapshot the tree; gated by gr_recommit.
Diffstat (limited to 'kernel/gsp_phys_booter.c')
-rw-r--r--kernel/gsp_phys_booter.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c
index 772530d..86205d1 100644
--- a/kernel/gsp_phys_booter.c
+++ b/kernel/gsp_phys_booter.c
@@ -17113,6 +17113,46 @@ gr_page_unmapped:
}
pr_info("vgsp-gr: guest data identity-map: %u pages in the engine tree, %u failed (pt pages=%u)\n",
dmapped, dfailed, boot_stage.rmcall_gr_data_pt_n);
+ if (gsp_phys_rmcall_gr_recommit_value()) {
+ struct gsp_phys_rmcall_pdb_params rp;
+ struct {
+ __le32 h_va_space;
+ __le32 ch_id;
+ __le32 sub_device_id;
+ } up;
+ u32 rr = 0, st = 0;
+ int rc;
+
+ memset(&rp, 0, sizeof(rp));
+ rp.phys_address = cpu_to_le64((u64)
+ gsp_phys_chunk_page_dma(
+ &boot_stage.rmcall_chunks
+ [GSP_PHYS_RMCALL_BUF_VASPDB], 0));
+ rp.num_entries = cpu_to_le32(
+ GSP_PHYS_RMCALL_PDB_NUM_ENTRIES);
+ rp.flags = cpu_to_le32(
+ GSP_PHYS_RMCALL_PDB_FLAG_APERTURE_SYSMEM_NONCOH |
+ GSP_PHYS_RMCALL_PDB_FLAG_ALL_CHANNELS);
+ rp.h_va_space = cpu_to_le32(boot_stage.rmcall_vas);
+ memset(&up, 0, sizeof(up));
+ up.h_va_space = cpu_to_le32(boot_stage.rmcall_vas);
+ rc = gsp_phys_rmcall_control(bar0,
+ boot_stage.rmcall_device, 0x801814u,
+ &up, sizeof(up), sizeof(up), NULL, 0,
+ &rr, &st, "DMA_UNSET_PAGE_DIRECTORY");
+ pr_info("vgsp-gr: re-commit UNSET: ret=%d status=0x%x rpc=0x%x\n",
+ rc, st, rr);
+ rr = 0;
+ st = 0;
+ rc = gsp_phys_rmcall_control(bar0,
+ boot_stage.rmcall_device,
+ GSP_PHYS_RMCALL_CTRL_DMA_SET_PAGE_DIRECTORY,
+ &rp, sizeof(rp), sizeof(rp), &rp,
+ sizeof(rp), &rr, &st,
+ "DMA_SET_PAGE_DIRECTORY re-commit");
+ pr_info("vgsp-gr: re-commit SET: ret=%d status=0x%x rpc=0x%x\n",
+ rc, st, rr);
+ }
}
if (gsp_phys_rmcall_gr_gpc_mmu_init_value())
gsp_phys_rmcall_gr_gpc_mmu_init(bar0);