Am Fri, 6 Apr 2018 09:12:00 -0700
schrieb <anilapp...@gmail.com>:

> Hi Jan,
>   We are trying to establish the connection between root cell to
> non-root cell on x86 using ivshmem-net driver.
> 
> 
> we did below modifications in root cell and non root cell
> configurations.
> 
>       // PCI device
>                 {
>                         .type = JAILHOUSE_PCI_TYPE_IVSHMEM,
>                         .domain = 0x0,
>                         .bdf = 0x0e << 3,
>                         .bar_mask = {
>                                 0xffffff00, 0xffffffff, 0x00000000,
>                                 0x00000000, 0xffffffe0, 0xffffffff,
>                         },
>                         .num_msix_vectors = 1,
>                         .shmem_region = 3,

make sure that number is correct in the root-cell as well

Or actually make sure the hypervisor says
"Shared memory connection established"
After it said
"Adding virtual PCI device ..."

>                         .shmem_protocol = JAILHOUSE_SHMEM_PROTO_VETH,
>                 },
> 
>                 /* MemRegion: 404100000 : IVSHMEM :JH-added */
>                 {
>                         .phys_start = 0x404100000,
>                         .virt_start = 0x404100000,
>                         .size = 0x100000,
>                         .flags = JAILHOUSE_MEM_READ |
> JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_ROOTSHARED,
>                 },

ROOTSHARED will only be required in the non-root cell, but should not
hurt the root cell either.

> After adding above changes, we are able to see the virtual network
> interface in non-root cell but it is not working(ping is not
> happening and we are not able to see the interrupts).
> 
> I am adding below logs for your reference.
> 
> 
> [root@localhost ~]# cat /proc/iomem
> .....
>   0000000100000000-00000001000000ff : ivshmem-net
> 0000000100000100-000000010000011f : 0000:00:0e.0
> 0000000404100000-00000004041fffff : ivshmem-net
> .....
> 
> [root@localhost ~]# cat /proc/interrupts
>            CPU0       CPU1
>   4:       1271          0   IO-APIC-4-fasteoi   serial
>  24:        404          0   PCI-MSI-524288-edge      enp1s0f0
>  25:          0          0   PCI-MSI-229376-edge
> ivshmem-net[0000:00:0e.0]
> 
> 
> [rooot@localhost ~]# lspci -s 0e -vvv
> 00:0e.0 Unassigned class [ff01]: Red Hat, Inc Inter-VM shared memory
>         Subsystem: Red Hat, Inc Inter-VM shared memory
>         Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
> ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF-
> FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
> INTx- Latency: 0 Region 0: Memory at 100000000 (64-bit,
> non-prefetchable) [size=256] Region 4: Memory at 100000100 (64-bit,
> non-prefetchable) [size=32] Capabilities: [50] MSI-X: Enable+ Count=1
> Masked- Vector table: BAR=4 offset=00000000
>                 PBA: BAR=4 offset=00000010
>         Kernel driver in use: ivshmem-net
> lspci: Unable to load libkmod resources: error -12
> 
> 
> [root@localhost ~]# ifconfig -a
> enp0s14: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 16384
>         inet 192.168.1.55  netmask 255.255.0.0  broadcast
> 192.168.255.255 ether 9a:28:41:e8:3b:14  txqueuelen 1000  (Ethernet)
>         RX packets 0  bytes 0 (0.0 B)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 0  bytes 0 (0.0 B)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
> 
> enp1s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
>         inet 192.168.1.35  netmask 255.255.0.0  broadcast
> 192.168.255.255 inet6 fe80::21b:78ff:fe56:abec  prefixlen 64  scopeid
> 0x20<link> ether 00:1b:78:56:ab:ec  txqueuelen 1000  (Ethernet)
>         RX packets 457  bytes 46827 (45.7 KiB)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 7  bytes 596 (596.0 B)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
>         device interrupt 11  memory 0xc72a0000-c72c0000  

Mhh two times on the same subnet and even a /16 one. Actually is one
of the two the one from ivshmem-net? enp0s14 looks like it

First make sure that one of the interfaces is added by ivshmem-net. You
should find information in "dmesg"
and /sys/bus/pci/drivers/ivshmem-net and you can compare with the state
before jailhouse startet.

Once you know which one is which, put it onto a different subnet before
pinging the non-root cell.
choose i.e. 192.168.1.0/24 and 192.168.2/24

Now the remote side should look similar. The mtu and packet counts look
weird, i guess it is not up yet. That could be because the non-root
side is not up and running or the configuration is not correct.

> Can you please help us to resolve.
> 
> we have below points which we need some input 
> 
> a. we want to know are we missing any configuration? 
> b. we used external NIC and configured to non rootcell. should we
> assign any physical NIC to non rootcell to make virtual network
> interface working?

No, you either assign hardware or use a virtual network. You can
combine both if you need multiple networks.

> c.we didn't see that increment in interrupt count.
> Are we missing any thing here?

You should see pkt counts going up in ifconfig and int counts going up
as well.

Henning

> Regards,
> Anil 
> 
> 
> 
> 

-- 
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 jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to