Mailing List Archive

Input to start porting OS to XEN
Hi All ,

I am starting with virtualization / hypervisor for the for first time &
hence apologize if this is not the correct place to start .

1) Can team please provide any pointer for the steps
to port / run an rtos (Zephyr ) on xen.


2) Or if team can point share feedback w.r.t complexity & rough time for
this ?
I am evaluating zephyr on XEN (as i come from linux driver development
background , i thought zephyr will be better )


3) Currently based on my Little understanding i was evaluating HVM ( as it
can provide QEMU emulation for hardware )


Thanks
Ashish.
Re: Input to start porting OS to XEN [ In reply to ]
On 10/06/2020 07:20, AshishKumar Mishra wrote:
> Hi All ,

Hello,

> I am starting with virtualization / hypervisor for the for first time &
> hence apologize if this is not the correct place to start .

Welcome! It will be nice to see zephyr running on Xen!

>
> 1) Can team please provide any pointer for the steps
>      to port / run an rtos (Zephyr ) on xen.
>
>
> 2) Or if team can point share feedback w.r.t complexity & rough time for
> this ?
> I am evaluating zephyr on XEN  (as i come from linux driver development
> background , i thought zephyr will be better )

Porting an OS to Xen is a bit vast. The bare-minimum should not take
long depending on what arch/guest you are targeting, but this can add up
when porting PV drivers.

Below a few question to try to have a better picture:
- What architecture are you targeting?
- What type of guest (e.g PV, PVH, HVM)?
- What para-virtualized devices do you expect to expose to your guest?

Cheers,

--
Julien Grall
Re: Input to start porting OS to XEN [ In reply to ]
Hi Julien ,

Thanks for reverting back .

1) Currently i was planning on Raspberry pie-4
( As that was simpler w.r.t linux bsp & availability )


2) w.r.t PV vs PVH vs HVM
- I was evaluating HVM initially .
as based on what I understand , PV will require changes
to be done on Zephyr codebase initially.
- With HVM , based on my reading i can look at getting the binary of zephyr
and and xen HVM config file will help me get started

But , request to please correct if i have mis-understood or mis-planned any
thing here.


3) Ethernet and CAN interface are what i was looking for on Zephr.

If team can share any other info / suggestions based on previous experience
it would be of great help to me.

Thanks
Ashish



On Wed, Jun 10, 2020, 11:04 PM Julien Grall <julien@xen.org> wrote:

>
>
> On 10/06/2020 07:20, AshishKumar Mishra wrote:
> > Hi All ,
>
> Hello,
>
> > I am starting with virtualization / hypervisor for the for first time &
> > hence apologize if this is not the correct place to start .
>
> Welcome! It will be nice to see zephyr running on Xen!
>
> >
> > 1) Can team please provide any pointer for the steps
> > to port / run an rtos (Zephyr ) on xen.
> >
> >
> > 2) Or if team can point share feedback w.r.t complexity & rough time for
> > this ?
> > I am evaluating zephyr on XEN (as i come from linux driver development
> > background , i thought zephyr will be better )
>
> Porting an OS to Xen is a bit vast. The bare-minimum should not take
> long depending on what arch/guest you are targeting, but this can add up
> when porting PV drivers.
>
> Below a few question to try to have a better picture:
> - What architecture are you targeting?
> - What type of guest (e.g PV, PVH, HVM)?
> - What para-virtualized devices do you expect to expose to your guest?
>
> Cheers,
>
> --
> Julien Grall
>
Re: Input to start porting OS to XEN [ In reply to ]
Looks like i might have missed an important point
that.
ZEPHYR is still ported for RASPBERRY ARM core.

Is there any way by which we can run OS like this ,
using some kind of QEMU .
Any pointers would be helpful or i am missing something.

Thanks
Ashish
Re: Input to start porting OS to XEN [ In reply to ]
On 11/06/2020 04:45, AshishKumar Mishra wrote:
> Hi Julien ,

Hi,

Apologies for the late answer.


> Thanks for reverting back .
>
> 1) Currently i was planning on Raspberry pie-4
>      ( As that was simpler w.r.t linux bsp & availability )

I saw you next answer suggesting Zephys doesn't support RPI 4. Unless
you plan to run Zephyr in Dom0, support for a given board is not necessary.

>
>
> 2) w.r.t PV vs PVH vs HVM
> - I was evaluating HVM initially .
>   as based on what I understand , PV will require changes
>   to be done on Zephyr codebase initially.
> - With HVM , based on my reading i can look at getting the binary of zephyr
>    and and xen HVM config file will help me get started

We don't support HVM guest on Arm, instead we support something close to
PVH. By that, we are taking advantage of the HW virtualization and most
of the devices are para-virtualized or passthrouhg-ed.

> But , request to please correct if i have mis-understood or mis-planned
> any thing here.

There are a couple of talks about how to port a new OS to Xen on Arm
(you can look at [1] for instance).

Most of the efforts would be to support para-virtualized devices.
Thankfully, there are already multiple implementations existing for some
of the PV devices.

>
>
> 3) Ethernet and CAN interface are what i was looking for on Zephr.

While network PV protocol already exist in Xen, I am not aware of CAN
interface. You would need to write from scratch an interface.

Cheers,

[1] https://www.youtube.com/watch?v=NksLB29NSpQ

--
Julien Grall
Re: Input to start porting OS to XEN [ In reply to ]
Hi Julien ,

Extremely thankful for your response & link.
Will go through it.

Thanks & Regards,
Ashish


On Mon, Jun 15, 2020, 3:56 PM Julien Grall <julien@xen.org> wrote:

>
>
> On 11/06/2020 04:45, AshishKumar Mishra wrote:
> > Hi Julien ,
>
> Hi,
>
> Apologies for the late answer.
>
>
> > Thanks for reverting back .
> >
> > 1) Currently i was planning on Raspberry pie-4
> > ( As that was simpler w.r.t linux bsp & availability )
>
> I saw you next answer suggesting Zephys doesn't support RPI 4. Unless
> you plan to run Zephyr in Dom0, support for a given board is not necessary.
>
> >
> >
> > 2) w.r.t PV vs PVH vs HVM
> > - I was evaluating HVM initially .
> > as based on what I understand , PV will require changes
> > to be done on Zephyr codebase initially.
> > - With HVM , based on my reading i can look at getting the binary of
> zephyr
> > and and xen HVM config file will help me get started
>
> We don't support HVM guest on Arm, instead we support something close to
> PVH. By that, we are taking advantage of the HW virtualization and most
> of the devices are para-virtualized or passthrouhg-ed.
>
> > But , request to please correct if i have mis-understood or mis-planned
> > any thing here.
>
> There are a couple of talks about how to port a new OS to Xen on Arm
> (you can look at [1] for instance).
>
> Most of the efforts would be to support para-virtualized devices.
> Thankfully, there are already multiple implementations existing for some
> of the PV devices.
>
> >
> >
> > 3) Ethernet and CAN interface are what i was looking for on Zephr.
>
> While network PV protocol already exist in Xen, I am not aware of CAN
> interface. You would need to write from scratch an interface.
>
> Cheers,
>
> [1] https://www.youtube.com/watch?v=NksLB29NSpQ
>
> --
> Julien Grall
>