summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-08 16:54:15 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-08 16:54:15 -0400
commita766cc1beff625c5577f2d70630a17e2e229d02a (patch)
treeaa0293fa45d7c64ee4dccbf3f4ed072c63233f6a
parent82404ad9e18f5ae4714a19d678891a38ac67410e (diff)
downloadopen-iov-a766cc1beff625c5577f2d70630a17e2e229d02a.tar.gz
open-iov-a766cc1beff625c5577f2d70630a17e2e229d02a.zip
vgsp: PROBE - expose physical BAR1 size again (m143 exposure correlates with the cudaMalloc spin)
Every build since m143 reports BAR1=512MB to the guest and stalls the client inside its first cudaMalloc; the m140 green reference reported BAR1=256MB with the same 512 MiB shadow. Revert to the physical aperture size as the single-variable probe for ISSUE-0001.
-rw-r--r--kernel/bar_init.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/kernel/bar_init.c b/kernel/bar_init.c
index b5703d8..6515613 100644
--- a/kernel/bar_init.c
+++ b/kernel/bar_init.c
@@ -57,15 +57,22 @@ int nv_vgpu_bar_init(struct nv_vgpu_device *vgpu)
if (bar_addr && bar_size) {
vgpu->bars[1].gpa = bar_addr;
/*
- * m143 (1.0 VRAM sizes): expose the EMULATED framebuffer size as
- * BAR1's size, not the physical aperture. The guest derives its
- * BAR1 from the VFIO region info (config-space BAR writes are
- * ignored) and every GSCI/PFB report already carries
- * fb_emul_size; leaving the physical 256 MB here made 1G/2G types
- * tell the guest one size and expose another (the shadow is
- * fb_emul_size, so vidmem bounds and mmap math must match it).
+ * PROBE (2026-10-08, ISSUE-0001): m143 exposed the emulated
+ * framebuffer size (512 MB for the turing type) as BAR1; every
+ * build since the green m140 reference reports BAR1=512MB to
+ * the guest and the client spins in its first cudaMalloc with
+ * both counter families written (guest RAM verified). The m140
+ * green run reported BAR1=256MB (physical aperture) with the
+ * same 512 MiB shadow and reached VADD. Restore the physical
+ * size here as a single-variable probe: if this goes green,
+ * m143's exposure is the stall trigger and the 1G/2G feature
+ * must make the guest work with the larger aperture instead of
+ * assuming it does. (m143: expose the EMULATED framebuffer size
+ * as BAR1's size, not the physical aperture - the guest derives
+ * its BAR1 from the VFIO region info and vidmem bounds/mmap
+ * math must match the shadow.)
*/
- vgpu->bars[1].size = nv_vgpu_fb_emul_size(vgpu);
+ vgpu->bars[1].size = 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