diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-22 21:55:54 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-22 21:55:54 -0400 |
| commit | fcd603db457c0fb035df882abc55397bc854a1cd (patch) | |
| tree | 2be5ebc73b3e9710840921b5ab96552623c6ae79 /kernel/main.c | |
| parent | a7bda851fc7938555eaaf69b062f49efb9d90ece (diff) | |
| download | open-iov-fcd603db457c0fb035df882abc55397bc854a1cd.tar.gz open-iov-fcd603db457c0fb035df882abc55397bc854a1cd.zip | |
BAR2 verify test fix: remove PRAMIN sync + contiguous ALLOC + vidmem VA allocator
Fixes the BAR2 verify test (kbusVerifyBar2_GM107):
1. Removed PRAMIN window sync from emulated BAR1 - the sync was overwriting
test data written by the driver through the vBar2 aperture. The shadow
BAR0 is already consistent (guest writes/reads hit the same shadow location).
2. Added contiguous page allocation for golden image (alloc_pages with order
for large allocations, falling back to individual pages).
3. Added vidmem VA allocator - ALLOC now returns GPU VAs within the emulated
GPU's vidmem range (0x100000 - fb_size) instead of default 4GB, so the
memmgr accepts them.
Verified: driver probes past RmInitNvDevice bus init, reaches golden image
channel allocation (progress from fn-10 FREE timeout).
Diffstat (limited to 'kernel/main.c')
| -rw-r--r-- | kernel/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/main.c b/kernel/main.c index f37be6e..0fea09e 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -1138,6 +1138,11 @@ static int nv_vgpu_vfio_dev_mmap(struct vfio_device *vdev, struct vm_area_struct vma->vm_page_prot)) return -EAGAIN; } + /* Debug: log PRAMIN window mapping for BAR2 verify debugging */ + if (shadow_off <= 0x70e000 && shadow_off + size > 0x70e000) { + pr_info("nvidia-vgpu-vfio: BAR0 mmap covers PRAMIN[0xe000] shadow_off=0x%lx size=0x%lx\n", + shadow_off, size); + } return 0; } |
