On 2018-04-20 07:01, [email protected] wrote:
> On Thursday, April 19, 2018 at 8:17:18 PM UTC+5:30, J. Kiszka wrote:
>> On 2018-04-19 09:51, [email protected] wrote:
>>> Hi,
>>>
>>>   I am trying some experiments in Shared memory, 
>>> CASE 1:
>>> I have shared some common memory region between root and non-root cell. 
>>> using this mem-region i am able to communicate between root and non-root 
>>> cell(if i write data from root cell to that mem-region i am able to read 
>>> the same data in non-root cell). I have added shared memory in the root 
>>> cell at the end-of mem-region(last-index of mem-region).
>>>
>>> CASE 2:
>>>  But when i add this shared mem-region in the middle of root cell 
>>> mem-region, i am not able to communicate between root and non-root 
>>> cell(read and write is not happening from root-cell to non-root cell). 
>>>
>>> Can someone please explain me why CASE 2 is not working, is that mandatory 
>>> to add shared memory config at the end-of mem-region(last index)?  
>>>
>>> * I am not linked any PCI device to shared mem-region in both the cases.
>>>
>>> * For reading and writing from shared mem-region we are using our 
>>> application.
>>>
> Thanks for the replay Jan,
> 
>> It's hard to give you any good suggestion without seeing the configs in
>> question. 
> I am attaching both root and non-root cell configs can you please take look 
> at it once.
> 
>> Maybe you didn't split up that larger mem region properly into
>> two regions, 
> 
>  My inmate starting address is: 0x404000000, and my inmate high RAM starts 
> from 0x404300000, I am adding below region into both root and non-root 
> cell(non-root cell i added JAILHOUSE_MEM_ROOTSHARED flag). 
> 
>     /* MemRegion: 404100000 : IVSHMEM :JH-added */
>                 {
>                         .phys_start = 0x404100000,
>                         .virt_start = 0x404100000,
>                         .size = 0x100000,
>                         .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
>                 },
> 
> 
>> maybe the reference from the ivshmem device to the share
>> memory region by index is not longer correct, 
> 
> i am not linking PCI config to mem-region, index is only matter when we link 
> PCI and mem-region is that correct?

Your configs do not contain any shared memory device. Look at
configs/[x86/]qemu-x86.c and .../linux-x86-demo.c to see what is
missing. There is also a tutorial at ELC-E 2016 where I addressed the
topic (slides and video [1]). It just misses one addtional important
point: .iommu has to be set as well on real machines, in your case
likely to 1.

Jan

[1] https://elinux.org/ELC_Europe_2016_Presentations

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to