The reply with the code keeps being moderated.
https://www.codepile.net/pile/wWGwx8WX -> code link
Also, open(/sys/bus/pci/devices/.../resource2, ...) + mmap(..., 0) shows same performance.
I don't use UIO driver for IVSHMEM-plain BAR region allocation, although I don't know which method the original author used.