diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-07 14:25:18 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-07 14:25:18 -0400 |
| commit | 1cba231142fcaa88467b196ede280b5618b1bb82 (patch) | |
| tree | 15754ef56dc9d4a70b31a44ea174c0d49abace96 /kernel/gsp_phys_booter.h | |
| parent | c9e7d41a70dd2212a927f42fcf4acbddb733bdd7 (diff) | |
| download | open-iov-1cba231142fcaa88467b196ede280b5618b1bb82.tar.gz open-iov-1cba231142fcaa88467b196ede280b5618b1bb82.zip | |
vgsp: m99 - identity-map the forwarded kernel's guest data pages into the engine tree
The m97/m98 decode proved the SM instruction fetch and const reads work;
the wall is the kernel's first global data access (prologue instruction at
+0x80) to a guest-VA device pointer (param page words 6..9 carry the demo's
two 16MB buffers at 0x763dXXXXXXXX), which is not mapped in the engine's
page tables. The walker walks OUR root->PD2->PD1->PD0->PT tree (SC PDB ==
our VASPDB chunk, proven by matching the same-run INST base to the PDB-root
DMA log), and fresh direct-planted tables are visible at first fetch.
Service side (gsp_sema_service.c): svc_gr_data_fill() scans the param
(c[0x0]) page for plausible device VAs, resolves the containing 2MB windows
(-1..+16 windows, early stop when a window resolves nothing) via
svc_resolve_va on the service thread, and carries {va, pa} in
svc_fwd_req.gr_data; svc_fwd_gr_work() converts PA->HPA and attaches the
list to the submit.
Backend (gsp_phys_booter.c): gsp_phys_rmcall_gr_data_map() plants VA->HPA
leaf PTEs (GENERIC_MEMORY kind 0x06, like UVM/RM on Turing) into lazily
allocated PD1/PD0/PT chunk branches under root[0] (VAs < 2^47), caching
branches per index; the submit maps all req->data pages before publish and
logs the count.
Diffstat (limited to 'kernel/gsp_phys_booter.h')
| -rw-r--r-- | kernel/gsp_phys_booter.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/gsp_phys_booter.h b/kernel/gsp_phys_booter.h index e46fb86..29cf07f 100644 --- a/kernel/gsp_phys_booter.h +++ b/kernel/gsp_phys_booter.h @@ -362,6 +362,12 @@ struct gsp_phys_gr_inline { u8 data[GSP_PHYS_GR_INLINE_BYTES]; }; +/* m99: one guest data page identity-mapped into the engine's page tree. */ +struct gsp_phys_gr_data_page { + u64 va; /* guest VA, page aligned */ + u64 hpa; /* host PA, page aligned */ +}; + struct gsp_phys_gr_submit { const u32 *qmd; /* 64 rewritten-QMD source words */ u32 qmd_words; /* must be GSP_PHYS_GR_QMD_WORDS */ @@ -382,6 +388,8 @@ struct gsp_phys_gr_submit { u32 n_pages; const struct gsp_phys_gr_inline *inl; u32 n_inl; + const struct gsp_phys_gr_data_page *data; /* m99: identity pages */ + u32 n_data; u64 rel_hpa; /* guest-visible QMD release0 page, or 0 */ u32 rel_off; u32 rel_payload; |
