diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-29 15:34:18 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-29 15:34:18 -0400 |
| commit | 74fb010669c351eb9eeba733fae6e000fdff34dd (patch) | |
| tree | 951963055429a2bf06757f5ccb9ce495e41d4dae /tools/guest-diag/semfix_watch.py | |
| parent | 8650b225e910e6ba3ac8d2e22c8a4d18453e3b75 (diff) | |
| download | open-iov-74fb010669c351eb9eeba733fae6e000fdff34dd.tar.gz open-iov-74fb010669c351eb9eeba733fae6e000fdff34dd.zip | |
sema-svc: apply releases before push memsets; poller: bypass read cache
Diffstat (limited to 'tools/guest-diag/semfix_watch.py')
| -rw-r--r-- | tools/guest-diag/semfix_watch.py | 7 |
1 files changed, 4 insertions, 3 deletions
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): |
