Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kernel User I/O application development

I've read up on the following links about User I/O: http://www.hep.by/gnu/kernel/uio-howto/

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

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

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

But I cant figure out how I can "interrupt" from the guest to notice that writing to the memory is completed. I.e. signal to the other guest that it should read what the first guest has written.

What am I doing wrong? Is there any way to send interrupts using UIO or can I only receive? How else am I supposed to notice that I'm done writing/reading?

like image 513
netdigger Avatar asked Jan 17 '15 14:01

netdigger


People also ask

What are kernel applications of the OS?

The kernel provides applications with system services such as I/O management, virtual memory, and scheduling. The kernel coordinates interactions of all user processes and system resources. The kernel assigns priorities, services resource requests, and services hardware interrupts and exceptions.

What is user and kernel in OS?

A processor in a computer running Windows has two different modes: user mode and kernel mode. The processor switches between the two modes depending on what type of code is running on the processor. Applications run in user mode, and core operating system components run in kernel mode.

What are the 5 components of an OS kernel?

The main components of an OS mainly include kernel, API or application program interface, user interface & file system, hardware devices and device drivers.


1 Answers

Ok, I've now figured out why I cant send interrupts.

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

This patch made ivshmem unable to map BAR0, which is used to send interrupts. BAR2 is still fine and can be used to share data, though interrupts wont work.

like image 114
netdigger Avatar answered Oct 19 '22 17:10

netdigger