GaloisInc / HaLVM

The Haskell Lightweight Virtual Machine (HaLVM): GHC running on Xen
BSD 3-Clause "New" or "Revised" License
1.05k stars 88 forks source link

Use mini-os as the Xen layer #95

Open izgzhen opened 7 years ago

izgzhen commented 7 years ago

This is not proposed by me but by @acw , but I have investigated into it a bit. Discussion or correction is welcomed.

My current conclusion is we can't use mini-OS as a drop-in replacement for the rts/xen right now, because interfaces implemented by mini-OS is not a super-set of rts/xen. For example, in libc, we assume a mremap syscall, which is provided by the runtime_realloc in rts/xen indirectly. However, mini-OS doesn't implement this at all.

Also, locks and signals are also something unique to rts/xen.

However, mini-OS has better support for other features in POSIX, esp. when file descriptor is involved.

So here are two ways to go:

acw commented 7 years ago

Just to be clear, replacing rts/xen with mini-os is a HaLVM3 task, and I do not expect HaLVM3 to be a natural progression from HaLVM2.

In particular, in HaLVM3, I plan to completely remove rts/xen, and build GHC using the existing build system using the POSIX backend. This POSIX backend will then link against our custom copy of musl, which will then link against one of our low-level options (mini-os, solo5, the Linux kernel, etc.).