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
On Tuesday, 11 January 2022 at 10:38:52 UTC+1 Henning Schild wrote:
> Am Mon, 10 Jan 2022 13:31:16 -0800 (PST)
> schrieb Moustafa Nofal <[email protected]>:
>
> > Hi,
> > I intend to add another Linux on Raspberry Pi4. So, I added also a
> > memory region on rpi4.c and extended the size of mem_regions by, and
> > managed to get working. I added a pci device, and extended the array
> > by one, and the pci device is added, but without kernel driver in
> > use? So, how to add the driver to it?
>
>
> What kind of device is it? The kernel should simply find it and bind
> any driver that fits, in case it has one that does.
>
> If it is a virtual network device based on ivshmem2 you need to add the
> pci device, and multiple memory regions for it
> JAILHOUSE_SHMEM_NET_REGIONS for the driver to pick it up correctly you
> need to set the shmem_protocol of the pci device to
> JAILHOUSE_SHMEM_PROTO_VETH and set the index shmem_regions_start to
> your newly added memory regions.
>
> regards,
> Henning
>
--
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/84ebb12e-49ba-49ed-9719-063064e3c8e6n%40googlegroups.com.