Skip to content
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

VFIO setup wont work (in ujust) #2121

Closed
Split7fire opened this issue Jan 8, 2025 · 12 comments · Fixed by #2140
Closed

VFIO setup wont work (in ujust) #2121

Split7fire opened this issue Jan 8, 2025 · 12 comments · Fixed by #2140
Labels
bug Something isn't working

Comments

@Split7fire
Copy link

Describe the bug

Long story short:
ujust setup-vfio wont work until you manually append "kvm.report_ignored_msrs" to kargs. By default Bluefin-dx-nvidia have no such a karg, so this line of code never execute

if [[ ${VIRT_TEST} == *kvm.report_ignored_msrs* ]]; then

What did you expect to happen?

I expected ujust to just append needed modules to karg.

Output of bootc status

Current staged state is native ostree
Current booted state is native ostree
Current rollback state is native ostree

Output of groups

vlad wheel docker lxd incus-admin libvirt

Extra information or context

No response

@dosubot dosubot bot added the bug Something isn't working label Jan 8, 2025
@ledif
Copy link
Contributor

ledif commented Jan 11, 2025

Thanks for the report. This should be fixed with #2140.

@Split7fire
Copy link
Author

Thanks for the report. This should be fixed with #2140.

Thanks, but I noticed one another bug: I can't use kvmfr0 (from lookinglass). because my user have no privilege to read /dev/kvmfr0.
Any advice?

@ledif
Copy link
Contributor

ledif commented Jan 11, 2025

Did you run ujust configure-vfio and select the "Enable kvmfr module" option? That should have run the /usr/libexec/bluefin-dx-kvmfr-setup script for you that should set the correct permissions and SELabels for /dev/kvmfr0.

What is the output of ls -l /dev/kvmfr0?

@Split7fire
Copy link
Author

Split7fire commented Jan 11, 2025

Did you run ujust configure-vfio and select the "Enable kvmfr module" option? That should have run the /usr/libexec/bluefin-dx-kvmfr-setup script for you that should set the correct permissions and SELabels for /dev/kvmfr0.

What is the output of ls -l /dev/kvmfr0?

Yeah, sure. It fails at last line:

rpm-ostree initramfs --enable

It fails with initramfs already enabled or something like that.
But everything before it went fine. Open new issue for that?

@ledif
Copy link
Contributor

ledif commented Jan 11, 2025

The initramfs already enabled message isn't really an error -- more of a notice. If everything else worked fine, then it can be ignored in my opinion.

@Split7fire
Copy link
Author

Split7fire commented Jan 12, 2025

The initramfs already enabled message isn't really an error -- more of a notice. If everything else worked fine, then it can be ignored in my opinion.

Yeah, agreed. But

I can't use kvmfr0 (from lookinglass). because my user have no privilege to read /dev/kvmfr0.

still persist

@m2Giles
Copy link
Member

m2Giles commented Jan 12, 2025

Did you enable kvmfr as well? The script should setup your user as owner with a udev rule and setup the SELinux requirements.

What is the output ls -lZ /dev/kvmfr0?

@Split7fire
Copy link
Author

Did you enable kvmfr as well? The script should setup your user as owner with a udev rule and setup the SELinux requirements.

Yes, sure.

What is the output ls -lZ /dev/kvmfr0?

crw-rw----. 1 root qemu system_u:object_r:device_t:s0 239, 0 янв 12 09:51 /dev/kvmfr0

@m2Giles
Copy link
Member

m2Giles commented Jan 12, 2025

Edit the rule in /etc/udev/rules.d

Change where it says root to your username.

@Split7fire
Copy link
Author

Edit the rule in /etc/udev/rules.d

Change where it says root to your username.

Ok, it considered as workaround? Will it survive updates?

@m2Giles
Copy link
Member

m2Giles commented Jan 12, 2025

Yes, it will not be wiped in an update.

The script created the file with user as root and not your username.

@Split7fire
Copy link
Author

Yes, it will not be wiped in an update.

The script created the file with user as root and not your username.

So, it is expected behavior?

Edit the rule in /etc/udev/rules.d

Change where it says root to your username.

Now looking glass working, thanks for assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants