-
-
Notifications
You must be signed in to change notification settings - Fork 50
Fix miscellaneous small annoyances #192
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
Conversation
16e8dbd to
c24343b
Compare
slp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @valpackett
| eprintln!("Error setting up Box in binfmt_misc: {err}"); | ||
| eprintln!("No emulators were configured, x86 emulation may not work"); | ||
| } else { | ||
| #[cfg(target_arch = "aarch64")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably also kill x11 forwarding in this case, it is aarch64 only. (Or fix it to work on x86 too, shouldn't be that hard)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, what's broken about it? I'll test it..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/AsahiLinux/muvm/blob/main/crates/muvm/src/guest/bridge/x11.rs#L640 - the entirety of RemoteCaller is aarch64 specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, should do something like this: https://gist.github.com/WhatAmISupposedToPutHere/3b51d4266ca5d7b75f0571adafba031a
(build tested on x86 only, may or may not work)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this line, it should force it to use the ptrace method: https://github.com/AsahiLinux/muvm/blob/main/crates/muvm/src/guest/x11.rs#L24
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, now I do see my debug prints!
SYSC [9]
[user_regs_struct { r15: 657918200, r14: 0, r13: 0, r12: 140733902978120, rbp: 140733902978080, rbx: 657918176, r11: 582, r10: 17, r9: 0, r8: 9, rax: 9, rcx: 140671840240701, rdx: 3, rsi: 4096, rdi: 140671841247232, orig_rax: 7, rip: 140671848946042, cs: 51, eflags: 582, rsp: 140733902978048, ss: 43, fs_base: 140671842342720, gs_base: 0, ds: 0, es: 0, fs: 0, gs: 0 }]
SYSC [140671841247232]
[user_regs_struct { r15: 657918200, r14: 0, r13: 0, r12: 140733902978120, rbp: 140733902978080, rbx: 657918176, r11: 582, r10: 0, r9: 0, r8: 0, rax: 11, rcx: 140671840240701, rdx: 0, rsi: 4096, rdi: 140671783059456, orig_rax: 7, rip: 140671848946042, cs: 51, eflags: 582, rsp: 140733902978048, ss: 43, fs_base: 140671842342720, gs_base: 0, ds: 0, es: 0, fs: 0, gs: 0 }]
SYSC [0]
during initialization/resizing of GPU programs, and it still works fine \o/
0d42346 to
274cb52
Compare
|
Hi folks! Sorry for budging in, especially if this may be the incorrect place to raise this issue. I thought I would leave a comment in case it is helpful. I was testing this patch on an
The good news is that the muvm boots up perfectly and can detect the virtio_gpu device. However, when I tried running Basically, it works and the screen shows up, but the driver produces a failure message. The performance is also far lower than the GPU capabilities and the performance I get on Asahi Fedora; the system is using software rendering (irrespective of whether I select "venus" or "drm" as GPU is my guess). I have not had the time to fully test what is going on, but I will try to do so over the weekend. |
|
@adilahmad17 what version of Mesa are you using in the vm? Your Mesa should be compiled with the Venus doesn't provide OpenGL by itself so |
|
Thanks a bunch, @valpackett! Mesa was indeed the issue; I was running the latest at this time on Arch I recompiled the (Note for anyone following the above, check this gist to ensure your application inside the VM is using the custom mesa) I now see the correct glxinfo; previous one was indeed software all around ( Performance is also much closer to native with I also tested Venus ( I was unable to get glxgears working with the override flag. This seems to also be some mesa driver issues (perhaps with my compilation options). Happy to do more testing or write-up a short README based on all the steps I followed. muvm has lots of cool use-cases and the x86_64 support will be very valuable. Thanks for this PR! |
|
LGTM. Any concerns @teohhanhui and @WhatAmISupposedToPutHere ? |
274cb52 to
39a1ac2
Compare
|
@valpackett please address the clippy issue so we can merge this one. Thanks! |
ebfae7d to
5acf2a3
Compare
|
done! |
|
@teohhanhui I see you requested changes to this PR, could you please take another look? |
5acf2a3 to
1d66b58
Compare
|
Is this one ready for another review? |
1d66b58 to
a10f0e4
Compare
|
Sorry, hadn't noticed the last @teohhanhui review until your comment @slp. Now did the |
a10f0e4 to
a6e2b89
Compare
|
Applied all the string changes. |
|
@teohhanhui do you thing this one is ready for merging? |
This is particularly useful for Nix, to avoid patching code when building. Signed-off-by: Val Packett <val@invisiblethingslab.com>
Signed-off-by: Val Packett <val@invisiblethingslab.com>
And use it for MUVM_UDEVD_PATH Signed-off-by: Val Packett <val@invisiblethingslab.com>
a6e2b89 to
58cecdf
Compare
|
Applied all suggestions and rebased |
|
@teohhanhui PTAAL. |
|
I've tested this on my hardware with the amdgpu driver, works great! |
To remove the need for a sysctl binary. Signed-off-by: Val Packett <val@invisiblethingslab.com>
Signed-off-by: Val Packett <val@invisiblethingslab.com>
Signed-off-by: Val Packett <val@invisiblethingslab.com>
Signed-off-by: Val Packett <val@invisiblethingslab.com>
Running x86_64 emulators on x86_64 is not typically desired, so only try initializing them without flags on aarch64. While here, let's call Box64 Box64 and not Box. Signed-off-by: Val Packett <val@invisiblethingslab.com>
58cecdf to
4ac27cb
Compare

while using muvm for other use cases. See commit messages.