You are not logged in.

#1 2024-07-15 07:04:18

zerikan287
Member
Registered: 2024-07-15
Posts: 5

[SOLVED] vfio-pci to initramfs mandatory when doing PCI passthrough?

Is there someone who actually has configuration where just using "softdep" with modprobe.d works? (without adding the vfio-pci modules to initramfs)

I have done GPU passthrough multiple times with different hardware (mostly AMD) since the wiki was edited to contain the modprobe.d section and it always required me to add the modules to initramfs so at this point I'm just curious if it's mostly Nvidia thing or just mistake in the wiki.

Last edited by zerikan287 (2024-08-02 20:22:23)

Offline

#2 2024-08-02 10:38:07

EdeWolf
Member
Registered: 2016-01-06
Posts: 85

Re: [SOLVED] vfio-pci to initramfs mandatory when doing PCI passthrough?

I am not sure, what you mean by softdep, and I am not passing through graphic cards, just ordinary pci-e cards, but I do not need to add vfio-pci to initramfs. It does get loaded automatically during boot, which is late enough for my use cases. Wether this helps, I of course do not know.

Offline

#3 2024-08-02 15:11:57

seth
Member
Registered: 2012-09-03
Posts: 58,052

Re: [SOLVED] vfio-pci to initramfs mandatory when doing PCI passthrough?

See the linked wiki, @zerikan287, do you happen to have the GPU drivers in the initrc (eg. through the kms hook)?
Because then they get loaded w/ the initramfs and you'll need vfio-pci there as well to prevent that.

Offline

#4 2024-08-02 18:07:21

zerikan287
Member
Registered: 2024-07-15
Posts: 5

Re: [SOLVED] vfio-pci to initramfs mandatory when doing PCI passthrough?

I already forgot the details but I remember that there are Intel and AMD drivers (I have intel igpu) in the initramfs and I think they are added by the autodetect or kms hook (don't remember).
There was attempt to load vifo-pci before amdgpu but since it wasn't in the initramfs nothing happened.
That leads me to believe this method is not gonna work for GPUs?

Offline

#5 2024-08-02 18:49:06

cryptearth
Member
Registered: 2024-02-03
Posts: 884

Re: [SOLVED] vfio-pci to initramfs mandatory when doing PCI passthrough?

the wiki mentions the gpu-passthrough-manager - and I gave it a try on fhe last topic about kvm device passthrough
I don't know what it did becauses I just wanted it to be quick - but in the end it worked without issues
so maybe check your bios once again (you have to have virtualization and iommu enable) and give it a try

Offline

#6 2024-08-02 19:07:58

zerikan287
Member
Registered: 2024-07-15
Posts: 5

Re: [SOLVED] vfio-pci to initramfs mandatory when doing PCI passthrough?

I got it working by adding vifo-pci to initramfs, I was just wondering if the wiki is wrong in the modprobe.d section which says you don't need vifo-pci in initramfs.

Last edited by zerikan287 (2024-08-02 19:09:52)

Offline

#7 2024-08-02 19:57:43

seth
Member
Registered: 2012-09-03
Posts: 58,052

Re: [SOLVED] vfio-pci to initramfs mandatory when doing PCI passthrough?

I already forgot the details

sudo lsinitcpio /boot/initramfs-linux*.img| grep gpu

That leads me to believe this method is not gonna work for GPUs?

It doesn't work for anything you put into the initramfs, it cannot. The driver in the initramfs gets to the device first and you cannot prefer the vfio driver as it's not available in this context (unless you also put it into the initramfs)

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#8 2024-08-02 20:20:09

zerikan287
Member
Registered: 2024-07-15
Posts: 5

Re: [SOLVED] vfio-pci to initramfs mandatory when doing PCI passthrough?

...
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/amd/
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/amd/amdgpu/
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko.zst
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/amd/amdxcp/
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/amd/amdxcp/amdxcp.ko.zst
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/display/
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/display/drm_display_helper.ko.zst
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/drm_buddy.ko.zst
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/drm_exec.ko.zst
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/drm_suballoc_helper.ko.zst
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/drm_ttm_helper.ko.zst
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/i915/
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/i915/i915.ko.zst
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/scheduler/
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/scheduler/gpu-sched.ko.zst
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/ttm/
usr/lib/modules/6.6.42-1-lts/kernel/drivers/gpu/drm/ttm/ttm.ko.zst
etc/modprobe.d/amdgpu.conf 
...

Seems to be the case, I'm gonna try to edit the wiki to make it more clear.
Thanks for the help guys, marking as solved now.

Offline

Board footer

Powered by FluxBB