#Go through Usage_Guides folder to know how to use the codes
#Other files are primitive.
Shared Memory based Messaging Layer on Linux Popcorn
first_phase.c : It contains kernel space code for using ivshmem based shared memory between two VMs How to run it:
- start the ivshmem server on host first with commands(even before starting the VMs): ivshmem-server -F -v
- After starting the server on host, Then start both the VMs with these command added to the initial command: -device ivshmem-doorbell,chardev=ivshmem -chardev socket,path=/tmp/ivshmem_socket,id=ivshmem (Do not leave space after or before equalto sign)
- Rename the object files with the name of file you want to run.
- Uncomment Read and Write lines (uncomment read line on one VM and write line on another so as to check ivshmem shared memory) of initialize function.
- call make on both VMs
- first run sudo insmod first_phase.ko(on VM where you are writing on the shared memory)
- then run sudo insmod first_phase.ko(on VM where you are reading on the shared memory) run dmesg command on second VM you will be able to see what you have written from other VM.
second_phase.c: Adding Interrupts and Locks. STILL UNDER CONSTRUCTION.....
final_phase.c :- Still need some modifications for running.
---------------------------------- FINAL CODE -------------------------------------------
final_arm.c :- This file has the messaging layer code to be installed in ARM VM. The code doesn't uses interrupts. final_x86.c :- This file has the messaging layer code to be installed in x86 VM. The code doesn't uses interrupts.
Use:-
- Start the ivshmem server on host first with commands(even before starting the VMs): ivshmem-server -F -v
- After starting the server on host, Then start both the VMs with these command added to the initial command: -device ivshmem-doorbell,chardev=ivshmem -chardev socket,path=/tmp/ivshmem_socket,id=ivshmem (Do not leave space after or before equalto sign)
- Now, go to the msg_layer folder on the VMs.
- Add the files final_arm.c final_x86.c to ARM X86 VMs respectively.
- Now, change the socket.c to final_arm.c and final_x86.c in Makefile.
- run make
- insmod msg_Socket.ko
(could tweak parameters here) INFO: NUM_MSG: number of demo message you want to send. NUMBER_OF_HANDLES: number of handles(maximum number of messages to be sent at a time).
CURRENT PROBLEM: Unable to rmmod the module.
--------------------------------- END ----------------------------------------------------