frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

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

https://github.com/rusanoph/panama-kvm
2•rusanoph•1h ago
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 the kernel without a third argument (whereas the documentation specified two). As it turns out, when the KVM documentation says an ioctl takes no arguments, it actually does require one... Due to KVM's implementation details, it implicitly expects a third parameter - it just has to be zero. This is likely to prevent reading garbage data from memory. Perhaps some readers have insights into the underlying reason for this difference - or maybe it was just human error and "things just turned out that way."

In any case, by following the instructions in the repository's README, you can boot a functional Linux kernel and interact with it via the terminal. I’ve only tested the launch using Alpine 3.24.2 x86-64 on WSL2, so that might be a limitation. However, if you run it on a different setup or on bare-metal Linux, that would be great - please let me know. And if something breaks in the process - even better - let me know about that too.

As for what I haven't finished yet in the current virtual machine implementation: networking and persistent storage are missing, and there is no virtio integration. Multi-vCPU startup mode isn't supported either; essentially, the creation of a single vCPU is currently hardcoded.

I’d also love to hear your thoughts on the project. I would particularly value any feedback regarding the use of FFM and the KVM API itself.

I’ll be happy to answer any questions you have.

Show HN: Guitoro, a virtual guitar you strum with your keyboard

https://guitoro.com/
39•talccc•1h ago•13 comments

Show HN: Spotatui, a Spotify TUI/GUI without web API rate limits

https://github.com/LargeModGames/spotatui
12•LargeModGames•8h ago•0 comments

Show HN: XY Music Notation

https://music.xy.dev/
23•jmole•2h ago•20 comments

Show HN: How Random Are You?

https://lab.specr.net/rigged-draw/
46•vunderba•3h ago•21 comments

Show HN: Stream live open data in two commands

https://docs.hypermass.io/docs/cli/
6•gardensalad•7h ago•1 comments

Show HN: Use your OpenAI subscription to create audiobooks

https://pdftomp3.com/connect-ai/
149•janpmz•10h ago•76 comments

Show HN: Deslop – Oxlint rules for AI-generated TypeScript

https://github.com/maharshi365/deslop
11•maharshi365•2h ago•2 comments

Show HN: Parsimony – an open-source benchmark for how much code AI models add

https://parsimony.lasu.dev/
2•lasu•31m ago•0 comments

Show HN: Watch RL-trained squads play a 2D battle royale (full match replay)

https://123wwwa.github.io/survevbot-demo/
2•123wwwa•32m ago•0 comments

Show HN: Tern – Native macOS SSH Client in Rust/GPUI (76 MB vs. Tabby's 580 MB)

https://github.com/your-moon/tern
2•moon11s•44m ago•0 comments

Show HN: BitRun – Run 1-bit LLMs on CPU at 98T/s without compiling

https://github.com/IshekKhal/bitrun
2•ishekofficial•53m ago•0 comments

Show HN: My live 3D satellite tracker, now with asteroids and a UAP archive

https://skylens.yantraai.app/app.html
3•skylensspace•54m ago•0 comments

Show HN: CoreXTrader – A cross-platform Trading DSL and Voice AI terminal

https://corextrader.com
2•ask4abusaidu•56m ago•0 comments

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

https://github.com/rusanoph/panama-kvm
2•rusanoph•1h ago•0 comments

Show HN: Factory DS, A Factorio-Like Game for the Nintendo DS

https://ronangaillard.github.io/posts/factory-ds-a-factory-game-for-the-nintendo-ds/
2•j_leboulanger•1h ago•0 comments

Show HN: Opensidian

https://opensidian.org/
25•jpzk•8h ago•17 comments

Show HN: Hatoba, an open-source SSH client with an AI assistant and E2EE sync

https://github.com/scarletkc/Hatoba
2•scarletkc•1h ago•0 comments

Show HN: SolidCraft – Open-Source Parametric CAD in Rust (With MCP Support)

https://github.com/bherbruck/solidcraft
128•bherbruck•20h ago•37 comments

Show HN: FandomMap – a map of 700 fan conventions, with their guest lists

https://www.fandommap.com/
3•marcandremongeo•2h ago•0 comments

Show HN: Sayso, free open source dictation for Mac, Windows, and Linux

https://github.com/watzon/sayso
9•watzon•4h ago•4 comments

Show HN: Knitting – A shared-memory concurrency runtime for Node.js,Bun,and Deno

https://js.knitting.run/
6•mimiMonads•5h ago•2 comments

Show HN: An experimental pattern-first DAW that supports MCP

https://github.com/andrewfader/blokkily
82•androsynth89•21h ago•33 comments

Show HN: Treesum – Replace MS Excel/Project with a Code Editor

https://www.treesum.app/
2•mallahan•3h ago•1 comments

Show HN: Lowlight – Dim your MacBook keyboard backlight below the macOS minimum

https://github.com/Isaac-Harper/lowlight
3•isaacharper•3h ago•0 comments

Show HN: Atticus – Hold-to-talk voice assistant for macOS that runs on Claude -p

https://github.com/SaarthurR/atticus-mac
113•SaarthRanka•1d ago•24 comments

Show HN: pg_vectorsearch: Scalable Open-Source Vector Search in PostgreSQL

https://github.com/timescale/pg_vectorsearch
3•enordstr•4h ago•0 comments

Show HN: OpenMCX – An open source mission critical communications stack

https://openmcx.com
2•abdan15•5h ago•0 comments

Show HN: Pi-Infinite-Context

https://github.com/fdietze/pi-infinite-context
2•manx•5h ago•6 comments

Show HN: RSI-Anything – JEPA world models for self-improving agents

https://github.com/Gen-Verse/RSI-Anything
2•mrkn1•5h ago•0 comments

Show HN: What to Wear in NYC Today

https://wearing.nyc/
7•hammeiam•5h ago•3 comments