Skip to contentSkip to conversation

OS porting on Xen on ARM

DISCUSSION Dario Faggioli 4 participants 7 messages Dec 17, 2013 – Dec 23, 2013

lore
Share & tools
lore
#0 lore raw

Hi Arianna!

First of all, some context for the Xen on ARM people that I'm Cc-ing. Arianna will be working on porting an embedded --targeted specifically at automotive-- OS on top of Xen on ARM. The OS is Erika, and Claudio could give any kind of information about it (and correct me, if I said something wrong):
http://wiki.automotive.linuxfoundation.org/index.php/Erika_Enterprise_Open-Source_RTOS
http://erika.tuxfamily.org/

This mail is mainly meant at giving her some clues and pointers about how to get on with it. I'll do my best but, given it's ARM, with which I'm not super familiar with, feel free to chime in and fill the gaps or correcting the mistakes I may make.

The goal is (for now) to have the Erika OS running as a DomU, on top of a Linux Dom0. She'll be using a Cubie* as a platform. There is definitely some similar/related activity going on (writing/porting embedded OSes on Xen) these days, but, if I'm not mistaken, this would be the first example of doing it on ARM (except, perhaps, from Julien's work on FreeBSD, but that's not embedded! :-P)... Pretty cool, eh?

Arianna, all the information about running Xen on Allwinner is here:
http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Allwinner
Also, there is a thread right about this on xen-devel going on in these. Perhaps you can have a look at it:
http://bugs.xenproject.org/xen/mid/%[email protected]%3E
(look at the whole thread, e.g., via marc.info).

About Xen in embedded in general, there has been a thread recently, which may contain some useful info. In case you want to skim through it, here it is:
http://bugs.xenproject.org/xen/mid/%3C1384802050.16918.219.camel@Solace%3E

About how a small, and an hopefully easy enough to understand, OS that runs as a Xen DomU looks like, check out Mini-OS in the Xen Source tree:
http://xenbits.xen.org/gitweb/?p=xen.git;a=tree;f=extras/mini-os;hb=HEAD
As I said, it's small, and definitely simpler, for instance, than Linux, but it's quite feature complete, which is something you probably won't need.

In fact, there are people working on even smaller and simpler solutions, for the most diverse purposes. Some links below (again, check the entire threads):
http://bugs.xenproject.org/xen/mid/%3Cem4158cadd-9eab-4a26-80ba-b3a3b311bee2@smartin-alien%3E
http://bugs.xenproject.org/xen/mid/%3Cem40e5807b-ac20-4c2a-ad66-d1056397e07b@smartin-alien%3E
http://bugs.xenproject.org/xen/mid/%3Cembc004940-1dbb-4924-bbab-76901c75e44e@smartin-alien%3E
http://osdir.com/ml/general/2013-12/msg26912.html
http://bugs.xenproject.org/xen/mid/%[email protected]%3E

Simon also sent the code out already, here: https://github.com/FurryFuttock/micro-pv
For anything about MirageOS: http://openmirage.org/ , https://github.com/mirage/

In case you need something bigger, Julien ported FreeBSD on Xen on ARM (as a DomU). That lives here (Julien, correct me if I'm wrong):
http://xenbits.xen.org/gitweb/?p=people/julieng/freebsd.git;a=shortlog;h=refs/heads/xen-arm
I expect this to be super-overkill, but perhaps it could help to get an idea of what an actual port (rather than a 'write from scratch') would require.

Last but not least, the hypercall interface official documentation is all in the public header files, in the repository, as well as here:
http://xenbits.xen.org/docs/unstable-staging/hypercall/index.html
http://xenbits.xen.org/docs/unstable-staging/hypercall/arm/index.html

That is all for now I guess... Ask if there is anything you do not understand that you think this community could help with. :-)

Best Regards,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw

Good luck Arianna.

