Dear all,

I'm trying to establish an inter-cell communication between 2 cells in 
Banana Pi-M1 (BPI) using the IVSHMEM protocol.

So far I have compiled and inserted both jailhouse.ko and uio_ivshmem.ko 
(from https://github.com/henning-schild-work/ivshmem-guest-code) modules in 
BPI, running in Linux kernel 4.13.0, and gic-demo works fine. 
I've tried to follow this patch (
https://groups.google.com/forum/#!topic/jailhouse-dev/IqwQsQ9JEno) in order 
to create the config file (bananapi-gic-ivshmem-demo.c) based on gic-demo.

For that I added the shared-memory region for IVSHMEM communication:

/* IVSHMEM shared memory region */ {
            .phys_start = 0x7bf00000,
            .virt_start = 0x7bf00000,
            .size = 0x100000,
            .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},

Then, I loaded the cell with the following command: 

"jailhouse cell load 1 ../inmates/demos/arm/ivshmem-demo.bin -s 
"pci-cfg-base=0x02000000 ivshmem-irq=155" -a 0x1000” and started it using 
"jailhouse cell start 1”, but only got the following output:
"IVSHMEM: pci-cfg-base:0x2000000
IVSHMEM: ivshmem-irq:155"

This is the dmesg output that I get when I load the cell:

[   66.717056] jailhouse: loading out-of-tree module taints kernel.
[   98.515850] OF: PCI: host bridge //pci@0 ranges:
[   98.521159] OF: PCI:   MEM 0x02100000..0x02101fff -> 0x02100000
[   98.527811] pci-host-generic 2000000.pci: ECAM at [mem 
0x02000000-0x020fffff] for [bus 00]
[   98.538938] pci-host-generic 2000000.pci: PCI host bridge to bus 0000:00
[   98.545808] pci_bus 0000:00: root bus resource [bus 00]
[   98.551289] pci_bus 0000:00: root bus resource [mem 
0x02100000-0x02101fff]
[   98.559373] pci 0000:00:00.0: [1af4:1110] type 00 class 0xff0000
[   98.559471] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000000ff 64bit]
[   98.561658] PCI: bus0: Fast back to back transfers disabled
[   98.567901] pci 0000:00:00.0: BAR 0: assigned [mem 0x02100000-0x021000ff 
64bit]
[   98.578033] uio_ivshmem 0000:00:00.0: enabling device (0000 -> 0002)
[   98.586492] The Jailhouse is opening.
[  110.942999] Created Jailhouse cell "bananapi-gic-ivshmem-demo”

This is the output that I get when I execute:

./jailhouse console
Initializing Jailhouse hypervisor v0.11 on CPU 1
Code location: 0xf0000040
Page pool usage after early setup: mem 56/16362, remap 0/131072
Initializing processors:
 CPU 1... OK
 CPU 0... OK
Initializing unit: irqchip
Initializing unit: PCI
Adding virtual PCI device 00:00.0 to cell "Banana-Pi"
Page pool usage after late setup: mem 68/16362, remap 5/131072
Activating hypervisor
Adding virtual PCI device 00:00.0 to cell "bananapi-gic-ivshmem-demo"
Shared memory connection established: "bananapi-gic-ivshmem-demo" <--> 
"Banana-Pi"
Created cell "bananapi-gic-ivshmem-demo"
Page pool usage after cell creation: mem 82/16362, remap 5/131072
Cell "bananapi-gic-ivshmem-demo" can be loaded
Started cell "bananapi-gic-ivshmem-demo

When I list the PCI devices, I obtain the following:

lspci -v
00:00.0 Unassigned class [ff00]: Red Hat, Inc. Inter-VM shared memory
    Subsystem: Red Hat, Inc. Inter-VM shared memory
    Flags: fast devsel, IRQ 86
    Memory at 02100000 (64-bit, non-prefetchable) [size=256]

Up until this point, everything seems to work correctly but it is supposed 
to see the info "Kernel driver in use: uio_ivshmem” when I list the PCI 
devices. However this information does not show up.
Moreover, as far as I understand I need to create a UIO device in order to 
use IVSHMEM, but when a try to register a new device with  "echo "1af4 
1110" > /sys/bus/pci/drivers/uio_ivshmem/new_id” I get the error "write 
error: file exists”. However, if a list all the UIO devices with “ls 
/dev/uio*”, the command returns nothing.

To sum up, although I have UIO support compiled into the kernel, the UIO 
device files are not beeing created. 

Can anyone help me in overcoming this issue and put IVSHMEM to work in 
Banana Pi? If needed, I can send any configuration files that I am using.

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/15e809ef-6d04-4df6-a706-7fa43e7deee3%40googlegroups.com.

Reply via email to