<feed xmlns='http://www.w3.org/2005/Atom'>
<title>open-iov.git/tools/guest-diag/sem_counters.py, branch m31</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=m31</id>
<link rel='self' href='https://git.vgpu.io/open-iov.git/atom?h=m31'/>
<link rel='alternate' type='text/html' href='https://git.vgpu.io/open-iov.git/'/>
<updated>2026-09-29T12:53:11+00:00</updated>
<entry>
<title>tools: durable guest counter enumeration/injection and VA reader</title>
<updated>2026-09-29T12:53:11+00:00</updated>
<author>
<name>Arthur Hanson Rasmusson</name>
<email>arthur@vgpu.io</email>
</author>
<published>2026-09-29T12:53:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vgpu.io/open-iov.git/commit/?id=6e04a93838cdebbcf9183278cb71bdf1b4235cdc'/>
<id>urn:sha1:6e04a93838cdebbcf9183278cb71bdf1b4235cdc</id>
<content type='text'>
The counter enumeration/injection workflow lived in the guest's /tmp and was
lost on every restart. Make it durable under tools/guest-diag:

- sem_counters.py: translate a process's per-channel u32 completion counters
  (16-byte stride in the /dev/nvidiactl counter page) to guest PAs through
  /proc/&lt;pid&gt;/pagemap; --pairs emits handle,va,pa triples.
- sem_slots.py: read/write the counter slots via /proc/&lt;pid&gt;/mem (fallback
  for the host counter publish).
- read_va.py: hex dump a process VA (UVM sysmem GPU VAs are usually valid
  CPU VAs in the owning process); --u32 for method streams.
- inject_counters.sh: host-side one-shot: push the tool, take the GR handles
  from the live chan_dump, enumerate, then register each counter with
  sema_counter and pin its VA with sema_map_add.
- push_guest_tools.sh: push the new tools after every VM start.
- launch_qemu_direct.sh: parameterized mdev UUID/paths instead of a stale
  hardcoded one; committed so it survives checkouts.
</content>
</entry>
</feed>
