diff options
Diffstat (limited to 'kernel/gsp_rm_emulation.c')
| -rw-r--r-- | kernel/gsp_rm_emulation.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/gsp_rm_emulation.c b/kernel/gsp_rm_emulation.c index 2ad1ba7..8318f56 100644 --- a/kernel/gsp_rm_emulation.c +++ b/kernel/gsp_rm_emulation.c @@ -3381,8 +3381,15 @@ static void gsp_rm_handle_set_page_directory(struct gsp_emu_context *ctx, if (desc.b_vidmem) { u8 *base = ctx->vgpu->bars[1].vaddr; + /* + * Bound against the emulated vidmem shadow + * size, not the physical BAR1 aperture: vidmem + * offsets above the aperture (e.g. 262M in the + * 512M turing type) are legitimate (ISSUE-0002 + * r75b). + */ if (base && phys + sizeof(peek) <= - ctx->vgpu->bars[1].size) { + nv_vgpu_fb_emul_size(ctx->vgpu)) { memcpy(peek, base + phys, sizeof(peek)); rc = 0; } |
