# native_alias_5_4: 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"} {"gpa": "0x4003c000", "hex": "06000180", "op": "mem"} {"gpa": "0x4003c004", "hex": "07000180", "op": "mem"} {"gpa": "0x4003c008", "hex": "08000180", "op": "mem"} {"gpa": "0x4003c00c", "hex": "09000180", "op": "mem"} {"gpa": "0x4003c010", "hex": "0a000180", "op": "mem"} {"gpa": "0x4003c014", "hex": "0b000180", "op": "mem"} {"gpa": "0x4003c018", "hex": "0c000180", "op": "mem"} {"gpa": "0x4003c01c", "hex": "0d000180", "op": "mem"} {"gpa": "0x4003c020", "hex": "04000180", "op": "mem"} {"gpa": "0x4003c024", "hex": "05000180", "op": "mem"} {"gpa": "0x40038000", "hex": "0f000100010000000000000000000000000000000000000000000000000000000000000000000000", "op": "mem"} {"gpa": "0x4001c000", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4001c010", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4001c020", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4001c030", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4001c040", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4001c050", "hex": "00400000000000000900000001000000", "op": "mem"} {"gpa": "0x4001c060", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4001c070", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4001c080", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4001c090", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4001c0a0", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4001c0b0", "hex": "00400000000000000800000001000000", "op": "mem"} {"gpa": "0x40064000", "hex": "10000180", "op": "mem"} {"gpa": "0x40064004", "hex": "11000180", "op": "mem"} {"gpa": "0x40064008", "hex": "12000180", "op": "mem"} {"gpa": "0x4006400c", "hex": "13000180", "op": "mem"} {"gpa": "0x40064010", "hex": "14000180", "op": "mem"} {"gpa": "0x40064014", "hex": "15000180", "op": "mem"} {"gpa": "0x40064018", "hex": "16000180", "op": "mem"} {"gpa": "0x4006401c", "hex": "17000180", "op": "mem"} {"gpa": "0x40064020", "hex": "04000180", "op": "mem"} {"gpa": "0x40064024", "hex": "05000180", "op": "mem"} {"gpa": "0x40060000", "hex": "19000100010000000000000000000000000000000000000000000000000000000000000000000000", "op": "mem"} {"gpa": "0x40044000", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40044010", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40044020", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40044030", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40044040", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40044050", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40044060", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40044070", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40044080", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x40044090", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x400440a0", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x400440b0", "hex": "00400000000000000800000001000000", "op": "mem"} {"gpa": "0x4008c000", "hex": "1a000180", "op": "mem"} {"gpa": "0x4008c004", "hex": "1b000180", "op": "mem"} {"gpa": "0x4008c008", "hex": "1c000180", "op": "mem"} {"gpa": "0x4008c00c", "hex": "1d000180", "op": "mem"} {"gpa": "0x4008c010", "hex": "1e000180", "op": "mem"} {"gpa": "0x4008c014", "hex": "1f000180", "op": "mem"} {"gpa": "0x4008c018", "hex": "20000180", "op": "mem"} {"gpa": "0x4008c01c", "hex": "21000180", "op": "mem"} {"gpa": "0x4008c020", "hex": "04000180", "op": "mem"} {"gpa": "0x4008c024", "hex": "05000180", "op": "mem"} {"gpa": "0x40088000", "hex": "23000100010000000000000000000000000000000000000000000000000000000000000000000000", "op": "mem"} {"gpa": "0x4006c000", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4006c010", "hex": "00010000000000000800000000000000", "op": "mem"} {"gpa": "0x4006c020", "hex": "00400000000000000900000001000000", "op": "mem"} {"gpa": "0x4006c030", "hex": "0040000000000000080000000100010000000000000000000000000000000000010101040000000000000000000400000000000040000000000000001000000010000000010000000100000000000000000000000203460010000000100000000100000001000100010020000000000000000000", "op": "mem"} {"gpa": "0x40008400", "hex": "380000001c000000010000005200000000800200000000000e000100", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x1c"} {"ge": "0x1", "gpa": "0x40008000", "label": "define task 41", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40018000", "hex": "00000000000000000000000001100000004000000000000001100000104000000000000001100000204000000000000001100000304000000000000001100000404000000000000001100000504000000000000001100000604000000000000001100000704000000000000001100000804000000000000001100000904000000000000001100000a04000000000000001100000b040000000000000", "op": "mem"} {"gpa": "0x4000841c", "hex": "33000000180000000200000029000000000000009c000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x34"} {"ge": "0x2", "gpa": "0x40008000", "label": "object list of task 41", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40008434", "hex": "380000001c0000000300000026000000008002000000000018000100", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x50"} {"ge": "0x3", "gpa": "0x40008000", "label": "define task 19", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40040000", "hex": "00000000000000000000000001100000004000000000000001100000104000000000000001100000204000000000000001100000304000000000000001100000404000000000000001100000504000000000000001100000604000000000000001100000704000000000000001100000804000000000000001100000904000000000000001100000a04000000000000001100000b040000000000000", "op": "mem"} {"gpa": "0x40008450", "hex": "33000000180000000400000013000000000000009c000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x68"} {"ge": "0x4", "gpa": "0x40008000", "label": "object list of task 19", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40008468", "hex": "380000001c000000050000004c000000008002000000000022000100", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x84"} {"ge": "0x5", "gpa": "0x40008000", "label": "define task 38", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40068000", "hex": "000000000000000000000000011000000040000000000000011000001040000000000000011000002040000000000000027400003040000000000000", "op": "mem"} {"gpa": "0x40008484", "hex": "33000000180000000600000026000000000000003c000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x9c"} {"ge": "0x6", "gpa": "0x40008000", "label": "object list of task 38", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40050000", "hex": "280000000200000032010000200000000c0000000012000000000000000400000000000067000000", "op": "mem"} {"gpa": "0x4000849c", "hex": "4300000030000000070000001300000001000000010000000c0000000200000000000100000000002800000000000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0xcc"} {"ge": "0x7", "gpa": "0x40008000", "label": "write 0: task 19, 12", "op": "wait", "timeout_ms": 5000} {"gpa": "0x400084cc", "hex": "3f000000180000000800000013000000010000000c000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0xe4"} {"ge": "0x8", "gpa": "0x40008000", "label": "discard 12 of task 19", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40028000", "hex": "4800000002000000320100002000000006000000401e00000000000040000000000000005000000032010000200000000c000000401400000000000000040000000000007a000000", "op": "mem"} {"gpa": "0x400084e4", "hex": "43000000380000000900000029000000020000000100000006000000020000000c0000000200000000000100000000004800000000000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x11c"} {"ge": "0x9", "gpa": "0x40008000", "label": "write 1: task 41, 6, 12", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40078000", "hex": "8c00000002000000410100006400000004000000000000000b0000000000000003000000000000000100000000000000040000000000000005000000000000000000000000000000555555555555d53f000000000000f03f353535353535e53f000000000000f03f46000000320100002000000003000000803800000000000000010000000000004e000000", "op": "mem"} {"gpa": "0x4000851c", "hex": "43000000380000000a0000002600000002000000010000000400000002000000030000000200000000000100000000008c00000000000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x154"} {"ge": "0xa", "gpa": "0x40008000", "label": "write 2: task 38, 4, 3", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40050000", "hex": "280000000200000032010000200000000c00000000040000000000004000000000000000a0000000", "op": "mem"} {"gpa": "0x40008554", "hex": "43000000300000000b0000001300000001000000010000000c0000000200000000000100000000002800000000000000", "op": "mem"} {"off": "0x1008", "op": "mmio_w", "val": "0x184"} {"ge": "0xb", "gpa": "0x40008000", "label": "write 3: task 19, 12", "op": "wait", "timeout_ms": 5000} {"gpa": "0x40010000", "label": "before the suspend", "len": "0x8000", "op": "diff"} {"name": "willSuspend", "op": "api"} {"gpa": "0x40010000", "label": "after willSuspend", "len": "0x8000", "op": "diff"} {"name": "finishSuspend", "op": "api", "slot": "s"} {"gpa": "0x40010000", "label": "after finishSuspend", "len": "0x8000", "op": "diff"} {"label": "end", "op": "events"}