Re:Re: [EXT] Some questions about Jailhouse configuration

23 views
Skip to first unread message

XIN

unread,
May 23, 2024, 8:08:58 PMMay 23
to Ralf Ramsauer, jailho...@googlegroups.com

Hi  Ralf

>What is an address allocation?

>Do you refer to the reserved memory area for jailhouse?

I mean the memory map of the device.

What I want to do is similar to 'https://portrait.gitee.com/phytium_embedded/phytium-jailhouse#4434-usb%E6%B5%8B%E8%AF%95' they enable USB in non-root-cell in phytium platform.

>Okay, first of all: Are you already able to enable the hypervisor?

Yes , it have already enabled jailhouse. 

>It depends on the device, and how it is connected to the system. In case 

>of the RPI4, I'd guess that it is some MMIO region together with some 

>interrupt. You have to learn how devices interact with the system.

>I never used Jailhouse on the Rpi, but I know that it has some strange 

>hardware components that might make things difficult (the Mailbox stuff, 

>some multiplexed components, …).

>In a simple case, to assign a device to a cell, you have to do three things:

>  1. Make sure that the root cell won't initialise the device. This is

>      typically done by disabling the device in the device-tree.

Do you means devices-tree overlays.

>    Beware that if you disable USB in the root cell, then maybe

>     keyboards, mice or maybe ethernet (don't know if it is connected

>      via USB) won't of course work any longer.

>   2. Assign The memory region and the interrupt of the device to the

>     non-root cell via configuration.

>   3. Add the device specification to the device tree of the non-root

>      cell.

> These are just simplified steps.

I try it . I tried to prtition Ethernet to non-root-cell , I edit 'non-root-cell . c' 'non-root-cell . dts ' according to the 'bcm2711-rpi-4-b . dts' and '/proc/iomem'. Add 'ethernet@fd580000' and 'interrupts = <0x00 0x9d 0x04 0x00 0x9e 0x04>'. Also disable Ethernet by devices-tree overlays in root-cell.

But I can't see any eth in non-root-cell by 'ip a' . 

I find Jan said as shown in attachment . 

So rpi4 don't have IOMMU , does it means we can't partition a PCI device into non-root-cell , What do you think?

I am new to the field ,I can't fully understand the method Jan said. Can you give me your opinion.

Can Swiotlib be used to implement partial IOMMU functionality? 

> What do you mean with "device isolation"?

Or called 'Device partition' , means we can use some device in non-root-cell , such as USB , Ethernet.

> Pease use the mailing list in future.

Sorry , it's my first time useing it.

Does it means send e-mail to jailho...@googlegroups.com

Thanks

Xin


non-root.png
JanSaid.png
Reply all
Reply to author
Forward
0 new messages