I’m new to this Forum so please be gentle
So what’s the Problem here? I followed the “Wendells” Guide VFIO in 2019 using PopOS 18.04 and everything seems to fit until I reach the Point of starting my VM after the GPU is attached. At first it starts with no Output on the second Monitor, after I stop the VM (forced shutdown due to no VGA Output) the Virtual Machine Manager throws in “Unknown PCI header type ‘127’”. This can only be solved by restarting the Host. But the Problem of no Output remains. The NVIDIA GPU (Gainward 960GTX Phantom 4GB) is claimed by “vfio-pci” and only the second GPU (a very old HD3450) is used by GNOME. The NVIDIA GPU and it’s Audio Device are in the only Devices that are in IOMMU Group 15, so that seems also to work.
Just wanted to express my gratitude Here. Thanks to the PCI patch and recompiling the kernel, the GPU passthrough works Luke charm. OBS running with NVEnc in VM. Now I need to passthrough the USB controller in order to get more performance with the avermedia lgp lite… Again thank you both for helping me out…
ASRock has recently released a new BIOS v3.40 vs. the BIOS you mention that is v3.31, it purportedly only improves Matisse support, but may be worth a shot.
Your motherboard also has some AGESA updates that may help if you haven’t already tried updating your BIOS? Also be careful with kernel 5.1.1x as there was some regression regarding VFIO if memory serves me correctly. I would also recommend 5.2 in the interim.
I believe there are some new merges for the 5.3 kernel specifically relating to VirtIO-PMEM and VirtIO-IOMMU drivers.
I tried applying this patch when compiling a centos 7 kernel but i get errors in connection with virt.patch; the patch that I am attempting to apply (“1 out of 4 hunks FAILED - saving rejects to file drivers/pci/pci.c.rej”). This is my first kernel compilation attempt and I am way out of my depth. I followed the guide at https://wiki.centos.org/HowTos/Custom_Kernel#head-72952b3465e2fc1d84e08512448aa60c7a2e6ec2 and https://wiki.centos.org/HowTos/I_need_the_Kernel_Source. Does this have something to do with the fact that this patch is meant for Fedora kernel? Any suggestions?
[user0@localhost pci]$ cat pci.c.rej
“— drivers/pci/pci.c
+++ drivers/pci/pci.c
@@ -1382,15 +1385,7 @@
pci_restore_config_space_range(pdev, 4, 9, 10, false);
pci_restore_config_space_range(pdev, 0, 3, 0, false);
} else if (pdev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
- pci_restore_config_space_range(pdev, 12, 15, 0, false);
-
- /*
- * Force rewriting of prefetch registers to avoid S3 resume
- * issues on Intel PCI bridges that occur when these
- * registers are not explicitly written.
- */
- pci_restore_config_space_range(pdev, 9, 11, 0, true);
- pci_restore_config_space_range(pdev, 0, 8, 0, false);
+ pci_restore_config_space_range(pdev, 0, 15, 0, true);
} else {
pci_restore_config_space_range(pdev, 0, 15, 0, false);
}”
[user0@localhost SPECS]$ cat build-out.log
Building target platforms: x86_64
Building for target x86_64
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.hnniRh
Patch40000: virt.patch
1 out of 4 hunks FAILED – saving rejects to file drivers/pci/pci.c.rej
[user0@localhost SPECS]$ cat build-err.log
"
+ umask 022
+ cd /home/user0/rpmbuild/BUILD
+ patch_command=‘patch -p1 -F1 -s’
+ cd /home/user0/rpmbuild/BUILD
+ rm -rf kernel-3.10.0-1062.1.1.el7
+ /usr/bin/mkdir -p kernel-3.10.0-1062.1.1.el7
+ cd kernel-3.10.0-1062.1.1.el7
+ /usr/bin/xz -dc /home/user0/rpmbuild/SOURCES/linux-3.10.0-1062.1.1.el7.tar.xz
+ /usr/bin/tar -xf -
+ STATUS=0
+ ‘[’ 0 -ne 0 ‘]’
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ mv linux-3.10.0-1062.1.1.el7 linux-3.10.0-1062.1.1.el7.centos7virtpatch09282019.x86_64
+ cd linux-3.10.0-1062.1.1.el7.centos7virtpatch09282019.x86_64
+ cp /home/user0/rpmbuild/SOURCES/kernel-3.10.0-ppc64-debug.config /home/user0/rpmbuild/SOURCES/kernel-3.10.0-ppc64.config /home/user0/rpmbuild/SOURCES/kernel-3.10.0-ppc64le-debug.config /home/user0/rpmbuild/SOURCES/kernel-3.10.0-ppc64le.config /home/user0/rpmbuild/SOURCES/kernel-3.10.0-s390x-debug.config /home/user0/rpmbuild/SOURCES/kernel-3.10.0-s390x-kdump.config /home/user0/rpmbuild/SOURCES/kernel-3.10.0-s390x.config /home/user0/rpmbuild/SOURCES/kernel-3.10.0-x86_64-debug.config /home/user0/rpmbuild/SOURCES/kernel-3.10.0-x86_64.config .
+ ApplyOptionalPatch virt.patch
+ local patch=virt.patch
+ shift
+ ‘[’ ‘!’ -f /home/user0/rpmbuild/SOURCES/virt.patch ‘]’
++ wc -l /home/user0/rpmbuild/SOURCES/virt.patch
++ awk ‘{print $1}’
+ local C=49
+ ‘[’ 49 -gt 9 ‘]’
+ ApplyPatch virt.patch
+ local patch=virt.patch
+ shift
+ ‘[’ ‘!’ -f /home/user0/rpmbuild/SOURCES/virt.patch ‘]’
+ case “$patch” in
+ patch -p1 -F1 -s
error: Bad exit status from /var/tmp/rpm-tmp.hnniRh (%prep)
Bad exit status from /var/tmp/rpm-tmp.hnniRh (%prep)"
Not too sure on compiling the kernel on CentOS, but i have compiled this patch with Arch, Ubuntu and Debian and had no issues. I will make a VM and see if i can compile this and ill let you know the result
Thanks a million. If there is anything that I can do, I’m glad to pitch in. It be a great learning experience for me so let me know if you want me to try something.