diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-07 14:42:02 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-07 14:42:02 -0400 |
| commit | abb6b30b0d1020f30171f3e361a1591baed3676b (patch) | |
| tree | 327da4ffe5f2338de2e497ff7a3e72d173d5f3d5 /kernel/gsp_phys_booter.h | |
| parent | 6fa955affe6ebca807737fcf1e51673e3859aa47 (diff) | |
| download | open-iov-abb6b30b0d1020f30171f3e361a1591baed3676b.tar.gz open-iov-abb6b30b0d1020f30171f3e361a1591baed3676b.zip | |
vgsp: m102 - relocate guest data into the server-managed VA region and rewrite bank pointers
The server refuses UPDATE_PDE_2 (status 0x1f) for guest CUDA VAs: they are
client-managed, while the golden VAS reserves the server-managed region
[0x100000000, 0x11fffffff) (gsp_phys_booter.c:8455). Map each resolved data
page there at an affine-relocated VA (identity HPA, no copies), rewrite every
8-byte pointer value inside the shadowed const-bank pages (banks 0..7) that
falls inside a mapped guest window to the relocated VA, and raise the Tier-1
window pool to 32 windows x 512 PTEs so the relocated pages fit. The kernel
now reaches its real data through the server-installed windows.
Diffstat (limited to 'kernel/gsp_phys_booter.h')
| -rw-r--r-- | kernel/gsp_phys_booter.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/gsp_phys_booter.h b/kernel/gsp_phys_booter.h index 29cf07f..896a436 100644 --- a/kernel/gsp_phys_booter.h +++ b/kernel/gsp_phys_booter.h @@ -366,6 +366,13 @@ struct gsp_phys_gr_inline { struct gsp_phys_gr_data_page { u64 va; /* guest VA, page aligned */ u64 hpa; /* host PA, page aligned */ + u64 reloc_va; /* m102: server-managed VA this hpa is mapped at */ +}; + +/* m102: guest 2 MB window -> relocated (server-managed) window base. */ +struct gsp_phys_gr_data_win { + u64 va_base; /* guest VA window base (2 MB aligned) */ + u64 reloc_base; /* relocated VA window base (2 MB aligned) */ }; struct gsp_phys_gr_submit { @@ -390,6 +397,8 @@ struct gsp_phys_gr_submit { u32 n_inl; const struct gsp_phys_gr_data_page *data; /* m99: identity pages */ u32 n_data; + const struct gsp_phys_gr_data_win *data_wins; /* m102: window map */ + u32 n_data_wins; u64 rel_hpa; /* guest-visible QMD release0 page, or 0 */ u32 rel_off; u32 rel_payload; |
