The device is virtual pci, I was missing this JAILHOUSE_SHMEM_NET_REGIONS. I added it on a reserved place, away from other memory regions and its and another virtual ethernet is added. I have another question regarding particularly these two memroy regions,
/* MMIO 1 (permissive) */ {
.phys_start = 0xfd500000,
.virt_start = 0xfd500000,
.size = 0x1b00000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_IO,
},
/* MMIO 2 (permissive) */{
.phys_start = 0x600000000,
.virt_start = 0x600000000,
.size = 0x4000000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_IO,
},
In my system it points to pcie device and RAM(non-reserved for jailhouse). What are these regions? and are they related to JAILHOUSE_SHMEM_NET_REGIONS, because what I read is that this command reserves four memory regions.
One more question, on the second linux cell configuration, I added the memory region with correct flags, that was added on the root cell and I am trying to configure the pci communication.
On root cell:
/* IVSHMEM 0001:00:02.0 (networking) */
{
.type = JAILHOUSE_PCI_TYPE_IVSHMEM,
.domain = 2,
.bdf = 2 << 3,
.bar_mask = JAILHOUSE_IVSHMEM_BAR_MASK_INTX,
.shmem_regions_start = 12,
.shmem_dev_id = 0,
.shmem_peers = 2,
.shmem_protocol = JAILHOUSE_SHMEM_PROTO_VETH,
},
and
JAILHOUSE_SHMEM_NET_REGIONS(0x30000000, 0),
On 2nd Linux cell:
{ /* IVSHMEM 00:02.0 (networking) */
.type = JAILHOUSE_PCI_TYPE_IVSHMEM,
.bdf = 2 << 3,
.bar_mask = JAILHOUSE_IVSHMEM_BAR_MASK_INTX,
.shmem_regions_start = 6,
.shmem_dev_id = 1,
.shmem_peers = 2,
.shmem_protocol = JAILHOUSE_SHMEM_PROTO_VETH,
},
and JAILHOUSE_SHMEM_NET_REGIONS(0x30000000, 1),
I followed the documentation, the .bdf is the same, only 2 peers , and I put also the correct memory region. However, no ethernet is added on the second non-root Linux
Kind regards
Moustafa Noufale