#!/usr/bin/env python3 # Guest-side: read the nv_vm_map_pages vmap areas via /proc/kcore and find the # GPFIFO entry pattern (entry0 raw 0x0005980004480000 for va=0x4480000 len=1432). import struct, sys pat = bytes.fromhex("0000480400980500") # 0x0005980004480000 LE class Kcore: def __init__(self): self.fd = open("/proc/kcore", "rb") hdr = self.fd.read(64) e_phoff = struct.unpack_from(" VA 0x%x" % (idx, lo + idx)) if idx >= 0 else "no")) if idx >= 0: # dump the page around the hit base = lo + (idx & ~0xfff) page = kc.read(base, 0x100) print(" page head: %s" % page.hex())