11:29linkmauve: How do you usually handle virtual<->physical memory addresses? I currently receive a list of commands from userland, which points to virtual memory (of course) in many different commands, and then I have to parse all commands to translate the addresses to physical addresses before sending them to the GPU.
11:30linkmauve: But it seems a bit brittle to match the commands, I could forget some for instance, and then the GPU would read from or worse, write to random memory.
11:31linkmauve: I’m using the UserPtr/UserSlice/UserSliceReader abstractions atm, so I should at least get an EFAULT when the process is trying to make me access memory outside of its virtual space.
11:50karolherbst: linkmauve: well if your GPU has an MMU, you'd just fill page tables and you'd have a VM_BIND UAPI to let userspace assign virtual addresses to bo allocation handles
11:51karolherbst: it there is no MMU... guess all you can do is manual relocation...
11:52linkmauve: It doesn’t. :(
15:42Hazematman: linkmauve: can you look at Radeon kmd does for r300 class GPUs? that should be pretty comparable to GameCube GPU
15:50robclark: if no mmu, and no other means to limit physical memory access, you need to do cmdstream validation anyways.. vc4 or r300 might be good sources of inspiration