Some questions regarding the Jailhouse architecture

66 views
Skip to first unread message

Tiago Cruz

unread,
Apr 5, 2016, 1:05:50 PM4/5/16
to Jailhouse
Dear All,

I have been following the development of this project for some time, mainly because of sheer curiosity but also because it fits a specific use case I'm still trying to develop. I have some questions I want to ask you, if possible (forgive me in advance if they are too dumb or obvious):

-from what I managed to grasp, jailhouse is a partitioning hypervisor that follows an AMP architecture and most of the examples I've seen contemplate inmate cells running in one core. Is it possible to have several inmates running simultaneously, for instance, on a 4-core CPU ? Like a Linux root cell on one core and the remaining ones assigned to 3 different cells ?

-does x86_64 supports a linux inmate cell ? Does the kernel require any special patch for this ?

-Imagine a cell which has to access an Ethernet interface. Is this access exclusive (via PCI passthrough or something along those lines) ? Can the device be available for other cells ?

-It is not entirely clear to me which are the supported inmates for x86_64 architectures. Some slides mention a port of FreeRTOS (which I understand it's only available for ARM) and also a RTEMS port, which I cannot find (this one comes from old slides). Is there any supported RTOS for x86_64 devices ?

Sorry for so many questions, but I'm thinking about giving Jailhouse a try and I want to figure out what I need for my testbed, but also the possibilities.

Best Regards (and thank you for your help),
--Tiago Cruz

-

charles king

unread,
Apr 5, 2016, 11:37:24 PM4/5/16
to Tiago Cruz, Jailhouse
>Is it possible to have several inmates running simultaneously, for instance, on a 4-core CPU ?  Like a Linux root cell on one core and the remaining ones assigned to 3 different cells ?
Indeed, you could create the apic-demo and tiny-demo, and running the root cell and these two cells simultaneously.

>does x86_64 supports a linux inmate cell ? Does the kernel require any special patch for this ?
Now there is no supports a linux inmate cell, the configs directory has a linux-x86-demo, you could take a try.

>Imagine a cell which has to access an Ethernet interface. Is this access exclusive (via PCI passthrough or something along those lines) ?  Can the device be available for other cells ?
The jailhouse does not simulate the devices, so it is not available to other cell.

>Is there any supported RTOS for x86_64 devices ?
current no.

I am a newbie, this is what I know. 

best regards
from Xuguo Wang



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

Valentine Sinitsyn

unread,
Apr 6, 2016, 2:49:11 AM4/6/16
to Tiago Cruz, Jailhouse
Hi Tiago,

My two cents.

On 05.04.2016 22:05, Tiago Cruz wrote:
> Dear All,
>
> I have been following the development of this project for some time, mainly because of sheer curiosity but also because it fits a specific use case I'm still trying to develop. I have some questions I want to ask you, if possible (forgive me in advance if they are too dumb or obvious):
>
> -from what I managed to grasp, jailhouse is a partitioning hypervisor that follows an AMP architecture and most of the examples I've seen contemplate inmate cells running in one core. Is it possible to have several inmates running simultaneously, for instance, on a 4-core CPU ? Like a Linux root cell on one core and the remaining ones assigned to 3 different cells ?
That's possible, albeit inmates bundled as examples don't exploit
multiprocessing.

>
> -does x86_64 supports a linux inmate cell ? Does the kernel require any special patch for this ?
Yes. There was a discussion with HOWTO on this list on how to run Linux
in a non-root cell. This wasn't initial design goal, but appeared to be
easy to get at some point.

>
> -Imagine a cell which has to access an Ethernet interface. Is this access exclusive (via PCI passthrough or something along those lines) ? Can the device be available for other cells ?
Initially, all devices are assigned to the root cell. When a non-root
cells starts, it can "borrow" peripherals as per its config file. IOMMU
is required for this to work safely (and amd64 still misses proper
interrupt remapping). The cell is exclusive owner of the device - there
are no ways to share it. I recall there was a discussion on how to do
some sharing with PCI Virtual Functions, but my feeling is it won't be
safe as well. Never looked at it myself, so I could be wrong here.

>
> -It is not entirely clear to me which are the supported inmates for x86_64 architectures. Some slides mention a port of FreeRTOS (which I understand it's only available for ARM) and also a RTEMS port, which I cannot find (this one comes from old slides). Is there any supported RTOS for x86_64 devices ?
>
> Sorry for so many questions, but I'm thinking about giving Jailhouse a try and I want to figure out what I need for my testbed, but also the possibilities.
>
> Best Regards (and thank you for your help),
> --Tiago Cruz

HTH,
Valentine

Jan Kiszka

unread,
Apr 6, 2016, 10:05:24 AM4/6/16
to Tiago Cruz, Valentine Sinitsyn, Jailhouse
On 2016-04-05 23:49, Valentine Sinitsyn wrote:
> Hi Tiago,
>
> My two cents.
>
> On 05.04.2016 22:05, Tiago Cruz wrote:
>> Dear All,
>>
>> I have been following the development of this project for some time,
>> mainly because of sheer curiosity but also because it fits a specific
>> use case I'm still trying to develop. I have some questions I want to
>> ask you, if possible (forgive me in advance if they are too dumb or
>> obvious):
>>
>> -from what I managed to grasp, jailhouse is a partitioning hypervisor
>> that follows an AMP architecture and most of the examples I've seen
>> contemplate inmate cells running in one core. Is it possible to have
>> several inmates running simultaneously, for instance, on a 4-core CPU
>> ? Like a Linux root cell on one core and the remaining ones assigned
>> to 3 different cells ?
> That's possible, albeit inmates bundled as examples don't exploit
> multiprocessing.

There is a smp-demo available, or you start up a non-root Linux cell
that has more than one core assigned.

>
>>
>> -does x86_64 supports a linux inmate cell ? Does the kernel require
>> any special patch for this ?
> Yes. There was a discussion with HOWTO on this list on how to run Linux
> in a non-root cell. This wasn't initial design goal, but appeared to be
> easy to get at some point.

See Documentation/non-root-linux.txt on how to set this up on x86.

>
>>
>> -Imagine a cell which has to access an Ethernet interface. Is this
>> access exclusive (via PCI passthrough or something along those lines)
>> ? Can the device be available for other cells ?
> Initially, all devices are assigned to the root cell. When a non-root
> cells starts, it can "borrow" peripherals as per its config file. IOMMU
> is required for this to work safely (and amd64 still misses proper
> interrupt remapping). The cell is exclusive owner of the device - there
> are no ways to share it. I recall there was a discussion on how to do
> some sharing with PCI Virtual Functions, but my feeling is it won't be
> safe as well. Never looked at it myself, so I could be wrong here.

Using SR-IOV can be an option for hardware-assisted sharing. The
management of the PV, though, is then a critical task of one of the
cells which has to be considered in the overall system design. Another
model is using one cell as a proxy for the others when accessing a
device. However, there are some pieces missing yet to make this easily
available.

>
>>
>> -It is not entirely clear to me which are the supported inmates for
>> x86_64 architectures. Some slides mention a port of FreeRTOS (which I
>> understand it's only available for ARM) and also a RTEMS port, which I
>> cannot find (this one comes from old slides). Is there any supported
>> RTOS for x86_64 devices ?

Yes, FreeRTOS is currently ARM-only. The RTEMS port we once did for x86
will probably be cleaned up and enhanced as a Google Summer of Code
project. So your best option on x86 - besides the minimalistic inmates
lib - is Linux right now.

Jan

--
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

Tiago Cruz

unread,
Apr 6, 2016, 11:28:23 AM4/6/16
to Jan Kiszka, Valentine Sinitsyn, Jailhouse
Before anything else, I would like to thank you for help and useful answers. Your willingness to help makes all the difference.

It seems I'm going to give Jailhouse a try. Definitely. :) 

Regards,
--Tiago



Reply all
Reply to author
Forward
0 new messages