shared memory application to run on non rootcell

68 views
Skip to first unread message

anila...@gmail.com

unread,
Mar 6, 2018, 1:19:06 PM3/6/18
to Jailhouse
Jan,
we are tying to access( read & write) from shared memory region between root cell and non rootcell. I cant use ivshm-shared.bin file because I want to load another linux kernel on non rootcell. After booting into non rootcell, how can I write into shared memory region and trigger interrupt so that root cell can receive it. I am using minimal file system in non rootcell and I cant compile and create some application on non rootcell.
Can I create ivshm-shared memory application instead of binary in rootcell. If yes, I can use this application to run on non rootcell to write into share memory region.
please suggest me is there any way to achieve this.
Regards,
Anil

Jan Kiszka

unread,
Mar 7, 2018, 2:07:25 AM3/7/18
to anila...@gmail.com, Jailhouse
Have a look at Documentation/inter-cell-communication.txt and
specifically also https://github.com/henning-schild-work/ivshmem-guest-code.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

a.k...@matellio.com

unread,
Mar 7, 2018, 5:19:21 AM3/7/18
to Jailhouse


Hi,

we followed the steps as mentioned in the below two files.
https://github.com/henning-schild-work/ivshmem-guest-code
Documentation/inter-cell-communication.txt

We are running QEMU in X86_64 laptop.

scenario-1:
----------
able to enable root-cell for shared memory.
loaded ivshmem-demo.bin application for non-root-cell successfully.
interrupts are been sent from demo apps and able to receive "hello from ivshmem " when we run shmem_test.py.
I assume after we receive above "hello ..." message , communication is established and shared memory is tested successfully. Please clarify my assumption or understanding.
ivshmem-demo.c is from the jailhouse tree and we did not do any modification.

scenario-2
------------
tried to communicate between root-cell and non-root-cell linux using shared memory.
followed all steps for enabling root-cell and then non-root-cell-linux.
we tried to verify whether shared memory is present is not using uio_send / uio_read.
parameters given to uio_send is below:
uio_send /dev/uio0 3 3 /dev/uio0
parameters given to uio_read is below:
uio_read /dev/uio0 3

I afraid whether the above parameters given is correct or am i missing some detail.

attached root-cell-linux and non-root-cell-linux config file for reference.
also attached log file(non-root-cell-linux-log.txt) of non-root-cell-linux when booting.

kindly help here as we tried in all ways to establish root-cell-linux <--> non-root-cell-linux shared memory communication, but could not succeed.

non-root-cell-linux-log.txt
ivshmem-root.c
ivshmem-non-root.c
Reply all
Reply to author
Forward
0 new messages