Last month or so I have stayed mainly focused on trying to improve the 
AArch64 port of OSv. And even though I have made quite many strides in that 
direction, there is still quite a lot of work left to do. Relatedly I have 
updated the AArch64 wiki page with more details - 
https://github.com/cloudius-systems/osv/wiki/AArch64 - feel free to make 
any corrections you see fit. 

First of I wanted to say that OSv runs on newest Raspberry PI 4 on both 
QEMU and Firecracker with KVM on. If you want to replicate my setup please 
see this portion of the wiki page - 
https://github.com/cloudius-systems/osv/wiki/AArch64#setup-raspberry-pi-4-for-osv.
 
The one I am using has 4GB of memory (these days you can get the 8GB one 
for around 50$ I think) and boots from SSD which makes it much faster.

So here is what works:

   - OSv can boot in both emulated AArch64 mode on QEMU as well as on QEMU 
   and Firecracker with KVM acceleration on real AArch64 hardware (this has 
   only been tested on Raspberry PI 4, though original part of the Wiki 
   mentions Foundation model)
   - Both PCI and MMIO devices seem to function well (no MSI/X though)
   - Networking seems to function on both QEMU and Firecracker at least 
   based on some simple ping experiments
   - OSv Aarch64 kernel and other binaries can be cross-compiled on Fedora 
   (it should not be difficult to make it build natively on RP4 and it might 
   not be that slow but main OSv makefile would need to be adapted)
   - Both RAMFS and ROFS images can be built and run
   - All unit tests except for Java can be built for Aarch64 and many of 
   them (have not done inventory yet) seem to be passing
   - It is possible to debug OSv with the support of the updated loader.py
      - the best debugging experience for debugging OSv running on RPI4 is 
      to remote debug it from the Fedora machine where it was cross-compiled)
   
Here is what is left (the details are in the Wiki page and in newly opened 
issues):

   - aarch64: dynamically map kernel code in early boot 
   <https://github.com/cloudius-systems/osv/issues/1087>
   - aarch64: bugs in arm-clock 
   <https://github.com/cloudius-systems/osv/issues/1091>
   - aarch64: hangs while booting on KVM with #vCPUs >= 2 
   <https://github.com/cloudius-systems/osv/issues/1092>
   - aarch64: OSv crashes frequently during power-off process with ROFS 
   <https://github.com/cloudius-systems/osv/issues/1093>
   - ZFS and ROFS with caching enabled does not work (gets into an infinite 
   loop dues to an exception, maybe mishandled); seems to be caused by mmap 
   related bugs (for example tst-mmap is failing as well)
   - Lack of floating-point support
   - Lack of TLS support for applications
   - Single stack only
      - Like X64, AAch64 port needs dedicated interrupt, exception, signal 
      and syscall stacks (am I wrong?)
   - No GICv2m or GICv3 support, therefore no MSI or MSI-X at the moment
   - All the places #ifndef AARCH64 places in code and not related to the 
   above need to be addressed


If anyone has ideas on how to solve those newly open issues (especially the 
arm clock and SMP one) or fill other gaps (for example the floating point 
support and multiple stacks), please share your knowledge. Even the 
high-level pointers to what needs to be done especially in regards to 
adding the floating-point support would be helpful.

Waldek

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/b13b617e-6c2c-4389-bcc4-34ef551423e8n%40googlegroups.com.

Reply via email to