When I started my micro-pv implementation it took me a long time to get anything to run. It eventually ended up being that I hadn't set the XEN_INTERFACE macro in the makefile. Please don't get caught out by that one! The rest was reading the mini-os code, the documentation, web search engines, and asking questions on this mail list.

Regards.

Quoted 68 lines · Dario Faggioli

Hi Arianna!

First of all, some context for the Xen on ARM people that I'm Cc-ing. Arianna will be working on porting an embedded --targeted specifically at automotive-- OS on top of Xen on ARM. The OS is Erika, and Claudio could give any kind of information about it (and correct me, if I said something wrong):
http://wiki.automotive.linuxfoundation.org/index.php/Erika_Enterprise_Open-Source_RTOS
http://erika.tuxfamily.org/

This mail is mainly meant at giving her some clues and pointers about how to get on with it. I'll do my best but, given it's ARM, with which I'm not super familiar with, feel free to chime in and fill the gaps or correcting the mistakes I may make.

The goal is (for now) to have the Erika OS running as a DomU, on top of a Linux Dom0. She'll be using a Cubie* as a platform. There is definitely some similar/related activity going on (writing/porting embedded OSes on Xen) these days, but, if I'm not mistaken, this would be the first example of doing it on ARM (except, perhaps, from Julien's work on FreeBSD, but that's not embedded! )... Pretty cool, eh?

Arianna, all the information about running Xen on Allwinner is here:
http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Allwinner
Also, there is a thread right about this on xen-devel going on in these. Perhaps you can have a look at it:
http://bugs.xenproject.org/xen/mid/%[email protected]%3E
(look at the whole thread, e.g., via marc.info).

About Xen in embedded in general, there has been a thread recently, which may contain some useful info. In case you want to skim through it, here it is:
http://bugs.xenproject.org/xen/mid/%3C1384802050.16918.219.camel@Solace%3E

About how a small, and an hopefully easy enough to understand, OS that runs as a Xen DomU looks like, check out Mini-OS in the Xen Source tree:
http://xenbits.xen.org/gitweb/?p=xen.git;a=tree;f=extras/mini-os;hb=HEAD
As I said, it's small, and definitely simpler, for instance, than Linux, but it's quite feature complete, which is something you probably won't need.

In fact, there are people working on even smaller and simpler solutions, for the most diverse purposes. Some links below (again, check the entire threads):
http://bugs.xenproject.org/xen/mid/%3Cem4158cadd-9eab-4a26-80ba-b3a3b311bee2@smartin-alien%3E
http://bugs.xenproject.org/xen/mid/%3Cem40e5807b-ac20-4c2a-ad66-d1056397e07b@smartin-alien%3E
http://bugs.xenproject.org/xen/mid/%3Cembc004940-1dbb-4924-bbab-76901c75e44e@smartin-alien%3E
http://osdir.com/ml/general/2013-12/msg26912.html
http://bugs.xenproject.org/xen/mid/%[email protected]%3E

Simon also sent the code out already, here: https://github.com/FurryFuttock/micro-pv
For anything about MirageOS: http://openmirage.org/ , https://github.com/mirage/

