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

Re: [Xen-users] Xen 4.13 and Raspberry Pi4



Hi,

Em 26/03/2020 07:00, André Przywara escreveu:
On 26/03/2020 09:18, Julien Grall wrote:

Hi,

On 26/03/2020 00:20, marcos.ata1983@xxxxxxxxx wrote:
Em 24/03/2020 08:05, Julien Grall escreveu:

On 24/03/2020 01:19, marcos.ata1983@xxxxxxxxx wrote:
Hi,
Hello,

On *https://wiki.xenproject.org/wiki/Xen_Project_4.13_Feature_List*
I read that "Xen 4.13 also supports Hygon Dhyana 18h processor
family, *Raspberry Pi4* and Intel AVX512."

So I try to install Xen Project from source (xen-4.13.0.tar.gz) on
my Raspberry Pi 4 4GB (with Raspbian Buster Lite):
                                 ^^^^^^^^
This might be a problem.
I am not sure we really support this crippled userland (ARMv6 +
hardfloat) for Xen.
Since the hardware virtualisation that Xen relies on was introduced in
ARMv7 only, ARMv6 was never a supported platform.

I guess the statement about "Raspberry Pi4" support in the release notes
applies purely to the hardware, as in: The Xen hypervisor is able to
boot on the board - at least that is all I tested.
This is mentioned because former RPi models (<= 3) could not run Xen due
to the missing GIC interrupt controller, which is now fixed in the RPi4.

That being said you could try to use any of the proper 64-bit
distributions for the RPi4 out there, at least that should fix your
compilation problems.

Done, Ubuntu 18.04 arm64 fixed the compilation problems.

If and how they support installing the hypervisor is another issue. If
the boot process uses EFI (and thus grub), it should work, but if the
distribution relies on the RaspberryPi foundation boot process, I don't
see how we could load both Xen and Dom0 easily.
Apparently is using u-boot, I tried u-boot-update but don't work for Xen kernel:

P: Checking for EXTLINUX directory... not found.
P: Creating EXTLINUX directory... done: /boot/extlinux
P: Writing config for /boot/vmlinuz-5.3.0-1019-raspi2...
P: Writing config for /boot/vmlinuz-5.3.0-1017-raspi2...
P: Updating /boot/extlinux/extlinux.conf...

The /boot/extlinux/extlinux.conf look like:

default l0
menu title U-Boot menu
prompt 0
timeout 50


label l0
    menu label Debian GNU/Linux kernel 5.3.0-1019-raspi2
    linux /boot/vmlinuz-5.3.0-1019-raspi2
    initrd /boot/initrd.img-5.3.0-1019-raspi2
   
    append root=LABEL=writable

And /boot :

System.map-5.3.0-1017-raspi2
System.map-5.3.0-1019-raspi2
config-5.3.0-1017-raspi2
config-5.3.0-1019-raspi2
dtb->dtbs/5.3.0-1019-raspi2/./bcm2711-rpi-4-b.dtb
dtb-5.3.0-1017-raspi2->dtbs/5.3.0-1017-raspi2/./bcm2711-rpi-4-b.dtb
dtb-5.3.0-1019-raspi2->dtbs/5.3.0-1019-raspi2/./bcm2711-rpi-4-b.dtb
dtbs
extlinux
firmware
grub
initrd.img->initrd.img-5.3.0-1019-raspi2
initrd.img-5.3.0-1017-raspi2
initrd.img-5.3.0-1019-raspi2
initrd.img.old->initrd.img-5.3.0-1017-raspi2
vmlinuz->vmlinuz-5.3.0-1019-raspi2
vmlinuz-5.3.0-1017-raspi2
vmlinuz-5.3.0-1019-raspi2
vmlinuz.old->vmlinuz-5.3.0-1017-raspi2
xen->xen-4.13.0
xen-4->xen-4.13.0
xen-4.13->xen-4.13.0
xen-4.13.0
xen-4.13.0.config


To your particular problem:

*./configure* its OK

But *make world *or *make dist *got the error message:


/tmp/cccDG1wU.s: Assembler messages:
/tmp/cccDG1wU.s:205: Error: selected processor does not support
`dmb' in ARM mode
"dmb" as an *instruction* is only supported on ARMv7, on ARMv6 it's a
system register write. I guess the Raspbian compiler is configured to
generate ARMv6-hf compatible code, so does not support the instruction.

Were you able to compile the hypervisor (make xen)? I think we fix this
issue there by forcing v7 support in the Makefiles, which we need anyway
for the hardware virtualisation code.

make xen work

make install no :

ln -f -s xen-4.13.0 //boot/xen-4.13
ln: failed to create symbolic link '//boot/xen-4.13': Operation not permitted
make[2]: *** [Makefile:65: _install] Error 1
make[2]: Leaving directory '/tmp/xen-4.13.0/xen'
make[1]: *** [Makefile:50: install] Error 2
make[1]: Leaving directory '/tmp/xen-4.13.0/xen'
make: *** [Makefile:130: install-xen] Error 2

But ok I leaved Raspbian per Ubuntu 18.04 arm64.

So if I understand correctly, Xen was compiled successfully, the problem is the boot of the Xen kernel due to the Raspberry Pi architecture.

Maybe u-boot could help but I'm not sure. Anyway, I am interested in helping even if testing something.

Cheers.


I am not sure if it's worth fixing this for the userland parts as well.
Clearly Xen can only run on >= ARMv7 hardware, so we might add a flag to
the compiler to enforce this?

Cheers,
Andre.

/tmp/cccDG1wU.s:227: Error: selected processor does not support
`dmb' in ARM mode
/tmp/cccDG1wU.s:268: Error: selected processor does not support
`dmb' in ARM mode
/tmp/cccDG1wU.s:289: Error: selected processor does not support
`dmb' in ARM mode
make[5]: ***
[/tmp/xen-4.13.0/tools/xenstore/../../tools/Rules.mk:213:
xenstored_domain.o] Error 1
make[5]: Leaving directory '/tmp/xen-4.13.0/tools/xenstore'
make[4]: *** [/tmp/xen-4.13.0/tools/../tools/Rules.mk:237:
subdir-install-xenstore] Error 2
make[4]: Leaving directory '/tmp/xen-4.13.0/tools'
make[3]: *** [/tmp/xen-4.13.0/tools/../tools/Rules.mk:232:
subdirs-install] Error 2
make[3]: Leaving directory '/tmp/xen-4.13.0/tools'
make[2]: *** [Makefile:73: install] Error 2
make[2]: Leaving directory '/tmp/xen-4.13.0/tools'
make[1]: *** [Makefile:134: install-tools] Error 2
make[1]: Leaving directory '/tmp/xen-4.13.0'
make: *** [Makefile:172: world] Error 2
This seems to suggest the compiler used is not behaving as Xen
expects. Would you mind to give more details on the compiler used?
ii  bcc 0.16.17-3.3                          armhf        16-bit x86 C
compiler
ii  device-tree-compiler 1.4.7-3+rpt1                        
armhf        Device Tree Compiler for Flat Device Trees
ii  g++ 4:8.3.0-1+rpi2                       armhf        GNU C++
compiler
ii  g++-8 8.3.0-6+rpi1                         armhf        GNU C++
compiler
ii  gcc 4:8.3.0-1+rpi2                       armhf        GNU C compiler
ii  gcc-8 8.3.0-6+rpi1                         armhf        GNU C
compiler
ii  libllvm9:armhf 1:9.0.1-6+rpi1~bpo10+1               armhf       
Modular compiler and toolchain technologies, runtime library
ii  libluajit-5.1-2:armhf 2.1.0~beta3+dfsg-5.1                
armhf        Just in time compiler for Lua - library version
ii  libluajit-5.1-common 2.1.0~beta3+dfsg-5.1                
all          Just in time compiler for Lua - common files
ii  libxkbcommon0:armhf 0.8.2-1                             
armhf        library interface to the XKB compiler - shared library
ii  luajit 2.1.0~beta3+dfsg-5.1                 armhf        Just in
time compiler for Lua programming language version 5.1
ii  ocaml-compiler-libs 4.05.0-11+rpi1                      
armhf        OCaml interpreter and standard libraries

            

Can someone help me? Its really possible to install Xen on Raspberry
Pi 4?
You may want to have a look at
https://github.com/dornerworks/xen-rpi4-builder.
I tried (I gave up on the slow and inconsistent download of
gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz).

Anyway my question is: does Xen Project 4.13 support Raspberry Pi4?,
if so, maybe it was a good idea a how-to with dependencies, etc.
Andre and Stewart (in CC) worked on the RPI4 port. They may have a
pointer to instructions rather than a script.

As an aside note, if there are any instructions, can they be added on
the wiki [1]?

Cheers,

[1] https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-users
-- 
Marcos Renato da Silva Junior
Universidade Estadual Paulista - Unesp
Faculdade de Engenharia de Ilha Solteira - FEIS
Departamento de Engenharia Elétrica - DEE
15385-000 - Ilha Solteira/SP
(18) 3743-1164
_______________________________________________
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®.