#!/usr/bin/env python3 # r673: dump the full record page 0x101499000 and search RAM for the ring/push # VA structures to identify which record is the 16-page push (VA 0x4500000). import numpy as np, struct, os, time RAM="/dev/shm/vgpu-guest-ram" MASK=~0xfff & ((1<<64)-1) img=open(RAM,"rb") fsz=os.path.getsize(RAM) def gpa2off(pa): if pa < 0x80000000: return pa if pa < 0x180000000: return 0x80000000+(pa-0x100000000) return None def off2gpa(off): return off if off < 0x80000000 else 0x100000000+(off-0x80000000) def rd(pa,n): off=gpa2off(pa) if off is None or off+n>fsz: return None img.seek(off); return img.read(n) print("== full record page 0x101499000 ==") d=rd(0x101499000,0x1000) nrec=0 for o in range(0,0x1000,32): p,f,pa,sz=struct.unpack_from("40: print(" ... %d more" % (len(hits)-40))