In case you need something bigger, Julien ported FreeBSD on Xen on ARM (as a DomU). That lives here (Julien, correct me if I'm wrong):
http://xenbits.xen.org/gitweb/?p=people/julieng/freebsd.git;a=shortlog;h=refs/heads/xen-arm
I expect this to be super-overkill, but perhaps it could help to get an idea of what an actual port (rather than a 'write from scratch') would require.

Last but not least, the hypercall interface official documentation is all in the public header files, in the repository, as well as here:
http://xenbits.xen.org/docs/unstable-staging/hypercall/index.html
http://xenbits.xen.org/docs/unstable-staging/hypercall/arm/index.html

That is all for now I guess... Ask if there is anything you do not understand that you think this community could help with.

Quoted 9 lines

Best Regards,
Dario

--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#2 lore raw
Quoted 7 lines · Simon Martin

Good luck Arianna.

When I started my micro-pv implementation it took me a long time to get anything to run. It eventually ended up being that I hadn't set the XEN_INTERFACE macro in the makefile. Please don't get caught out by that one! The rest was reading the mini-os code, the documentation, web search engines, and asking questions on this mail list.

Thank you for the hint, that must have been a nasty pitfall. I'll definitely check out the mini-os code and the online documentation.

Quoted 91 lines

Regards.

Quoted 84 lines · On 17/12/2013 08:05:45, "Dario Faggioli" <[email protected]…

Hi Arianna!

First of all, some context for the Xen on ARM people that I'm Cc-ing. Arianna will be working on porting an embedded --targeted specifically at automotive-- OS on top of Xen on ARM. The OS is Erika, and Claudio could give any kind of information about it (and correct me, if I said something wrong):
http://wiki.automotive.linuxfoundation.org/index.php/Erika_Enterprise_Open-Source_RTOS

http://erika.tuxfamily.org/

This mail is mainly meant at giving her some clues and pointers about how to get on with it. I'll do my best but, given it's ARM, with which I'm not super familiar with, feel free to chime in and fill the gaps or correcting the mistakes I may make.

The goal is (for now) to have the Erika OS running as a DomU, on top of a Linux Dom0. She'll be using a Cubie* as a platform. There is definitely some similar/related activity going on (writing/porting embedded OSes on Xen) these days, but, if I'm not mistaken, this would be the first example of doing it on ARM (except, perhaps, from Julien's work on FreeBSD, but that's not embedded! :-P)... Pretty cool, eh?

Arianna, all the information about running Xen on Allwinner is here:
http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Allwinner
Also, there is a thread right about this on xen-devel going on in these. Perhaps you can have a look at it:
http://bugs.xenproject.org/xen/mid/%[email protected]%3E
(look at the whole thread, e.g., via marc.info).

About Xen in embedded in general, there has been a thread recently, which may contain some useful info. In case you want to skim through it, here it is:
http://bugs.xenproject.org/xen/mid/%3C1384802050.16918.219.camel@Solace%3E

About how a small, and an hopefully easy enough to understand, OS that runs as a Xen DomU looks like, check out Mini-OS in the Xen Source tree:
http://xenbits.xen.org/gitweb/?p=xen.git;a=tree;f=extras/mini-os;hb=HEAD
As I said, it's small, and definitely simpler, for instance, than Linux, but it's quite feature complete, which is something you probably won't need.

In fact, there are people working on even smaller and simpler solutions, for the most diverse purposes. Some links below (again, check the entire threads):
http://bugs.xenproject.org/xen/mid/%3Cem4158cadd-9eab-4a26-80ba-b3a3b311bee2@smartin-alien%3E

http://bugs.xenproject.org/xen/mid/%3Cem40e5807b-ac20-4c2a-ad66-d1056397e07b@smartin-alien%3E

http://bugs.xenproject.org/xen/mid/%3Cembc004940-1dbb-4924-bbab-76901c75e44e@smartin-alien%3E

http://osdir.com/ml/general/2013-12/msg26912.html
http://bugs.xenproject.org/xen/mid/%[email protected]%3E

Simon also sent the code out already, here:
https://github.com/FurryFuttock/micro-pv
For anything about MirageOS: http://openmirage.org/ , https://github.com/mirage/

In case you need something bigger, Julien ported FreeBSD on Xen on ARM (as a DomU). That lives here (Julien, correct me if I'm wrong):
http://xenbits.xen.org/gitweb/?p=people/julieng/freebsd.git;a=shortlog;h=refs/heads/xen-arm

I expect this to be super-overkill, but perhaps it could help to get an idea of what an actual port (rather than a 'write from scratch') would require.

Last but not least, the hypercall interface official documentation is all in the public header files, in the repository, as well as here:
http://xenbits.xen.org/docs/unstable-staging/hypercall/index.html
http://xenbits.xen.org/docs/unstable-staging/hypercall/arm/index.html

That is all for now I guess... Ask if there is anything you do not understand that you think this community could help with. :-)

Best Regards,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
Signature · 5 lines
/*
 * Arianna Avanzini
 * [email protected]
 * [email protected]
 */
#3 lore raw
In reply to Dario Faggioli
Quoted 10 lines · Dario Faggioli

Hi Arianna!

First of all, some context for the Xen on ARM people that I'm Cc-ing. Arianna will be working on porting an embedded --targeted specifically at automotive-- OS on top of Xen on ARM. The OS is Erika, and Claudio could give any kind of information about it (and correct me, if I said something wrong):
http://wiki.automotive.linuxfoundation.org/index.php/Erika_Enterprise_Open-Source_RTOS

http://erika.tuxfamily.org/

Quoted 13 lines

This mail is mainly meant at giving her some clues and pointers about how to get on with it. I'll do my best but, given it's ARM, with which I'm not super familiar with, feel free to chime in and fill the gaps or correcting the mistakes I may make.

The goal is (for now) to have the Erika OS running as a DomU, on top of a Linux Dom0. She'll be using a Cubie* as a platform. There is definitely some similar/related activity going on (writing/porting embedded OSes on Xen) these days, but, if I'm not mistaken, this would be the first example of doing it on ARM (except, perhaps, from Julien's work on FreeBSD, but that's not embedded! :-P)... Pretty cool, eh?

Quoted 7 lines

Arianna, all the information about running Xen on Allwinner is here:
http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Allwinner
Also, there is a thread right about this on xen-devel going on in these. Perhaps you can have a look at it:
http://bugs.xenproject.org/xen/mid/%[email protected]%3E

(look at the whole thread, e.g., via marc.info).

Quoted 12 lines

About Xen in embedded in general, there has been a thread recently, which may contain some useful info. In case you want to skim through it, here it is:
http://bugs.xenproject.org/xen/mid/%3C1384802050.16918.219.camel@Solace%3E

About how a small, and an hopefully easy enough to understand, OS that runs as a Xen DomU looks like, check out Mini-OS in the Xen Source tree:
http://xenbits.xen.org/gitweb/?p=xen.git;a=tree;f=extras/mini-os;hb=HEAD As I said, it's small, and definitely simpler, for instance, than Linux, but it's quite feature complete, which is something you probably won't need.

Quoted 6 lines

In fact, there are people working on even smaller and simpler solutions, for the most diverse purposes. Some links below (again, check the entire threads):
http://bugs.xenproject.org/xen/mid/%3Cem4158cadd-9eab-4a26-80ba-b3a3b311bee2@smartin-alien%3E

http://bugs.xenproject.org/xen/mid/%3Cem40e5807b-ac20-4c2a-ad66-d1056397e07b@smartin-alien%3E

Quoted 3 lines

http://bugs.xenproject.org/xen/mid/%3Cembc004940-1dbb-4924-bbab-76901c75e44e@smartin-alien%3E

http://osdir.com/ml/general/2013-12/msg26912.html

Quoted 11 lines

http://bugs.xenproject.org/xen/mid/%[email protected]%3E

Simon also sent the code out already, here:
https://github.com/FurryFuttock/micro-pv For anything about MirageOS:
http://openmirage.org/ , https://github.com/mirage/

In case you need something bigger, Julien ported FreeBSD on Xen on ARM (as a DomU). That lives here (Julien, correct me if I'm wrong):
http://xenbits.xen.org/gitweb/?p=people/julieng/freebsd.git;a=shortlog;h=refs/heads/xen-arm

I expect this to be super-overkill, but perhaps it could help to get an

Quoted 11 lines

idea of what an actual port (rather than a 'write from scratch') would require.

Last but not least, the hypercall interface official documentation is all in the public header files, in the repository, as well as here:
http://xenbits.xen.org/docs/unstable-staging/hypercall/index.html
http://xenbits.xen.org/docs/unstable-staging/hypercall/arm/index.html

That is all for now I guess... Ask if there is anything you do not understand that you think this community could help with. :-)

Thank you for the very useful pointers, I've started to carefully read the threads you recommended and to study the code of the mini-os. I'll definitely check out also the other OSs you suggested.
Thank you also for being so helpful, I surely won't hesitate to ask in case anything is not clear enough to me (hoping I won't be too much annoying).

