Am Fri, 20 Apr 2018 07:51:01 -0700
schrieb <[email protected]>:
> 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].
What you describe could mean that your configuration is somehow
incorrect and the two shared memory regions are not correctly connected.
You will see the PCI devices and the drivers will bind to them. But you
will not be able to get interrupts or packets across.
Make sure that the hypervisor says
"Shared memory connection established: " with your two cell names once
the second cell comes up. If you do not see that line, your
configuration is somehow incorrect.
Make sure to actually "ifconfig ... up" both sides, just in case you
forgot about something that trivial.
> 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
The drivers on both sides will send interrupts to each other when they
have to. All you have to do is configure your cells, load the driver
and ifup your devices on both sides.
Henning
> Thanks
> Prajwal
>
>
>
--
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.