epics-modules / devlib2

Helper library for memory mapped bus access
http://epics-modules.github.io/devlib2/
Other
4 stars 8 forks source link

Linux: Simulate MMIO with userfaultfd() #6

Closed mdavidsaver closed 3 years ago

mdavidsaver commented 4 years ago

I think it would be possible to use the Linux userfaultfd() mechanism to enable in-process simulation of MMIO devices (as opposed to eg. QEMU models). Might be helpful in driver unit testing.

mdavidsaver commented 3 years ago

Turns out this isn't possible. The value being written is not available to the fault handler.