Quoted 2 lines

Best Regards, Dario

Signature · 5 lines
/*
 * Arianna Avanzini
 * [email protected]
 * [email protected]
 */
#4 lore raw
In reply to Dario Faggioli
Quoted 6 lines · Dario Faggioli

About how a small, and an hopefully easy enough to understand, OS that runs as a Xen DomU looks like, check out Mini-OS in the Xen Source tree:
http://xenbits.xen.org/gitweb/?p=xen.git;a=tree;f=extras/mini-os;hb=HEAD
As I said, it's small, and definitely simpler, for instance, than Linux, but it's quite feature complete, which is something you probably won't need.

Note however that mini-os has not been ported to ARM. So as an example of the arch stuff it is not all that useful, but it does contain PV drivers and the like, which is most of what a Xen on ARM port consists of given there is no PV MMU stuff to worry about.

The only existing ports are of Linux and of FreeBSD.

Ian.

#5 lore raw
Quoted 11 lines · Ian Campbell
Quoted 6 lines · Dario Faggioli

About how a small, and an hopefully easy enough to understand, OS that runs as a Xen DomU looks like, check out Mini-OS in the Xen Source tree:
http://xenbits.xen.org/gitweb/?p=xen.git;a=tree;f=extras/mini-os;hb=HEAD
As I said, it's small, and definitely simpler, for instance, than Linux, but it's quite feature complete, which is something you probably won't need.

