Ethin wrote:
1. Is it feasible to "mirror" a mapped region automatically? For example, assume that I want to allocate a shared memory buffer in a userspace process to allow access to hardware. Then assume that that very same buffer needs access by another process. I could change the BARs associated with the device to use an address in physical memory that's associated with the first process, but if I change the BARs for the second process, the first process can no longer access the memory.
For me, it makes total sense that each process has a separate mapping in its own virtual memory.
Ethin wrote:
2. Is it a good idea to allow a userspace process to have access to, say, the ATA BAR regions if the process in question is an ATA driver in a microkernel? Or should that be conducted through IPC or syscalls?
I'm not writing a microkernel so, I might not be the right person to answer this question but, my 2 cents are: yes, in a microkernel it makes sense to have some special userspace processes that can control some hardware devices directly. Doing everything through IPC/syscalls might lead to unacceptable performance issues.