Skip to content

Comments

Merge guest binaries.#134

Merged
slp merged 8 commits intoAsahiLinux:mainfrom
WhatAmISupposedToPutHere:the-merge
Jan 27, 2025
Merged

Merge guest binaries.#134
slp merged 8 commits intoAsahiLinux:mainfrom
WhatAmISupposedToPutHere:the-merge

Conversation

@WhatAmISupposedToPutHere
Copy link
Collaborator

Merge all guest binaries into one binary and process. This removes sommelier support, but people should use x11bridge anyway. Also stop leaking muvm configuration into vm processes.

@hoshinolina
Copy link
Contributor

FYI, I left a TODO in #130 about moving an env var to the muvm-guest config. If that gets merged first, please make that change too as part of the last commit here when you rebase.

It is in the way for a refactor i want to do, and you should be
using x11bridge anyway.

Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
@WhatAmISupposedToPutHere WhatAmISupposedToPutHere force-pushed the the-merge branch 2 times, most recently from 9b974f5 to f614c5f Compare January 9, 2025 13:06
@hoshinolina
Copy link
Contributor

Needs clippy fixes (probably just an #[allow(clippy::too_many_arguments)] in the problem functions).

We can keep the root uid in our saved set user id, and copy it to ruid/euid
after fork, if launching as root is requested. Writing to drop_caches becomes
a bit tricker when running unprivileged, but we can acquire the privileges in
a forked process for it to work and not affect other launches.

Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
We no longer need the server to be a separate binary.

Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
@sbrivio-rh
Copy link
Contributor

sbrivio-rh commented Jan 17, 2025

Ah, thanks, it works headless again. It's also a bit faster now. Tried with #111, without these commits:

$ time for i in `seq 1 10`; do ./target/debug/muvm --sommelier -- true; done

real	0m10.397s
user	0m7.653s
sys	0m3.165s

with:

$ time for i in `seq 1 10`; do ./target/debug/muvm -- true; done

real    0m10.100s
user    0m7.162s
sys     0m2.638s

By the way:

$ time for i in `seq 1 10`; do ./target/debug/muvm --passt-socket=/tmp/passt_3.socket -- true; done

real	0m9.808s
user	0m7.053s
sys	0m2.725s

...not really substantial.

Edit:

$ time for i in `seq 1 10`; do ./target/release/muvm --mem=64 --vram=0 -c 0 -- true; done

real	0m5.049s
user	0m3.135s
sys	0m0.361s

...neat, this.

@sbrivio-rh
Copy link
Contributor

Whee, it comes with --privileged too! \o/

@WhatAmISupposedToPutHere
Copy link
Collaborator Author

It being a tiny bit faster is expected (exec is not free), but is not the reason for those changes.

@slp
Copy link
Collaborator

slp commented Jan 22, 2025

LGTM. I think we can merge this one once @teohhanhui suggestion is addressed.

Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
I keep forgetting this syntax exists, and other maintainers
seem to be fond of it.

Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
@slp
Copy link
Collaborator

slp commented Jan 24, 2025

@teohhanhui do you have any other concerns before merging this one?

Copy link
Collaborator

@teohhanhui teohhanhui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@slp slp merged commit 40230ef into AsahiLinux:main Jan 27, 2025
2 checks passed
let gl_env = env::var("LIBGL_DRIVERS_PATH").ok();

let mut cmd = Command::new(sommelier_path);
cmd.args([
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is only for whoever still doing some testing with it for wayland passthrough ; )

It doesn't matter now since the code here has been long gone, but --enable-linux-dmabuf is missed as it's required since mesa has stripped the legacy wl-drm. For historical reasons, we didn't make it default enabled and later forgot about it. Sorry about that xD

Anyway, nice move here for x11 pasthrough!

@polarathene polarathene mentioned this pull request Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants