From b05cd671aef2819809654000c7f1953e807224bf Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Sun, 15 Nov 2026 19:21:36 -0500 Subject: vgsp: eng73 - witness the big-surface alias pages in GUEST-WIT c819: VS0=0x1e101f4 and SZ0=0x1f0c are bound on the release and the DRAW_IAB runs, but the GUEST-WIT changes are the release/report pages (0x4238000, 0x41a1000) and the 2 operand pages - the render target is written through the big-surface ALIAS (RT0 target 0xa000000/0xc000000), whose HPAs are the client's surface pages, not any tracked data record or req->pages entry. Add every mapped surface alias page (alias VA 0xa000000..0xdffffff) to the witness set; an RT store then appears as GUEST-WIT changed on an alias VA. --- kernel/gsp_phys_booter.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index 3269233..13aedf9 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -28437,6 +28437,26 @@ static void gsp_phys_gr_wit_capture(const struct gsp_phys_gr_submit *req) for (k = 0; req && k < req->n_pages; k++) gsp_phys_gr_wit_note(req->pages[k].guest_va, req->pages[k].hpa); + /* + * eng73: the render target is written through the big-surface + * ALIAS (RT0 target 0xa000000/0xc000000), whose HPAs are the + * client's surface pages - not necessarily any tracked data record + * or req->pages entry. Add every mapped surface alias page to the + * witness set so an RT store is provable (GUEST-WIT changed on an + * alias VA). The alias cache is written under gsp_phys_rm_lock. + */ + { + u32 ai, an = READ_ONCE(boot_stage.rmcall_gr_alias_count); + + for (ai = 0; ai < an && + ai < GSP_PHYS_RMCALL_GR_ALIAS_CACHE; ai++) { + u64 ava = READ_ONCE(boot_stage.rmcall_gr_alias_va[ai]); + u64 ahpa = READ_ONCE(boot_stage.rmcall_gr_alias_hpa[ai]); + + if (ava >= 0xa000000ULL && ava < 0xe000000ULL) + gsp_phys_gr_wit_note(ava, ahpa); + } + } for (k = 0; k < gsp_phys_gr_gap_n; k++) gsp_phys_gr_wit_note(gsp_phys_gr_gap[k].va, gsp_phys_gr_gap[k].hpa); -- cgit v1.2.3