Note however that mini-os has not been ported to ARM. So as an example of the arch stuff it is not all that useful,

Yep... Arianna's work will be the first real example of that, and quite a cool example, at least as far as I can tell, given the nature of the to be ported guest OS! Challenging, indeed, as well as very interesting! :-)

Quoted 4 lines

but it does contain PV
drivers and the like, which is most of what a Xen on ARM port consists of given there is no PV MMU stuff to worry about.

Indeed... I hope both mini-os and Simon's work (and perhaps some bits of MirageOS too) can be a valuable help, at least for understanding at least that part.

Quoted 2 lines

The only existing ports are of Linux and of FreeBSD.

Exactly. I guess both could be very useful sources of information. Probably, the FreeBSD one, is a better fit here, as it is, let's say, a "proper DomU port", while Linux has a lot more stuff in it, e.g., related to Dom0 support.

Thanks for replying,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#6 lore raw
Quoted 9 lines · Dario Faggioli
Quoted 8 lines · Ian Campbell
Quoted 6 lines · Dario Faggioli

About how a small, and an hopefully easy enough to understand, OS that runs as a Xen DomU looks like, check out Mini-OS in the Xen Source tree:
http://xenbits.xen.org/gitweb/?p=xen.git;a=tree;f=extras/mini-os;hb=HEAD
As I said, it's small, and definitely simpler, for instance, than Linux, but it's quite feature complete, which is something you probably won't need.

Quoted 8 lines
Quoted 3 lines

Note however that mini-os has not been ported to ARM. So as an example of the arch stuff it is not all that useful,

Yep... Arianna's work will be the first real example of that, and quite a cool example, at least as far as I can tell, given the nature of the to be ported guest OS! Challenging, indeed, as well as very interesting! :-)

FYI:

http://www.gossamer-threads.com/lists/xen/devel/312174?do=post_view_flat#312174

I've already asked if the source code for such effort could be made available somehow, as it can be of great help to similar projects, like, e.g., this one. :-)

Regards,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel