On 19.01.21 11:06, Luca Belluardo wrote:
> I'm new in hypervisor and in Jailhouse. I read some articles and the
> documentation and I have seen that it is possible create a shared memory
> between 2 virtual machines on Jailhouse.
> But I don't understand some things. Can someone help me to write a
> sample code for my case? I have to shared a struct like this below
> between 2 VMs
> struct my_struct{
> mutex mtx,
> bool has_msg,
> type msg
> }.
> If it is possible I want a sample code with some comment for my case, so
> I go alone in the development of the communication.
> The mutex is necessary or the mutual exclusion is granted by Jailhouse?
>
You may want to study [1] and possibly [2] for applications using
ivshmem "directly". You will get shared memory this way and signalling,
but no higher abstraction than that (like a mutex would be).
Jan
[1]
https://github.com/siemens/jailhouse/blob/master/tools/demos/ivshmem-demo.c
[2]
https://github.com/siemens/jailhouse/blob/master/inmates/demos/ivshmem-demo.c
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
--
You received this message because you are subscribed to the Google Groups
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jailhouse-dev/7b09cf8c-26f0-5c5c-b780-6a3d4e6548f6%40siemens.com.