diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-11-08 07:29:37 -0500 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-11-08 07:29:37 -0500 |
| commit | ba433a148b519124fbe7060a10854de7f7e1f4d0 (patch) | |
| tree | 4660cb82a23af2b88dfc03b30b3b90e864ea3c3d /kernel | |
| parent | 552f034bd126a4332136bd2c245d5535f00728c0 (diff) | |
| download | open-iov-ba433a148b519124fbe7060a10854de7f7e1f4d0.tar.gz open-iov-ba433a148b519124fbe7060a10854de7f7e1f4d0.zip | |
The guest sees a 256 MiB BAR1 over a 512 MiB FB, so the display
instance block at 0x1fff0000 (top of FB) is not directly mappable and
the guest's hash-table writes never reach the emulated vidmem shadow
(r1633: notifier ctxDMA handles 0x10013/0x10075 unresolvable; not in
the shadow, not in guest RAM; 0x20800afa GSP-DMA never sent).
bar1_full=1 exposes the whole emulated FB as BAR1 (the m143 behaviour)
so the test can settle whether the aperture is the missing link; the
default keeps the historical 256 MiB physical aperture (CUDA-safe).
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/bar_init.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/kernel/bar_init.c b/kernel/bar_init.c index 6515613..5fa889a 100644 --- a/kernel/bar_init.c +++ b/kernel/bar_init.c @@ -8,6 +8,11 @@ #include "gsp_phys_gpu.h" #include "irq.h" +static bool nv_vgpu_bar1_full; +module_param_named(bar1_full, nv_vgpu_bar1_full, bool, 0644); +MODULE_PARM_DESC(bar1_full, + "Expose the full emulated FB size as the BAR1 aperture (default 0 = physical 256 MiB; A/B for the display instance-memory mapping)"); + int nv_vgpu_bar_init(struct nv_vgpu_device *vgpu) { struct pci_dev *pdev = vgpu->pdev; @@ -72,7 +77,19 @@ int nv_vgpu_bar_init(struct nv_vgpu_device *vgpu) * its BAR1 from the VFIO region info and vidmem bounds/mmap * math must match the shadow.) */ - vgpu->bars[1].size = bar_size; + /* + * A/B knob for the display instance-memory mapping: the RM + * addresses the 64 KB display instance block at the top of + * the emulated FB (0x1fff0000 with a 512 MiB FB). With the + * physical 256 MiB BAR1 aperture that address is not + * directly mappable, and the guest's instance-memory writes + * never reach the emulated vidmem shadow (r1633: notifier + * context-DMA handles unresolvable). bar1_full=1 exposes + * the whole emulated FB as BAR1 for this test; default 0 + * keeps the historical 256 MiB aperture (CUDA-safe). + */ + vgpu->bars[1].size = nv_vgpu_bar1_full ? + nv_vgpu_fb_emul_size(vgpu) : bar_size; /* Emulated vidmem: a dedicated host-RAM buffer backing the guest's * VRAM aperture. Do NOT map the host GPU's real BAR1 - guest VRAM * accesses must hit our own clean buffer, not the (broken) host |
