summaryrefslogtreecommitdiffstats
path: root/tools/guest-diag
diff options
context:
space:
mode:
Diffstat (limited to 'tools/guest-diag')
-rw-r--r--tools/guest-diag/pin_gr_stream.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/guest-diag/pin_gr_stream.py b/tools/guest-diag/pin_gr_stream.py
index 776b440..0bd6759 100644
--- a/tools/guest-diag/pin_gr_stream.py
+++ b/tools/guest-diag/pin_gr_stream.py
@@ -261,6 +261,18 @@ def _demand_loop():
(r.stdout or "")[-200000:]):
va = int(m.group(1) or m.group(2) or m.group(3), 16)
track.setdefault(va, [now, 0.0])
+ # SESSION 153-CONTINUED-51: the pushzero line now carries the
+ # push length; a zero-head WINDOW push spans 1-2 pages, and the
+ # demand of a single page leaves the capture zero - expand the
+ # range and demand every page so the guest pagemap resolves the
+ # whole push at once (bulk demand instead of one page per cycle).
+ for m in re.finditer(
+ r"sema-pushzero: h=0x[0-9a-f]+ va=(0x[0-9a-f]+) len=(\d+)",
+ (r.stdout or "")[-200000:]):
+ zva = int(m.group(1), 16)
+ zlen = int(m.group(2))
+ for zoff in range(0, min(zlen, 0x8000), 0x1000):
+ track.setdefault(zva + zoff, [now, 0.0])
for va in list(track):
first, last = track[va]
if now - first > 300.0:
@@ -268,6 +280,9 @@ def _demand_loop():
todo = [va for va, (f, l) in track.items() if now - l > 20.0]
if not todo:
continue
+ # CONT-51: bound one batch's command size (a page-expanded push
+ # range can add many pages; the remainder goes next cycle).
+ todo = todo[:48]
cmd = _demand_write_cmd(todo)
try:
vexec(cmd, 30)