I made some progress with implementing
drmIoctl. I also improved
drmIoctl decoder that allows to log interaction between Vulkan userland driver and
amdgpu. Now it crash because shader buffer is NULL.
I also found a way to avoid mmap call. There is drm_mmap macro in libdrm, I made it redirect to real function drmMmap that internally calls create_area.
I made my own libdrm.so that have no major/minor fd tricks, KMS and most other parts. It is enough for Radeon Vulkan driver. libdrm_amdgpu.so is left unchanged, it provides quite nice abstractions.