8000 muvm: init from krun as 0.4.1; libkrunfw: 4.5.1 -> 4.9.0; libkrun: 1.9.8 -> 1.11.2 by nrabulinski · Pull Request #397932 · NixOS/nixpkgs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

muvm: init from krun as 0.4.1; libkrunfw: 4.5.1 -> 4.9.0; libkrun: 1.9.8 -> 1.11.2 #397932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 3, 2025

Conversation

nrabulinski
Copy link
Member

Things done

Bumped libkrun, libkrunfw, and muvm. Muvm now also ships with an init script that sets up /run/current-system and /run/opengl-driver. In the future we'll also need to set up /run/wrappers for FEX to work with RootFS, but that's not strictly necessary so I'll leave it out of this PR.

Supersedes #347792

cc @RossComputerGuy

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Apr 11, 2025
@nix-owners nix-owners bot requested review from NickCao and RossComputerGuy April 11, 2025 12:59
@RossComputerGuy RossComputerGuy self-assigned this Apr 11, 2025
@RossComputerGuy
Copy link
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 397932


aarch64-linux

✅ 5 packages built:
  • krunvm
  • libkrun
  • libkrun.dev
  • libkrunfw
  • muvm

@RossComputerGuy
Copy link
Member
RossComputerGuy commented Apr 11, 2025

Doesn't work on my Ampere or M1 Pro but works on the community x86_64 box.

$ RUST_BACKTRACE=full ./result/bin/muvm -i -t bash
No IPv6 nameserver available for NDP/DHCPv6

thread 'gpu worker' panicked at src/devices/src/virtio/gpu/virtio_gpu.rs:254:14:
Rutabaga initialization failed!: ComponentError(-19)
stack backtrace:
   0:     0xffff02a463ec - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h16aea6164fca90f2
   1:     0xffff028b4440 - core::fmt::write::h414bd60068918bd5
   2:     0xffff02a4b3c8 - std::io::Write::write_fmt::h5042b1fb509b14a0
   3:     0xffff02a495b0 - std::panicking::rust_panic_with_hook::h49f6374fa14531ba
   4:     0xffff02a46940 - std::panicking::begin_panic_handler::{{closure}}::h7a947cc271f4cf40
   5:     0xffff02a468b8 - std::sys::backtrace::__rust_end_short_backtrace::hf036279999a1f709
   6:     0xffff02a48d98 - rust_begin_unwind
   7:     0xffff02879e98 - core::panicking::panic_fmt::h3fe6c2f8a83fe357
   8:     0xffff0287a288 - core::result::unwrap_failed::h62202f9b519b5a24
   9:     0xffff0291b2c8 - devices::virtio::gpu::worker::Worker::work::hffd15852d3ff0478
  10:     0xffff0294c2ac - std::sys::backtrace::__rust_begin_short_backtrace::h49505752f4d1e027
  11:     0xffff0295f00c - core::ops::function::FnOnce::call_once{{vtable.shim}}::he9a57120e30b757f
  12:     0xffff02a43a00 - std::sys::pal::unix::thread::Thread::new::thread_start::h2ea50c841a6376a2
  13:     0xffff025ef02c - start_thread
  14:     0xffff0265e20c - thread_start
  15:                0x0 - <unknown>

thread 'main' panicked at crates/muvm/src/guest/net.rs:174:25:
index out of bounds: the len is 313 but the index is 313
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@nrabulinski
Copy link
Member Author

Yeah the out of bounds error for me only happens on latest nixpkgs, when I base my PR on top of nixpkgs I'm using in my config it works fine. Will investigate

@RossComputerGuy
Copy link
Member

Ok, that probably explains why. It feels like muvm only uses graphics when the host has it. Since the community x86_64 box doesn't have graphics configured, it's not a problem. Both my aarch64 systems have graphics configured so that's causing the problem. I won't consider that a blocker.

@nrabulinski nrabulinski changed the title muvm: init from krun as 0.3.1-unstable-2025-04-10; libkrunfw: 4.5.1 -> 4.9.0; libkrun: 1.9.8 -> 1.11.2 muvm: init from krun as 0.4.0; libkrunfw: 4.5.1 -> 4.9.0; libkrun: 1.9.8 -> 1.11.2 Apr 16, 2025
@nrabulinski
Copy link
Member Author

DO NOT MERGE UNTIL AsahiLinux/muvm#168 IS MERGED UPSTREAM (should be soon)

Also @RossComputerGuy Re: gpu worker panicking - that's expected because muvm currently doesn't handle headless mode super gracefully, but it works just fine. Even if you do get that panic you can use muvm as expected. The issue was the out-of-bounds read in the dhcp implementation.

@nrabulinski
Copy link
Member Author

If you want to test muvm replace the source rev with refs/pull/168/head to simulate my PR being merged

nrabulinski and others added 7 commits April 23, 2025 10:36
Previously the pkgconfig and include dirs were mistakenly moved into
$dev/lib/pkgconfig/pkgconfig and $dev/include/include,
which was breaking packages which depended on libkrun through pkg-config
Co-authored-by: Tristan Ross <tristan.ross@midstall.com>
@nrabulinski nrabulinski changed the title muvm: init from krun as 0.4.0; libkrunfw: 4.5.1 -> 4.9.0; libkrun: 1.9.8 -> 1.11.2 muvm: init from krun as 0.4.1; libkrunfw: 4.5.1 -> 4.9.0; libkrun: 1.9.8 -> 1.11.2 Apr 23, 2025
@nrabulinski
Copy link
Member Author

The PR is now ready for review, testing, and merging :)

@RossComputerGuy
Copy link
Member

muvm works on my Ampere system!

@RossComputerGuy
Copy link
Member

Oh yeah, 1 thing is missing. Add a throw noting that krun was renamed to muvm in pkgs/top-level/alias.nix.

@wegank wegank added 12.approvals: 1 This PR was reviewed and approved by one reputable person 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package labels Apr 25, 2025
@RossComputerGuy
Copy link
Member

I'll just add the alias myself. 🙃

@RossComputerGuy RossComputerGuy merged commit bd49b63 into NixOS:master May 3, 2025
28 of 29 checks passed
teto pushed a commit to teto/nixpkgs that referenced this pull request May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 12.approvals: 1 This PR was reviewed and approved by one reputable person 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0