FreeBSD Support

Discussion in 'Parallels Desktop for Apple Silicon (M1) Mac' started by MichaelT42, Feb 22, 2021.

  1. MichaelT42

    MichaelT42 Bit Poster

    Messages:
    8
    Dear all,
    installing the latest snapshot of FreeBSD runs fine on the latest preview version. I can build world and kernel, install it, and run it. Networking also works. However, this only works with a single CPU allocated. As soon as I allocate more than one CPU to the VM, FreeBSD hangs at about mounting the filesystem. Is this an issue with the hypervisor or with FreeBSD?
     
  2. kundanno

    kundanno Kilo Poster

    Messages:
    113
    My guess is that the kernel does not support multiple "CPUs" for Arm. Have you checked if there are any options during the kernel build process?
     
  3. MichaelT42

    MichaelT42 Bit Poster

    Messages:
    8
    I'm using a GENERIC kernel, which contains support for SMP. I use it also on a 32 core ARM-based server from Ampere.
    The FreeBSD kernel contains all fixes which were necessary to get FreeBSD up on the VMWare hypervisor available for some ARM platforms.
     
  4. MichaelT42

    MichaelT42 Bit Poster

    Messages:
    8
    The problem persists in 16.5. Any chance to get some feedback from engineering if the problem is related to the VM or to FreeBSD?
     
  5. Elric

    Elric Parallels Developers

    Messages:
    1,673
    Hi,
    could you post the steps you are using to install FreeBSD? It could happen that there is something simple. I tried a quick search for a guide for installing BSD on ARM, but didn't found any simple steps, only rather complicated constructions guides.
     
  6. MichaelT42

    MichaelT42 Bit Poster

    Messages:
    8
    I just took an .iso image, installed from the image and then rebuilt the kernel to get from the snapshot to the latest version. I'm a FreeBSD kernel developer. I do use the same procedure for arm64 based servers. If you want to try it, you can start with this FreeBSD-13.0-RELEASE-arm64-aarch64-disc1.iso. There have been some change in the development branch, but they haven't changed this problem.

    Pleas note: I'm not saying there is a bug in Parallels. I'm only saying that it run rock solid with a single CPU and it hangs during boot with more than one. 100 percent reproducible. It might be an issue with the software from Parallels, it might be an issue with the hypervisor provided by Apple, which is used I think, or it might be a problem with FreeBSD. I might be able to help if it is a FreeBSD problem, at least I might be able to contact some FreeBSD developers. But it would be really great if someone could make a statement which component might have a problem. I don't want to complain. I just want to get it to work.
     
  7. MichaelT42

    MichaelT42 Bit Poster

    Messages:
    8
    For installation: Just mount the .iso image, boot the VM, and follow the text based installer. Configure the VM initially with a single CPU. I used a UFS setup (not zfs) but the rest you can do at what you think. After the installation, you should be able to boot the new VM and log in. Then shut it down, increase the CPU to more than 1 one and it will hang on boot. It is about to mount the filesystem as R/W. Please let me know if you have any further questions.
     
    Elric likes this.
  8. DominicL4

    DominicL4 Bit Poster

    Messages:
    6
    An hour ago, I tried installing FreeBSD 13 with default setup of 2 vCPUs. Yes, the installer hangs when mounting the disc... I thought that FreeBSD is not supported and removed the VM. Thanks for your suggestion, and will try again.
     
  9. Elric

    Elric Parallels Developers

    Messages:
    1,673
    I think we identified the cause of the issue and we made a local fix for it.
    it looks like FreeBSD not quite correctly assumes implementation-defined behaviour of SGI interrupts. We have a local fix of the issue though.
    Lilkely I'll write a post to the FreeBSD mail list, but it is a rather minuscule problem and it is a bit simpler to change behaviour of Parallels implementation.
     
  10. MichaelT42

    MichaelT42 Bit Poster

    Messages:
    8
    Thank you very much for looking into the problem and finding a solution which allows future version of Parallels Desktop to work with the released version of FreeBSD. I would really appreciate if you could also send an email to freebsd-arm@freebsd.org to describe the bug in FreeBSD. That way it might also be resolved in future versions of FreeBSD, which might improve the usability of FreeBSD on ARM platforms.
    So thanks for you effort and I'm looking forward to testing a future upgrade of Parallels.
     
  11. MichaelT42

    MichaelT42 Bit Poster

    Messages:
    8
    The following patch https://reviews.freebsd.org/D26975 fixes the issue on the FreeBSD side. It is from October 2020 and there were some discussions if it is the right way to go...
     
  12. MichaelT42

    MichaelT42 Bit Poster

    Messages:
    8

Share This Page