# native_alias_8_5: Dirty resources over one another's guest memory, then a suspend (pgtest/alias_util.py): the alias generator's programs at fixed seeds. Two or three tasks, with IDs drawn from 1-47, map their data pages to one pool of guest pages; each task's private buffers and textures lie on pages of their own, which the other tasks' resources share. Execs write them on the GPU, most under invalidateGuest (their guest copies go stale), some without it, some synchronized (53) or discarded (63) after. rvg_device_will_suspend flushes every task: in ascending task ID, each task's stale resources written back and waited for before the next task's. Where resources of two tasks overlap, the pool's bytes after the flush say which task's flush came last; rvg_device_finish_suspend then finds nothing stale. Every setup runs: in the service buffers are detach resources over guest memory (their writes land at once, nothing of theirs is flushed) and textures are paged as in-process. Resources of one task that alias one another are left out: their write-backs share one blit encoder, which Metal runs concurrently, so their bytes interleave differently on every run (alias_util's measurement). {"op": "config", "ram": [["0x40000000", "0x4000000"]], "stamp_gpa": "0x40008000", "stamp_slots": 2, "watchdog_s": 30} {"off": "0x1034", "op": "mmio_w", "val": "0xf5"} {"off": "0x101c", "op": "mmio_w", "val": "0x10001"} {"off": "0x1030", "op": "mmio_w", "val": "0x10002"} {"off": "0x1004", "op": "mmio_w", "val": "0x8000"} {"off": "0x1010", "op": "mmio_w", "val": "0x400"} {"off": "0x1000", "op": "mmio_w", "val": "0x1"} {"byte": 64, "gpa": "0x40010000", "len": "0x4000", "op": "fill"} {"byte": 65, "gpa": "0x40014000", "len": "0x4000", "op": "fill"} {"byte": 66, "gpa": "0x40018000", "len": "0x4000", "op": "fill"} {"byte": 67, "gpa": "0x4001c000", "len": "0x4000", "op": "fill"} {"gpa": "0x40044000", "hex": "08000180", "op": "mem"} {"gpa": "0x40044004", "hex": "09000180", "op": "mem"} {"gpa": "0x40044008", "hex": "0a000180", "op": "mem"} {"gpa": "0x4004400c", "hex": "0b000180", "op": "mem"} {"gpa": "0x40044010", "hex": "0c000180", "op": "mem"} {"gpa": "0x40044014", "hex": "0d000180", "op": "mem"} {"gpa": "0x40044018", "hex": "0e000180", "op": "mem"} {"gpa": "0x4004401c", "hex": "0f000180", "op": "mem"} {"gpa": "0x40044020", "hex": "04000180", "op": "mem"} {"gpa": "0x40044024", "hex": "05000180", "op": "mem"} {"gpa": "0x40044028", "hex": "06000180", "op": "mem"} {"gpa": "0x4004402c", "hex": "07000180", "op": "mem"} {"gpa": "0x40040000", "hex": "11000100010000000000000000000000000000000000000000000000000000000000000000000000", "op": "mem"} {"gpa": "0x40024000", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40024010", "hex": "00400000000000000800000001000000", "op": "mem"} {"gpa": "0x40024020", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40024030", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40024040", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40024050", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40024060", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40024070", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40024080", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40024090", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x400240a0", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x400240b0", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x400240c0", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x400240d0", "hex": "0040000000000000090000000100010000000000000000000000000000000000010101040000000000000000004000000000000000010000000000004000000040000000010000000100000000000000000000000203460040000000400000000100000001000100010020000000000000000000", "op": "mem"} {"gpa": "0x40024150", "hex": "00800000000000000a00000001000000", "op": "mem"} {"gpa": "0x4006c000", "hex": "12000180", "op": "mem"} {"gpa": "0x4006c004", "hex": "13000180", "op": "mem"} {"gpa": "0x4006c008", "hex": "14000180", "op": "mem"} {"gpa": "0x4006c00c", "hex": "15000180", "op": "mem"} {"gpa": "0x4006c010", "hex": "16000180", "op": "mem"} {"gpa": "0x4006c014", "hex": "17000180", "op": "mem"} {"gpa": "0x4006c018", "hex": "18000180", "op": "mem"} {"gpa": "0x4006c01c", "hex": "19000180", "op": "mem"} {"gpa": "0x4006c020", "hex": "04000180", "op": "mem"} {"gpa": "0x4006c024", "hex": "05000180", "op": "mem"} {"gpa": "0x4006c028", "hex": "06000180", "op": "mem"} {"gpa": "0x4006c02c", "hex": "07000180", "op": "mem"} {"gpa": "0x40068000", "hex": "1b000100010000000000000000000000000000000000000000000000000000000000000000000000", "op": "mem"} {"gpa": "0x4004c000", "hex": "00400000000000000800000001000000", "op": "mem"} {"gpa": "0x4004c010", "hex": "00400000000000000b0000000100010000000000000000000000000000000000010101040000000000000000001000000000000000010000000000004000000010000000010000000100000000000000000000000203460040000000100000000100000001000100010020000000000000000000", "op": "mem"} {"gpa": "0x4004c090", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4004c0a0", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4004c0b0", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4004c0c0", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4004c0d0", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4004c0e0", "hex": "00400000000000000900000001000000", "op": "mem"} {"gpa": "0x4004c0f0", "hex": "00400000000000000a00000001000000", "op": "mem"} {"gpa": "0x40094000", "hex": "1c000180", "op": "mem"} {"gpa": "0x40094004", "hex": "1d000180", "op": "mem"} {"gpa": "0x40094008", "hex": "1e000180", "op": "mem"} {"gpa": "0x4009400c", "hex": "1f000180", "op": "mem"} {"gpa": "0x40094010", "hex": "20000180", "op": "mem"} {"gpa": "0x40094014", "hex": "21000180", "op": "mem"} {"gpa": "0x40094018", "hex": "22000180", "op": "mem"} {"gpa": "0x4009401c", "hex": "23000180", "op": "mem"} {"gpa": "0x40094020", "hex": "04000180", "op": "mem"} {"gpa": "0x40094024", "hex": "05000180", "op": "mem"} {"gpa": "0x40094028", "hex": "06000180", "op": "mem"} {"gpa": "0x4009402c", "hex": "07000180", "op": "mem"} {"gpa": "0x40090000", "hex": "25000100010000000000000000000000000000000000000000000000000000000000000000000000", "op": "mem"} {"gpa": "0x40074000", "hex": "00400000000000000800000001000000", "op": "mem"} {"gpa": "0x40008400", "hex": "380000001c0000000100000002000000000003000000000010000100", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x1c"} {"ge": "0x1", "gpa": "0x40008000", "label": "define task 1", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40020000", "hex": "00000000000000000000000001100000004000000000000001100000104000000000000001100000204000000000000001100000304000000000000001100000404000000000000001100000504000000000000001100000604000000000000001100000704000000000000001100000804000000000000001100000904000000000000001100000a04000000000000001100000b04000000000000001100000c04000000000000002740000d040000000000000011000005041000000000000", "op": "mem"} {"gpa": "0x4000841c", "hex": "3300000018000000020000000100000000000000c0000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x34"} {"ge": "0x2", "gpa": "0x40008000", "label": "object list of task 1", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40008434", "hex": "380000001c000000030000005400000000000300000000001a000100", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x50"} {"ge": "0x3", "gpa": "0x40008000", "label": "define task 42", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40048000", "hex": "00000000000000000000000001100000004000000000000002740000104000000000000001100000904000000000000001100000a04000000000000001100000b04000000000000001100000c04000000000000001100000d04000000000000001100000e04000000000000001100000f040000000000000", "op": "mem"} {"gpa": "0x40008450", "hex": "3300000018000000040000002a0000000000000078000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x68"} {"ge": "0x4", "gpa": "0x40008000", "label": "object list of task 42", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40008468", "hex": "380000001c0000000500000038000000000003000000000024000100", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x84"} {"ge": "0x5", "gpa": "0x40008000", "label": "define task 28", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40070000", "hex": "000000000000000000000000011000000040000000000000", "op": "mem"} {"gpa": "0x40008484", "hex": "3300000018000000060000001c0000000000000018000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x9c"} {"ge": "0x6", "gpa": "0x40008000", "label": "object list of task 28", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40058000", "hex": "2800000002000000320100002000000001000000002600000000000040000000000000001a000000", "op": "mem"} {"gpa": "0x4000849c", "hex": "4300000030000000070000002a0000000100000001000000010000000200000000000100000000002800000000000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0xcc"} {"ge": "0x7", "gpa": "0x40008000", "label": "write 0: task 42, 1", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40030000", "hex": "6c0000000200000041010000640000000e000000000000000e0000000000000006000000000000000100000000000000210000000000000033000000000000000000000000000000111111111111e13f131313131313e33f151515151515e53f000000000000f03f46000000", "op": "mem"} {"gpa": "0x400084cc", "hex": "4300000030000000080000000100000001000000010000000e0000000200000000000100000000006c00000000000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0xfc"} {"ge": "0x8", "gpa": "0x40008000", "label": "write 1: task 1, 14", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40030000", "hex": "8c0000000200000032010000200000000f000000000c0000000000000004000000000000a200000041010000640000000e00000000000000010000000000000001000000000000000100000000000000100000000000000038000000000000000000000000000000737373737373e33f3a3a3a3a3a3aea3f1c1c1c1c1c1c9c3f000000000000f03f46000000", "op": "mem"} {"gpa": "0x400084fc", "hex": "4300000038000000090000000100000002000000010000000f000000020000000e0000000200000000000100000000008c00000000000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x134"} {"ge": "0x9", "gpa": "0x40008000", "label": "write 2: task 1, 15, 14", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40030000", "hex": "2800000002000000320100002000000002000000c03900000000000040060000000000005a000000", "op": "mem"} {"gpa": "0x40008534", "hex": "43000000300000000a000000010000000100000001000000020000000000000000000100000000002800000000000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x164"} {"ge": "0xa", "gpa": "0x40008000", "label": "write 3: task 1, 2", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40008564", "hex": "3f000000180000000b000000010000000100000002000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x17c"} {"ge": "0xb", "gpa": "0x40008000", "label": "discard 2 of task 1", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40030000", "hex": "8c0000000200000041010000640000000e000000000000000c00000000000000030000000000000001000000000000002a000000000000003b000000000000000000000000000000383838383838e83fd1d0d0d0d0d0d03fb9b8b8b8b8b8e83f000000000000f03f46000000320100002000000002000000800800000000000000010000000000006d000000", "op": "mem"} {"gpa": "0x4000857c", "hex": "43000000380000000c0000000100000002000000010000000e00000002000000020000000000000000000100000000008c00000000000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x1b4"} {"ge": "0xc", "gpa": "0x40008000", "label": "write 4: task 1, 14, 2", "op": "wait", "timeout_ms": 5000} {"gpa": "0x400085b4", "hex": "35000000180000000d000000010000000100000002000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x1cc"} {"ge": "0xd", "gpa": "0x40008000", "label": "synchronize 2 of task 1", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40030000", "hex": "28000000020000003201000020000000020000004009000000000000400000000000000080000000", "op": "mem"} {"gpa": "0x400085cc", "hex": "43000000300000000e000000010000000100000001000000020000000200000000000100000000002800000000000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x1fc"} {"ge": "0xe", "gpa": "0x40008000", "label": "write 5: task 1, 2", "op": "wait", "timeout_ms": 5000} {"gpa": "0x400085fc", "hex": "3f000000180000000f000000010000000100000002000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x214"} {"ge": "0xf", "gpa": "0x40008000", "label": "discard 2 of task 1", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40010000", "label": "before the suspend", "len": "0x10000", "op": "diff"} {"name": "willSuspend", "op": "api"} {"gpa": "0x40010000", "label": "after willSuspend", "len": "0x10000", "op": "diff"} {"name": "finishSuspend", "op": "api", "slot": "s"} {"gpa": "0x40010000", "label": "after finishSuspend", "len": "0x10000", "op": "diff"} {"label": "end", "op": "events"}