-
Notifications
You must be signed in to change notification settings - Fork 48
Kerner parameter "vfio-pci.ids" is ignored. #20
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
Comments
I am not quite understand the nature of this problem. Could you please provide more information what exactly the issue is, how to reproduce it and why/how this parameter should be handled by booster? |
I believe I have the same problem, so hopefully I can describe it better. The kernel command line option vfio-pci.ids doesnt seem to work with booster images, while the same command line option works with a dracut image. Normally it would assign the vfio-pci driver to the devices you specify, and thats how the same boot entry works when pointed to a dracut image. My best guess would probably be some timing issue, perhaps the nvidia driver is getting loaded before this option can do its thing? |
Booster does not do anythong with this parameter. It just passed over to linux kernel. I am looking at dracut project and do not see any mention of it https://github.com/dracutdevs/dracut/search?q=vfio-pci.ids I only see it in the linux kernel here https://github.com/torvalds/linux/blob/719bbd4a509f403f537adcaefd8ce17532be2e84/drivers/vfio/pci/vfio_pci.c#L39 So the loadable kernel module |
modules: vfio_pci,vfio,vfio_iommu_type1,vfio_virqfd This is whats inside my booster.yaml, I see the modules inside of the initramfs if I use lsinitrd, running booster debug, I can't seem to find where its logging stuff to, I dont see anything about it inside of journalctl for that boot. |
https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Loading_vfio-pci_early Here is how things would normally be done on mkinitcpio/dracut for reference |
@GabTheBab to enable log add thanks for the link. The equivalent of if for booster would be the modules like you specified. The only question I have here whether the kernel autoload it (using modalias) or booster has to force these modules loading. The force loading does not work yet but I can come up with a quick proof-of-concept if you are willing to test it. |
I do have booster.debug=1 set in my systemd boot entry, and I'm definitely willing to do some testing if needed. The text during the boot process sadly doesn't stay on screen long enough for me to read it, is there any place i could see the debug info after boot? |
It is currently not, but I filed #60 to investigate it |
Please try this branch https://github.com/anatol/booster/tree/force_modules_loading it adds a new booster.yaml config option |
Built commit c1a3246, added the new setting to booster.yaml and regenerated the initramfs, sadly still seems to load the nvidia driver rather than vfio-pci. |
modules: vfio_pci,vfio,vfio_iommu_type1,vfio_virqfd my full booster.yaml |
It turns out that there was a circular dependencies between
that booster did not handle correctly. I added a quick fix for this issue and now I see booster loads these modules at the boot time. I pushed it to WRT your config
|
force_modules_loading or modules_force_load? |
Sorry for the confusion, it is |
Built d620be6, config is just |
Once you booted what is the output of your |
|
|
The list of loaded modules is correct. The command line parameter is also in place. I quickly looked at the mkinitcpio and dracut and I do not see any special about As a last attempt to solve this problem I pushed one more update to |
Sadly it still is loading the nvidia driver on commit 52144a5. |
Unfortunately I am out of ideas what happens here. If anyone has better understanding how vfio binding suppose to work please share your thoughts. |
Some configurations require loading additional modules at the boot time. modules_force_load gives such opportunity. Any module added to modules_force_load implicitly added to the image as well. Issue #20
I merged |
Some configurations require loading additional modules at the boot time. modules_force_load gives such opportunity. Any module added to modules_force_load implicitly added to the image as well. Issue #20
I just added support for saving booster logs into It worth enabling this feature to get more information about what is going on at the boot time. |
|
Could you please make sure to add
From what I read above nvidia driver should not be loaded at all. But here you say you expect nvidia is loaded before vfio? What is the expected behavior? |
The expected behavior is the nvidia driver to not load, however the nvidia driver ends up loading after the messages I sent above. |
@GabTheBab per your log.txt booster boots fine, loads vfio drivers, switches to the host userspace. nvidia driver is loaded in the userspace. I compared your vfio output with this one https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Verifying_that_the_configuration_worked and do not see following logs
After reading kmod code I found that kernel does not use cmdline params for loadable modules. It was surprising for me. Instead it is expected that userspace handles cmdline parsing and provides required module params explicitly. Here is a quick check to verify this hypothesis. @GabTheBab could you please compile and try following branch to see if it makes any difference for you. And if it does not please provide the dmesg logs. https://github.com/anatol/booster/tree/issue-20-quick-check |
That looks to have done it, vfio-pci is loaded and attached to the gpu. |
Yay! It is great to hear the problem is solved. I will work on #74 and provide a clean solution for your issue. |
Thanks for working on this issue, looking forward to the final solution in master |
Done. It is part of |
Working on master now |
This feature got released as part of booster-0.4 now in the stable repository. I updated the wiki page with booster instructions https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#booster |
With vfio-pci.ids=1002:67df,1002:aaf0 secondary GPU should not be activated.
The text was updated successfully, but these errors were encountered: