3 ms·
Thanks, that answer is very interesting. If you're ever on the GraalVM slack please do ping me, I've been interested in Sulong and related topics for a long tim
by mike_hearn 4y ago
Thanks, that answer is very interesting. If you're ever on the GraalVM slack please do ping me, I've been interested in Sulong and related topics for a long time. Edit: I found your report, will take a look.
HotSpot has a thing called libjsig which lets HotSpot interop with code that needs to install its own signal handlers. I guess you could use this from a native component of a Truffle language to intercept segfaults, and then if a bit of code is observed to be catching traps you could deopt/reopt. Intel MPKs could be used to protect the VM's own areas of memory. So, still use the native MMU but with a few twists to allow it to be fully virtualized.
Still, at some point I guess the question becomes why not just use something like NOAH. If you have an amd64 host then you can run userspace code inside a custom VM and just trap and emulate the syscalls from outside that space. The main benefit I can think of using Graal to do this is not needing nested virtualization, and maybe with additional work the pure software approach can be faster eventually.