On 2018-04-26 16:16, [email protected] wrote: > On Monday, April 23, 2018 at 6:43:54 AM UTC-4, J. Kiszka wrote: >> On 2018-04-23 11:45, [email protected] wrote: >>> On Friday, April 20, 2018 at 10:51:01 AM UTC-4, [email protected] wrote: >>>> Hi all, >>>> >>>> I am trying to bring virtual network interface in non-root cell and also >>>> i am trying to understand how virtual network will initialize while >>>> loading non-root cell, i am putting some print statements in ivshmem-net.c >>>> file i.e present in kernel source[drivers/net/ivshmem-net.c]. >>>> >>>> In ivshm_net_state_change function we have couple of cases like >>>> IVSHM_NET_STATE_RESET, IVSHM_NET_STATE_INIT, IVSHM_NET_STATE_READY etc.. i >>>> added some of print statements in this cases, i am able to see logs from >>>> case IVSHM_NET_STATE_RESET after that i am not able to see any logs from >>>> other cases. >>>> >>>> Assumption: >>>> From the above behavior i assume my ivshmem-net is not brought up >>>> properly, because i am not able to see the logs from IVSHM_NET_STATE_INIT, >>>> IVSHM_NET_STATE_READY cases. >>>> >>>> Can anyone please tell me my assumption is correct or not? >>>> I am attaching my ivshmem-net.c file[added with logs], and also my >>>> non-root cell logs[search RH in non-root cell logs, that line is from >>>> ivshmem-net.c] >>>> >>>> I am adding below configuration to both root and non-root cell. the >>>> non-root cell have JAILHOUSE_MEM_ROOTSHARED flag. shmem_region has changed >>>> based on the index value in non-root cell. >>>> >>>> { >>>> .type = JAILHOUSE_PCI_TYPE_IVSHMEM, >>>> .iommu = 1, >>>> .domain = 0x0, >>>> .bdf = 0x0e << 3, >>>> .bar_mask = { >>>> 0xffffff00, 0xffffffff, 0x00000000, >>>> 0x00000000, 0xffffffe0, 0xffffffff, >>>> }, >>>> .num_msix_vectors = 1, >>>> .shmem_region = 75, >>>> .shmem_protocol = JAILHOUSE_SHMEM_PROTO_VETH, >>>> }, >>>> >>>> /* MemRegion: 3f200000 : IVSHMEM-net*/ >>>> { >>>> .phys_start = 0x3f200000, >>>> .virt_start = 0x3f200000, >>>> .size = 0x100000, >>>> .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE, >>>> }, >>>> >>>> After loading non-root cell i am able to see the virtual network >>>> interfaces is coming up by issuing command like ifconfig -a, and i can pci >>>> device is also added. I can see interrupt is registered with ivshmem-net. >>>> >>>> But i am not able to do any operation using these virtual network >>>> interface[ if i try to ping any other network or root-cell network, i am >>>> not able to ping, i am not seeing any changes in the interrupt number]. >>>> >>>> I have another question regarding interrupts, how can i know interrupt is >>>> working or not? whether i need to trigger the interrupt externally?-> if >>>> it is yes means how can i trigger the interrupts >>>> >>>> Thanks >>>> Prajwal >>> >>> Hi Henning, >>> I also observed state set to IVSHM_NET_STATE_RESET and its not changed to >>> IVSHM_NET_STATE_INIT. so I don't think that driver is not initialized >>> properly.Is there any dependency on non rootcell config to change the >>> state? If yes, which config parameter has dependency on this. >> >> Do you see interrupts related to the device on both sides? This state >> changes is achieved on the pre-existing peer side after announcing the >> new one via an interrupt. >> >> Jan >> -- >> Siemens AG, Corporate Technology, CT RDA IOT SES-DE >> Corporate Competence Center Embedded Linux > > Hi jan and Henning, > > Now i am trying to bring virtual network in qemu. once it is working i can go > back to my original machine. > > Based on qemu-x86.c config, i generated my root-cell config by giving below > command > > #jailhouse config create --mem-inmates 74M --mem-hv 6M root.c > > After generating root cell i added shared memory region and PCI device by > refering qemu-x86.c config. > These are the below things i added from qemu-x86.c config to my root-cell > config. > > /* IVSHMEM shared memory region -JH (demo) dis ind at 25*/ > { > .phys_start = 0x3f100000, > .virt_start = 0x3f100000, > .size = 0xff000, > .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | > JAILHOUSE_MEM_ROOTSHARED, > }, > > /* IVSHMEM shared memory region - JH dis idx at 26*/ > { > .phys_start = 0x3f1ff000, > .virt_start = 0x3f1ff000, > .size = 0x1000, > .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE, > }, > > /* 00:0f.0 - JH*/ > { > .type = JAILHOUSE_PCI_TYPE_IVSHMEM, > .iommu = 1,
In the QEMU setup, there is only one IOMMU unit, so this becomes 0 again. Jan -- 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.
