containers / libkrun

A dynamic library providing Virtualization-based process isolation capabilities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running podman with krun on Asahi Fedora breaks

ericcurtin opened this issue · comments

This potentially could be a 16k vs 4k page size thing, not that I have any clues that suggest that. It just often is with Asahi bugs

$ sudo podman run --runtime krun -it debian bash
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidHostAddress', src/libkrun/src/lib.rs:228:50
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 4215608256

Same problem via krunvm:

krunvm start debian-microVM
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidHostAddress', src/libkrun/src/lib.rs:228:50
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Bus error (core dumped)

Just to describe my use case also is I was hoping via libkrun we could create a 4k page size environment on an Asahi Linux system running a 16k kernel. qemu can do this, but I was hoping we could do this via libkrun.

https://github.com/containers/libkrun/blob/d31747aa92cf83df2abaeb87e2a83311c135d003/src/vmm/src/resources.rs#LL183C9-L183C101

I'm also curious why we do a bitwise and between host_addr and page_size?

The problem was actually in the bundle in libkrunfw. We were already padding it to 16K precisely for compatibility with Apple Silicon, but we were still telling GCC to align to 4K. The linked PR should fix this.

Opened another PR if we want to cover 64k environments also containers/libkrunfw#46