From 7f37c4197c95e5d91b633c10025d012715e04a8e Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Wed, 7 Oct 2026 15:33:31 -0400 Subject: 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. --- kernel/gsp_phys_booter.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'kernel/gsp_phys_booter.c') 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); -- cgit v1.2.3