<feed xmlns='http://www.w3.org/2005/Atom'>
<title>open-iov.git, branch refactor/host-gsp-emulation</title>
<subtitle>Open-IOV vGPU-IO: host-side GSP emulation for unmodified NVIDIA guest drivers
</subtitle>
<id>https://git.vgpu.io/open-iov.git/atom?h=refactor%2Fhost-gsp-emulation</id>
<link rel='self' href='https://git.vgpu.io/open-iov.git/atom?h=refactor%2Fhost-gsp-emulation'/>
<link rel='alternate' type='text/html' href='https://git.vgpu.io/open-iov.git/'/>
<updated>2026-09-21T17:06:58+00:00</updated>
<entry>
<title>Untrack userspace test binary (build artifact)</title>
<updated>2026-09-21T17:06:58+00:00</updated>
<author>
<name>Arthur Hanson Rasmusson</name>
<email>arthur@vgpu.io</email>
</author>
<published>2026-09-21T17:06:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vgpu.io/open-iov.git/commit/?id=85d888e4763837a5b2f5843c771bf6b6d6e6bfe3'/>
<id>urn:sha1:85d888e4763837a5b2f5843c771bf6b6d6e6bfe3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>kernel: Fix GSP emulation shadow binding, eventfd wiring, RPC livelocks + docs suite + repo reorg</title>
<updated>2026-09-21T17:06:51+00:00</updated>
<author>
<name>Arthur Hanson Rasmusson</name>
<email>arthur@vgpu.io</email>
</author>
<published>2026-09-21T17:06:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vgpu.io/open-iov.git/commit/?id=c3a295efd1b1132bbaa5d422cd05b3fa8e89a8bf'/>
<id>urn:sha1:c3a295efd1b1132bbaa5d422cd05b3fa8e89a8bf</id>
<content type='text'>
CRITICAL FIXES (guest driver bring-up):
- gsp_emulation.c: emulation engine bound to the WRONG BAR0 - it polled the
  host physical BAR0 (bars[0].vaddr ioremap) for the doorbell and read RPCs
  from a local dma_alloc_wc buffer, while the guest writes land in the
  vzalloc'd bar0_shadow. The RPC path could never work; PBA writes even
  corrupted the host GPU's physical BAR0+0x3000. gsp_emu_init now binds
  exclusively to bar0_shadow (doorbell/mailbox/PBA aliases;
  shared_mem_dma==0 marks the alias so cleanup never dma_free's it).
- main.c SET_IRQS: DATA_EVENTFD eventfds were DISCARDED ('TODO' + kfree) -
  the guest never received MSI-X completions. Full wiring now:
  eventfd_ctx_fdget per vector, fd -1 clears, dev_close releases refs.
  gsp_emu_inject_completion_interrupt looks up vgpu-&gt;irqs[0].trigger LIVE
  (init-time copy was permanently NULL since QEMU wires after gsp_emu_init).
- gsp_rpc_client.c: BAR_TRAP/MIGRATE in emulation mode called
  gsp_rpc_submit_raw which rings the SAME doorbell the thread polls -
  self-triggered RPC livelock + multi-second stalls. Now fail fast with
  -ENOTSUPP + pr_warn_ratelimited (guest BAR access is direct MMIO).

MORE FIXES:
- main.c: nv_vgpu_config_write returned SIZE_MAX (while(count--) wrap) and
  was dead code while the VFIO write handler did unfiltered byte copies
  (guest could rewrite vendor ID/BARs). Return fixed; VFIO write handler
  now routes through the per-register filter.
- kernel/Makefile: M=$(PWD) used the env var which is stale when invoked
  via the top-level make (pointed at repo root -&gt; kbuild silently built
  NOTHING; explains every 'stale .ko' incident). Now M=$(CURDIR).
- Warnings sweep: header prototypes for mdev/type functions, format casts
  in gsp_comm.c DRY-RUN logs, unused variable.

ROBUSTNESS (harness/tooling):
- vgpu_vm.py: run had no timeout (start could block forever);
  guest_shell recv could block forever on a wedged guest. Both now bounded;
  guest_shell pre-flights guest-ping and reports wedge diagnostics.
- stack_manager.sh: qemu/qemu-debug now launch via the vgpu_vm.py harness
  (workflow rule: never raw QEMU).

REPO REORGANIZATION:
- driver/ (legacy guest-side gsp-vgpu.ko) moved to legacy-driver-guest/
  (reference only, not built; README explains). 3 legacy un-buildable test
  files moved to legacy-driver-guest/kernel-tests/. Top-level Makefile
  cleaned of the dead DRIVER_DIR reference.

DOCUMENTATION SUITE (new):
- docs/GSP_EMULATION_ARCHITECTURE.md - emulator deep-dive: shadow BAR0
  model, doorbell protocol, dispatch table, MSI-X path, lifecycle, memory-
  model caveats
- docs/DEBUGGING.md - QEMU GDB stub workflow, serial console, QMP NMI,
  failure taxonomy, full bring-up validation checklist, EPT-livelock case
  study, version-matrix discipline
- docs/ONBOARDING.md - repo tour, coding standards (incl. virt_to_phys /
  dma_addr_t / get-put rules), first build &amp; test
- docs/VERSION_UPGRADE.md - end-to-end new-driver-version procedure
  (firmware fetch, Ghidra analysis, configs, signatures, validation)
- docs/PERFORMANCE.md - bare-metal A/B methodology + targets
- README.md doc index; STATE.md refreshed; DEVELOPMENT_WORKFLOW.md corrected
  (load order: open-iov-vfio BEFORE nvidia; stock-driver blacklist note)
</content>
</entry>
<entry>
<title>kernel: Fix guest-hang root cause (VFIO mmap garbage PFN) + rebuild mdev remove path</title>
<updated>2026-09-21T16:37:46+00:00</updated>
<author>
<name>Arthur Hanson Rasmusson</name>
<email>arthur@vgpu.io</email>
</author>
<published>2026-09-21T16:37:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vgpu.io/open-iov.git/commit/?id=5d4d26f8e773f2871c1b5c9266b82495d390970e'/>
<id>urn:sha1:5d4d26f8e773f2871c1b5c9266b82495d390970e</id>
<content type='text'>
VFIO mmap (main.c): virt_to_phys() was used on vmalloc-family addresses
(vzalloc'd BAR0 shadow, ioremap'd BAR2/3), producing garbage PFNs. Guest
BAR0 access then hit a KVM make_spte reserved-bits WARN and an
EPT-violation livelock, hard-wedging the guest on every nvidia driver
probe (confirmed via QEMU GDB stub). BAR0 now maps per-page via
vmalloc_to_pfn(); BAR2/3/4/5 map bars[N].gpa directly (like BAR1);
config space uses new nv_vgpu_mmap_virt_to_pfn() helper.

mdev remove path (main.c): old path never list_del'd the device
(available_instances leaked), never ran cleanup (leaked gsp_emu kthread),
never unregistered VFIO (leaked /dev/vfio/N + iommu group), never put
pdev, never freed the struct. New kvmgt-style path: cancel init_work -&gt;
wait fds -&gt; vfio_unregister_group_dev -&gt; cleanup work -&gt; list_del -&gt;
pci_dev_put -&gt; vfio_put_device.

gsp_rpc_client.c: fix dma_map_page dma_addr_t-&gt;int truncation in
gsp_rpc_alloc_emul (corrupts &gt;=4GB IOVAs); export gsp_client_init_emulation.

gsp_emulation.c: export gsp_emu_process_rpc and gsp_emu_get_stats.

main.c: remove wrong MODULE_SOFTDEP("pre: nvidia") - module has zero
nvidia imports, loads standalone, and must load BEFORE nvidia.ko
(it exports nvidia_vgpu_vfio_* for nvidia.ko to import).

nvidia-vgpu-vfio.h: NULL-safe nv_vgpu_{dbg,info,warn,err} macros.

tests/gsp_emulation_test.c: rewritten against current API - drives
gsp_emu_process_rpc() with crafted shared-memory messages (protocol
validation, SCHEDULE/YIELD/NOTIFY/DEBUG dispatch, stress). Builds with
KBUILD_EXTRA_SYMBOLS; depends: open-iov-vfio.

stack_manager.sh: vfio_mdev doesn't exist on &gt;=6.4 (probe per-module);
load-nvidia detects foreign nvidia via /sys/module/nvidia/version and
errors with guidance instead of silently skipping.
</content>
</entry>
<entry>
<title>STATE.md: document available_instances counter-leak fix</title>
<updated>2026-09-21T15:33:29+00:00</updated>
<author>
<name>Arthur Hanson Rasmusson</name>
<email>arthur@vgpu.io</email>
</author>
<published>2026-09-21T15:33:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vgpu.io/open-iov.git/commit/?id=85084a8fc6a95dd88f81bbec31cffa6b4aba56b7'/>
<id>urn:sha1:85084a8fc6a95dd88f81bbec31cffa6b4aba56b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Untrack decompiled GSP sources (decompiled_*.c at version-dir top level)</title>
<updated>2026-09-21T15:31:20+00:00</updated>
<author>
<name>Arthur Hanson Rasmusson</name>
<email>arthur@vgpu.io</email>
</author>
<published>2026-09-21T15:31:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vgpu.io/open-iov.git/commit/?id=9ba056bd7a5d47a01287f66af7a11be9fc9d8fcc'/>
<id>urn:sha1:9ba056bd7a5d47a01287f66af7a11be9fc9d8fcc</id>
<content type='text'>
The firmware/**/decompiled/ ignore covered the subdirectory but not the
decompiled_*.c handler files directly under firmware/&lt;SERIES&gt;/&lt;VER&gt;/.
GSP-derived decompilation output is not tracked in git (regenerable with
the analysis scripts in the same directory).
</content>
</entry>
<entry>
<title>kernel: Add get_available mdev callback (fix leaked available_instances)</title>
<updated>2026-09-21T15:30:46+00:00</updated>
<author>
<name>Arthur Hanson Rasmusson</name>
<email>arthur@vgpu.io</email>
</author>
<published>2026-09-21T15:30:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vgpu.io/open-iov.git/commit/?id=79d86fe350eaa520cda91b3832d30b085d9bcd6f'/>
<id>urn:sha1:79d86fe350eaa520cda91b3832d30b085d9bcd6f</id>
<content type='text'>
The mdev core's shared parent-&gt;available_instances counter leaks whenever
an mdev remove path fails to complete (as happened during the now-fixed
remove crash): creates then fail with -EUSERS while sysfs reports 0
available instances with zero mdevs present.

Implement mdev_driver.get_available to compute availability from the
driver's own authoritative device list instead of the core counter.
Handles the 'nvidia-' prefixed sysfs type names when looking up per-type
max_instances (falls back to 1).
</content>
</entry>
<entry>
<title>Make repo fully path-portable and add reproducible installer</title>
<updated>2026-09-21T15:09:36+00:00</updated>
<author>
<name>Arthur Hanson Rasmusson</name>
<email>arthur@vgpu.io</email>
</author>
<published>2026-09-21T15:09:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vgpu.io/open-iov.git/commit/?id=ad1f7a6a3cd262cc084673ec5cf0c561328ec7c7'/>
<id>urn:sha1:ad1f7a6a3cd262cc084673ec5cf0c561328ec7c7</id>
<content type='text'>
- install.sh: one-command fresh-Ubuntu reproduction (deps, NVIDIA clone
  + patch, GSP firmware fetch from linux-firmware.git with objcopy
  .fwimage extraction + MD5 verify, ordered build, host config, load,
  mdev creation). Wrapper-neutral: works with libvirt/raw QEMU.
- patches/nvidia: regenerated path-independent patch (KBUILD_EXTRA_SYMBOLS
  resolved via $(src)/$(CURDIR) relative to the NVIDIA tree).
- scripts/stack_manager.sh and helper scripts auto-detect repo root
  (OPEN_IOV_ROOT override); no hardcoded developer paths anywhere.
- firmware analysis scripts use script-relative paths (also fixes stale
  firmware/570-GSP references); docs/wiki updated to $OPEN_IOV_ROOT.
- .github/workflows/ci.yml updated for standalone repo layout; firmware
  fetched from linux-firmware in CI.
- Untrack remaining kbuild artifacts (Module.symvers, modules.order,
  *.o.d); gitignore them.
- STATE.md: live project state, limitations, fixed/open bugs.
- README.md: rewritten for clone-and-run reproducibility.
</content>
</entry>
<entry>
<title>repo: Untrack binaries/vendor/wrapper layers, add .gitignore + NVIDIA patches</title>
<updated>2026-09-21T14:40:43+00:00</updated>
<author>
<name>Arthur Hanson Rasmusson</name>
<email>arthur@vgpu.io</email>
</author>
<published>2026-09-21T14:40:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vgpu.io/open-iov.git/commit/?id=0ca41da65d675b624fb6389da1f488a24ea416e1'/>
<id>urn:sha1:0ca41da65d675b624fb6389da1f488a24ea416e1</id>
<content type='text'>
Restructure for clean mirroring to git.vgpu.io/open-iov.git:

- Untrack GSP firmware blobs and decompiled output (firmware/**/*.bin,
  firmware/**/decompiled/) - large, license-restricted NVIDIA binaries.
  Analysis scripts, docs, and address maps remain tracked.
- Untrack nvidia-open-gpu-kernel-modules submodule; our delta against
  upstream tag 610.57.04 is now tracked as a patch series in
  patches/nvidia/ and applied by install.sh after cloning.
- Untrack kernel build artifacts (*.o, *.ko, Module.symvers, ...).
- Untrack Ghidra project databases (*.rep/, *.gpr) - scripts remain.
- Untrack VM images (*.iso, *.img, *.qcow2) and compiled helper binaries.
- Drop git-lfs (.gitattributes) - no large objects remain in git.
- Local QEMU-wrapper layers (scripts/vgpu_vm.py,
  qemu_control.py, qemu_harness.sh) are gitignored: the repo is
  hypervisor-management neutral (libvirt, raw QEMU all work).

All files remain on disk; only git tracking changes. No source code
modified.
</content>
</entry>
<entry>
<title>kernel: Fix mdev PCI config space to match TU104 hardware layout</title>
<updated>2026-09-21T14:40:30+00:00</updated>
<author>
<name>Arthur Hanson Rasmusson</name>
<email>arthur@vgpu.io</email>
</author>
<published>2026-09-21T14:40:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vgpu.io/open-iov.git/commit/?id=7400361f8e5c47c2c36c6598c7006017ba62d945'/>
<id>urn:sha1:7400361f8e5c47c2c36c6598c7006017ba62d945</id>
<content type='text'>
- Fix vendor/device/subsys ID byte order from vGPU type info
- BAR0: 16MB 32-bit non-prefetchable (matches physical TU104)
- BAR1: 256MB 64-bit prefetchable VRAM (consumes BAR2 upper half)
- BAR3: 32MB 64-bit prefetchable (consumes BAR4 upper half)
- Subsystem vendor/device IDs at correct offsets 0x2C/0x2E
- MSI-X: 32 vectors (table size 31), chain to PCIe cap at 0x80
- Capabilities pointer at 0x34 -&gt; PM at 0x40
- Interrupt pin INTA at 0x3D
</content>
</entry>
<entry>
<title>Fix create_mdev.sh type names and update launch_qemu_vgpu.sh with install/run modes</title>
<updated>2026-09-21T08:42:08+00:00</updated>
<author>
<name>Arthur Hanson Rasmusson</name>
<email>arthur@vgpu.io</email>
</author>
<published>2026-09-21T08:42:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vgpu.io/open-iov.git/commit/?id=deed94c0f111ad6c2e092ee5c124688c174ac816'/>
<id>urn:sha1:deed94c0f111ad6c2e092ee5c124688c174ac816</id>
<content type='text'>
</content>
</entry>
</feed>
