11:29 linkmauve: 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:30 linkmauve: 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:31 linkmauve: 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:50 karolherbst: 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:51 karolherbst: it there is no MMU... guess all you can do is manual relocation...
11:52 linkmauve: It doesn’t. :(
15:42 Hazematman: linkmauve: can you look at Radeon kmd does for r300 class GPUs? that should be pretty comparable to GameCube GPU
15:50 robclark: 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
17:18 karolherbst:peeks around the corner to find the next victim to run OpenCL on...
17:18 karolherbst: though I guess that hw doesn't do compute shaders :D