summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_phys_booter.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/gsp_phys_booter.c')
-rw-r--r--kernel/gsp_phys_booter.c20
1 files changed, 20 insertions, 0 deletions
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);