summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_emulation.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-05 12:25:05 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-05 12:25:05 -0400
commit708a3802824358c1770d5ad0b3c2e24fae114eb8 (patch)
tree6d4d98c9279a74464be8c6ba796d994eef81bbce /kernel/gsp_emulation.c
parentf90b1a123a60dea44ac98f05529ec2fd545c26eb (diff)
downloadopen-iov-708a3802824358c1770d5ad0b3c2e24fae114eb8.tar.gz
open-iov-708a3802824358c1770d5ad0b3c2e24fae114eb8.zip
vgsp: per-mdev emulated VRAM size (1.0 multiple mediate sizes)
- nv_vgpu_type_info/ioctl gain vram_mb; nv_vgpu_device gains fb_emul_size bound from the mdev type at create (default 512 MiB). - New nvidia-vgpu-turing-1g type (1024 MiB); turing max_instances 1 -> 2; show_description reports the per-type framebuffer and max_instance. - Thread fb_emul_size through GSCI fb_length/region/frtsOffset, WPR2, NV_PFB_PRI_MMU_LOCAL_MEMORY_RANGE, the vidmem allocator bound and the BAR1 shadow; bar_info callback uses the per-device size. - UNTESTED at commit time: builds clean; validation blocked by the Xid 140 incident (reboot pending). See Handoff-vGPU-IO.md ADDENDUM 48.
Diffstat (limited to 'kernel/gsp_emulation.c')
-rw-r--r--kernel/gsp_emulation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/gsp_emulation.c b/kernel/gsp_emulation.c
index b1c67a4..47c8151 100644
--- a/kernel/gsp_emulation.c
+++ b/kernel/gsp_emulation.c
@@ -750,7 +750,7 @@ int gsp_emu_init(struct nv_vgpu_device *vgpu)
* with GSCI fb_length/frtsOffset and NV_PFB_PRI_MMU_LOCAL_MEMORY_RANGE. */
ctx->boot_stage = 0; /* GSP_BOOT_STAGE_IDLE */
ctx->flcn_kick_count = 0;
- ctx->wpr2_addr_lo = 0x001fe000;
+ ctx->wpr2_addr_lo = (u32)(((nv_vgpu_fb_emul_size(vgpu) - 0x200000) >> 12) << 4);
/* The guest's BAR0 is the emulation shadow (vzalloc'd by
* nv_vgpu_bar_emul_init, mapped to the guest via VFIO mmap) - NOT the