Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It does not work on qemu #2

Open
foreverpersist opened this issue Apr 19, 2019 · 2 comments
Open

It does not work on qemu #2

foreverpersist opened this issue Apr 19, 2019 · 2 comments

Comments

@foreverpersist
Copy link

It fails on uhyve because of KVM_ENABLE_CAP in uhyve.c. So, I just comment this section, then it works ok.

However, it doesn't work on qemu. When I set HERMIT_ISLE=qemu, kernel can't run without error report. I also try qemu -kernel ldhermit.elf, it seems that the kernel doesn't boot at all.

My host OS is ubuntu 14.04

@olivierpierre
Copy link
Collaborator

Yes indeed currently HermiTux does not run on top of Qemu. There is a bit of work needed to allow it:

  • One would need to modify the loading process so that with Qemu we can load not only the kernel but also the Linux application. Currently this is made by Uhyve, see this function.
  • Some system calls are redirected to the host, for example filesystem related system calls (when not using minifs), through an hypercall that is currently implemented only by uhyve. However there is already an infrastructure coming from HermitCore's sources that should allow a similar redirection with Qemu: for example see this switch for the read syscall that check if the system is running with Uhyve (if not, it means it runs with Qemu) and forwarding the syscall accordingly.

@foreverpersist
Copy link
Author

I have some advices:

  • For compatible with traditional hypervisors (like qemu, qemu-lite and firecraker),modifying HermiTux kernel by appending ELF loader may be useful. (Building a compatible kernel is applicable and can benefit from new optimized hypervisors)

  • For filesystem (and network) optimization, supporting virtio may be a better solution than redirecting system calls. (Using virtio-fs for filesystem, vhost-net for network can get better performance)

DelphineFqt1 pushed a commit to DelphineFqt1/hermitux that referenced this issue Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants