Developing I / O Applications for the Kernel

I read the following links about user I / O: http://www.hep.by/gnu/kernel/uio-howto/

and after http://nairobi-embedded.org/uio_example.html .

I am using an ivshmem device to map memory from host to guest (in QEmu). The client driver I am using is kernel_module / uio / uio_ivshmem.c from https://www.gitorious.org/nahanni/guest-code .

I have had success sharing memory between multiple guests, and I can also issue host-to-guest interrupts using the ivshmem server from the git repository above.

But I can’t understand how I can “interrupt” a guest to notice that the write to memory is complete. That is, a signal to another guest that he should read what the first guest wrote.

What am I doing wrong? Is there a way to send interrupts using UIO or can I only get? How else should I notice that I have finished writing / reading?

+6
source share
1 answer

Ok, now I understand why I can not send interrupts.

I tried using test applications, but as you can read this post ( http://lists.gnu.org/archive/html/qemu-devel/2014-08/msg05388.html ), the patch in the kernel broke uio_ivshmem.c.

This patch made ivshmem unable to display BAR0, which is used to send interrupts. BAR2 is still beautiful and can be used to exchange data, although interrupts do not work.

+2
source

Source: https://habr.com/ru/post/981150/


All Articles