Post ApOAP5LITDZvNUouWm by 10leej@fosstodon.org
(DIR) More posts by 10leej@fosstodon.org
(DIR) Post #ApNcjjogImMQFvEzsu by 10leej@fosstodon.org
2024-12-24T19:12:19Z
0 likes, 0 repeats
Who here know KVm virtualization on debian and could lend a bro out here?I have an LSI HBA controller I want to pass to a virtual machine I enable the hardware passthrough via virt manager. anyone have any insights? here;'s the error outputhttps://dpaste.org/sLYBF
(DIR) Post #ApNdUtd5dQTiIiJ1lo by melroy@mastodon.melroy.org
2024-12-24T19:20:48Z
0 likes, 0 repeats
@10leej this is a nice and funny video. https://youtu.be/1iRn-g1m4QE
(DIR) Post #ApNeFUI3fBFRK5gWa8 by raptor85@mastodon.gamedev.place
2024-12-24T19:29:14Z
0 likes, 0 repeats
@10leej I don't know about debian in particular but the "not viable" message generally means something in the IOMMU group you're passing through is still bound to the parent, (kernel is loading it at boot) it's not detached and able to pass through.
(DIR) Post #ApNefEx1JiKTHJ7m0e by 10leej@fosstodon.org
2024-12-24T19:33:55Z
0 likes, 0 repeats
@raptor85 hmm well it's a HBA controller and only has a bunch of sata disks attached to it. Maybe I need to wipe the discs?
(DIR) Post #ApNf2KyH6GCabsizmC by raptor85@mastodon.gamedev.place
2024-12-24T19:38:04Z
0 likes, 0 repeats
@10leej disks shouldn't even be visible to the parent if you're doing passthrough, basically if the parent OS loads the driver and takes control of the device you get this error, I've never done it with a raid controller but I do it with my gpu's, generally the fix is to either blacklist the drivers so they don't take control or compile a kernel/initrd that doesn't even contain support for that hardware.
(DIR) Post #ApNiFcsq75Zbn7D7kO by sandwich@social.archworks.co
2024-12-24T20:14:04Z
0 likes, 0 repeats
@10leej The controller needs to be unmounted or blacklisted first so the Linux Kernel does not load it.Also make sure amd_iommu is on in the kernel parameters.If it still does not work then you may need some other kernel parameters like `vfio-pci.ids=10de:1c02 ` but with the correct pcie id.
(DIR) Post #ApOAP5LITDZvNUouWm by 10leej@fosstodon.org
2024-12-25T01:29:34Z
0 likes, 0 repeats
@sandwich tried blacklisting the driver still errors. So i do some more digging ran this script form the archwikihttps://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#Ensuring_that_the_groups_are_validSeems the HBA controller is in the same group as other devices, that would be why it's spitting these errorshttps://dpaste.org/54Yf4#L46
(DIR) Post #ApOAsa37NknT0lNica by sandwich@social.archworks.co
2024-12-25T01:34:52Z
0 likes, 0 repeats
@10leej Do you have iommu enabled in the bios and the kernel parameter?Otherwhise there is a Kernel patch called acs overwrite for mainboards with shitty iommu splitting.
(DIR) Post #ApOAufYRstVYfI23rk by 10leej@fosstodon.org
2024-12-25T01:35:17Z
0 likes, 0 repeats
@sandwich yes it's enabled in both as far as I can tell.
(DIR) Post #ApOBagxh2iXxBwsVNY by thatayush@fosstodon.org
2024-12-24T23:18:44Z
0 likes, 0 repeats
@sandwich @10leej this. Also make sure you have the correct bios options enabled for pass through!
(DIR) Post #ApOBaiAqXIf6x22WWG by sandwich@social.archworks.co
2024-12-25T01:42:03Z
0 likes, 0 repeats
@thatayush @10leejMoving the card to a different pcie slot might also do the trick. the iommu groups are based on pcie lanes.Otherwhise the workaround patch may be your only option.linux-tkg works great on arch for simple copiling and applying patches, but i am not sure if it can build a package for debian aswell.
(DIR) Post #ApOBajGYTYp4L1ib3Y by 10leej@fosstodon.org
2024-12-25T01:42:47Z
0 likes, 0 repeats
@sandwich @thatayush I personally avoid the tkg group myself siomply because I dont understand what they're doing in many of the patchsets
(DIR) Post #ApOC218w7K5LbNAP5c by sandwich@social.archworks.co
2024-12-25T01:47:47Z
0 likes, 0 repeats
@10leej @thatayush Your graphics card is in a seperate iommu group, so if you dont need to pass-through the gpu you could try to swap them on the mainboard.Regarding linux-tkg you can disable all the changes in the config and just apply the acs overwrite patch only. But maybe there is already a precopiled kernel for debian with that.