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.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c
index 990e33c..821357b 100644
--- a/kernel/gsp_phys_booter.c
+++ b/kernel/gsp_phys_booter.c
@@ -19231,10 +19231,9 @@ static u32 gsp_phys_gr_vs_scan(const struct gsp_phys_gr_submit *req,
return 0;
for (i = 0; i < req->n_data && i < 1025u; i++) {
u64 va = req->data[i].va;
- u64 rva = req->data[i].reloc_va;
const u8 *p;
- if (!rva || va < 0x120400000ULL || va >= 0x120800000ULL)
+ if (va < 0x120400000ULL || va >= 0x120800000ULL)
continue;
p = (const u8 *)__va(req->data[i].hpa);
if (!p)
@@ -19249,8 +19248,16 @@ static u32 gsp_phys_gr_vs_scan(const struct gsp_phys_gr_submit *req,
continue;
sc = gsp_phys_gr_vs_score(p + off);
if (sc > best) {
+ /*
+ * Bind the GUEST VA: the window patch's pair
+ * resolver checks req->data/req->pages and
+ * rewrites it to an engine-visible shadow.
+ * The data page's reloc_va is server-managed
+ * and would MISS/abort the launch (c816:
+ * MME-CARRY-ABORT rc=-42).
+ */
best = sc;
- *base_va = rva + off;
+ *base_va = va + off;
*off_out = off;
}
}