summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-29 15:34:18 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-29 15:34:18 -0400
commitb7636afd9715748396325ec4dd0899c7f42ece17 (patch)
treef54349bf8ccf368ac8bc0292c14cb0285d2ed9b6 /tools
parent7456179c083c33fc5285a175f6b722d109d6735a (diff)
downloadopen-iov-b7636afd9715748396325ec4dd0899c7f42ece17.tar.gz
open-iov-b7636afd9715748396325ec4dd0899c7f42ece17.zip
sema-svc: apply releases before push memsets; poller: bypass read cache
Diffstat (limited to 'tools')
-rwxr-xr-xtools/guest-diag/semfix_uvmt.py8
-rw-r--r--tools/guest-diag/semfix_watch.py7
2 files changed, 8 insertions, 7 deletions
diff --git a/tools/guest-diag/semfix_uvmt.py b/tools/guest-diag/semfix_uvmt.py
index fb0e92e..02d4f9e 100755
--- a/tools/guest-diag/semfix_uvmt.py
+++ b/tools/guest-diag/semfix_uvmt.py
@@ -109,21 +109,21 @@ def uvmt_state(q, sem):
cpu_va + idx*4 (its GPU alias is gpu_va + idx*4, the VA the releasing push
writes).
"""
- vals = q.read64(sem, 12)
+ vals = q.read64(sem, 12, cache=False)
if len(vals) < 2 or not is_kern(vals[0]):
return None
- pv = q.read64(vals[0])
+ pv = q.read64(vals[0], cache=False)
if not pv or not is_kern(pv[0]):
return None
mem = pv[0]
- vas = q.read64(mem + 0x10, 16)
+ vas = q.read64(mem + 0x10, 16, cache=False)
cpu = next((v for v in vas if is_kern(v)), None)
gpu = [v for v in vas if is_gpu(v)]
idx = vals[1] & 0xffff
payload = None
word_pa = None
if cpu is not None:
- w = q.read64(cpu + idx * 4)
+ w = q.read64(cpu + idx * 4, cache=False)
payload = w[0] if w else None
word_pa = q.gva2gpa(cpu + idx * 4)
word_va = (gpu[0] + idx * 4) if gpu else None
diff --git a/tools/guest-diag/semfix_watch.py b/tools/guest-diag/semfix_watch.py
index 1fc6b01..1c33de6 100644
--- a/tools/guest-diag/semfix_watch.py
+++ b/tools/guest-diag/semfix_watch.py
@@ -96,16 +96,17 @@ class Qmp:
def hmp(self, line):
return self.cmd("human-monitor-command", **{"command-line": line}).get("return", "")
- def read64(self, addr, n=1):
+ def read64(self, addr, n=1, cache=True):
key = (addr, n)
- if key in self._cache:
+ if cache and key in self._cache:
return self._cache[key]
out = self.hmp("x/%dgx 0x%x" % (n, addr))
m = re.search(r":(.*)$", out, re.S)
if not m:
return []
vals = [int(x, 16) for x in re.findall(r"0x([0-9a-fA-F]+)", m.group(1))][:n]
- self._cache[key] = vals
+ if cache:
+ self._cache[key] = vals
return vals
def gva2gpa(self, va):