Hi Jailhouse team,

I have been working with getting memory sharing working on the TX2, and I am 
facing a strange issue.  I am working with the ivshmem-guest-code.  I am able 
to get send and receive interrupts on both the root and the non-root cell, as 
well as write in the shared memory region without issue from the non-root cell. 
 However, I am having trouble reading from the shared memory using the 
shmem_test.py example from the ivshmem-guest-code 
(https://github.com/henning-schild-work/ivshmem-guest-code/blob/jailhouse/tests/shmem_test.py).
  

I am writing "Hello From IVSHMEM  " in the cell, and incrementing the last 
character, as done in the x86 example.

If I use the cell as it is now, with the default m.read(30), I get a core dump. 
 If I call m.read(16), I get 
"Hello from IVSHM", but if I call any more than 16, I get a core dump.  If I 
read any less characters, it just truncates the string to that number of 
characters.

Also, from the script, I am not sure where the 4096 offset came from, but it 
seems to be working fine.

Can you please explain briefly the correct process for reading and writing to 
the shared memory region?  I have tried to learn from forum posts and examples, 
but I just can't seem to find a solid resource for the subject. 

I have been able to just read the shared memory addresses directly and use the 
interrupts to determine when the addresses are not being used by the other 
cell, but this does not seem like the optimal way to do it.  The Python code 
seems to access it through the virtual PCI device, but gives very little 
documentation as to how that process works.

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to