[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Running Xen on RaspberryPi-3-B



Hello Andre,

On Sun 21 Jul, 2019, 5:45 AM André Przywara, <andre.przywara@xxxxxxx> wrote:
On 20/07/2019 17:39, Julien Grall wrote:

Hi,

> On 7/20/19 4:39 AM, Rajagopal Aravindan wrote:
>> Hello Julien,
>>
>> Appreciate your reply, thanks.
>>
>>  > Instead I would recommend to look at the new RPI4.
>> Sure, will give it a look-in.
>>
>>  >It contains a GIC and the port should be easier.
>> Does that mean Xen won't run straight away and some porting needs to
>> be done ?

Not much needed on the Xen side, I got away with a small patch for the
UART. Using CONFIG_EARLY_PRINTK=8250,0xfe215040,2 should give you some
output even without it:
https://pastebin.com/uZqQ2XPm

You need to have some more decent firmware than what is shipped, though.

> I bought one recently but I haven't yet had the chance to see how much
> effort is required to getting Xen running on it.
>
> For some general guidance on porting a new board to Xen, please see [1].
>
>> Again, any directions would be helpful, on where/what to start with.
>>
>>  > So porting Xen on the RPI 3 is probably going to be quite consequent.
>> Sounds like Xen & its guests can be made to run on RPi3, assuming
>> information on BRCM GIC is available on the net.
>
> The RPI 3 does not use the GIC so I am not sure what you found online...
>
>> If yes,
>>
>>   * Getting Xen to run on RPi3 would be a very good case study for
>>     understanding its internals, for Xen beginner like me.
>
> I don't think trying to port Xen on the RPI 3 is a good way to
> understand the internals. It would be best to look at platform that are
> closer to Xen requirements...
>
>>   * Should anyone manage to get it running on RPi3  ...
>>       o Would Xen be willing to take it upstream ?
>
> Not really. See below...
>
>>       o Or are there reservations about it, since it may NOT be useful
>>         on other hardware and hence not worth maintaining ?
>
> AFAIK, the interrupt controller used by the RPI 3 does not support
> virtualization. So this is quite departure from the minimal requirement
> used by Xen.
>
> There are various way to make it working on Xen:
>    1) Emulating the interrupt controller
>    2) Use a PV interface as used by x86
>
> In both cases, the work is going to be consequent with very limited
> benefits to other platforms.

I agree on this, adding support for the RPi3 interrupt controller would
be quite painful, and also needs to be integrated with the existing
(V)GIC support, which has the potential to introduce regressions.
Plus you need to amend the arch timer code, as this is integrated with
the GIC for virtualisation purposes.
AFAIK the RPi3 is one of the few (if not the only one) ARM64 platform
without a GIC, and given that the RPi4 fixes this, I don't see much hope
for upstreaming this kind of change.

If you are desperate for (hardware) virtualisation, KVM supports guests
without a (hardware) GIC (via the QEMU emulation), although this is
slower and less tested. Or you just go for some container solution.

Cheers,
Andre.

I built Xen with your CONFIG_EARLY_PRINTK but couldn't meet with success.

That brings me to your point about decent firmware. I am using u-boot 2019. Is that good enough?

Thanks,
Rajagopal
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.