Friday, October 16, 2026 Today’s Paper
Log in Join free
Vol. I · No. 17 Texas Edition
Friday, Oct 16
Texas first. Then the world.
Always free Updated 3 minutes ago
Read. React. Discuss.
Tech

Show HN: PanamaKVM – direct-booting Linux from Java 25 via FFM/KVM

By rusanoph 2 min read 2 views 0 comments

Hi HN!PanamaKVM is an experimental miniVM containing the bare minimum components needed to boot an x86 Linux kernel and run an interactive terminal. Its key feature is that it is built on top of Java 25 without using JNI. Instead, it utilizes the Foreign Function & Memory API (FFM).I generally stick to Java LTS versions - having worked with Java 21 for a long time - so I recently decided to check if any new LTS releases had come out. It turns out I was a year late to the party regarding Java 25. While looking through the changelog, I noticed the new FFM for native code and decided to give it a try.As it turned out, I was a couple of years late to the FFM feature :D, since it had already been introduced as a full-fledged part of the language in Java 22.One interesting thing I discovered during implementation was a quirk in the ioctl ABI: there seemed to be a discrepancy between the KVM API documentation and the actual implementation. The very first call I attempted was KVM_GET_API_VERSION, but it unexpectedly returned EINVAL. After tracing the execution with strace, I managed to pinpoint the root cause (which was nearly impossible to debug at the Java level): the call was reaching…

Hacker News (Newest) Original story · github.com
Read the full story

Discussion (0)

No comments yet. Start the conversation!