Recently, my working GPU passthrough configuration broke almost completely. I have a Windows 10 VM used for passthrough, with a very simple config including a single entry to pass all GPU functions through and the CPU set to "host". For almost a year, this configuration has been working fine, with the GTX 1660 Super I passed through working perfectly fine, no Code 43 or anything. However, after some updates, this is no longer the case. There are two issues that have come up.
First, the VM would bootloop with a KERNEL_SECURITY_CHECK_FAILURE BSoD, which I solved by setting the -ibpb flag on the CPU. The CPU is a Ryzen 3600, and by booting into an older kernel, I discovered that a kernel update between 5.4.78-2-pve (what I had before) and 5.4.98-1-pve (what I have now) introduced the issue. This appears to only be an issue with the "host" CPU model, as a separate Windows server VM with "kvm64" was perfectly fine.
The bigger not-yet-solved issue is that there appears to now be a strange GPU reset bug, despite this being an Nvidia setup. I know that it's fairly common to experience such bugs on AMD graphics, but I haven't heard of issues with Nvidia besides consistent Code 43s, and the symptoms seem to be of a reset bug. I don't believe the issue has anything to do with the kernel update, because the bug is reproducible on both versions mentioned in the previous paragraph. No matter what I do (I've tried adding "args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off'" and setting "cpu: host,hidden=1,flags=-ibpb", as well as trying and failing to dump the ROM, so instead using a TechPowerUp ROM passed through), the VM can only start once after the system boots, any attempts to shut it down and then restart it will result in a Code 43 in the guest. If I want to reboot the guest and continue using it, I have to reboot the host.
pveversion information:
lscpu output:
lspci output:
First, the VM would bootloop with a KERNEL_SECURITY_CHECK_FAILURE BSoD, which I solved by setting the -ibpb flag on the CPU. The CPU is a Ryzen 3600, and by booting into an older kernel, I discovered that a kernel update between 5.4.78-2-pve (what I had before) and 5.4.98-1-pve (what I have now) introduced the issue. This appears to only be an issue with the "host" CPU model, as a separate Windows server VM with "kvm64" was perfectly fine.
The bigger not-yet-solved issue is that there appears to now be a strange GPU reset bug, despite this being an Nvidia setup. I know that it's fairly common to experience such bugs on AMD graphics, but I haven't heard of issues with Nvidia besides consistent Code 43s, and the symptoms seem to be of a reset bug. I don't believe the issue has anything to do with the kernel update, because the bug is reproducible on both versions mentioned in the previous paragraph. No matter what I do (I've tried adding "args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off'" and setting "cpu: host,hidden=1,flags=-ibpb", as well as trying and failing to dump the ROM, so instead using a TechPowerUp ROM passed through), the VM can only start once after the system boots, any attempts to shut it down and then restart it will result in a Code 43 in the guest. If I want to reboot the guest and continue using it, I have to reboot the host.
pveversion information:
Code:
proxmox-ve: 6.3-1 (running kernel: 5.4.98-1-pve)
pve-manager: 6.3-4 (running version: 6.3-4/0a38c56f)
pve-kernel-5.4: 6.3-6
pve-kernel-helper: 6.3-6
pve-kernel-5.3: 6.1-6
pve-kernel-5.4.101-1-pve: 5.4.101-1
pve-kernel-5.4.98-1-pve: 5.4.98-1
pve-kernel-5.3.18-3-pve: 5.3.18-3
pve-kernel-5.3.18-2-pve: 5.3.18-2
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.1.0-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: 0.8.35+pve1
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.20-pve1
libproxmox-acme-perl: 1.0.7
libproxmox-backup-qemu0: 1.0.3-1
libpve-access-control: 6.1-3
libpve-apiclient-perl: 3.1-3
libpve-common-perl: 6.3-4
libpve-guest-common-perl: 3.1-5
libpve-http-server-perl: 3.1-1
libpve-storage-perl: 6.3-7
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.6-2
lxcfs: 4.0.6-pve1
novnc-pve: 1.1.0-1
proxmox-backup-client: 1.0.8-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.4-5
pve-cluster: 6.2-1
pve-container: 3.3-4
pve-docs: 6.3-1
pve-edk2-firmware: 2.20200531-1
pve-firewall: 4.1-3
pve-firmware: 3.2-2
pve-ha-manager: 3.1-1
pve-i18n: 2.2-2
pve-qemu-kvm: 5.2.0-2
pve-xtermjs: 4.7.0-3
qemu-server: 6.3-5
smartmontools: 7.1-pve2
spiceterm: 3.1-1
vncterm: 1.6-2
zfsutils-linux: 2.0.3-pve2
lscpu output:
Code:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 43 bits physical, 48 bits virtual
CPU(s): 12
On-line CPU(s) list: 0-11
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 1
NUMA node(s): 1
Vendor ID: AuthenticAMD
CPU family: 23
Model: 113
Model name: AMD Ryzen 5 3600 6-Core Processor
Stepping: 0
CPU MHz: 4044.844
CPU max MHz: 3600.0000
CPU min MHz: 2200.0000
BogoMIPS: 7200.12
Virtualization: AMD-V
L1d cache: 32K
L1i cache: 32K
L2 cache: 512K
L3 cache: 16384K
NUMA node0 CPU(s): 0-11
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good n
opl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a mis
alignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate sme ssbd mba sev ibpb stibp vmmcall fsgsbase bmi1 avx2 sme
p bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr wbnoinvd arat npt lbrv svm_l
ock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif umip rdpid overflow_recov succor smca
lspci output:
Code:
0b:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:21c4] (rev a1)
Subsystem: Gigabyte Technology Co., Ltd Device [1458:4013]
Kernel driver in use: vfio-pci
Kernel modules: nvidiafb, nouveau
0b:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:1aeb] (rev a1)
Subsystem: Gigabyte Technology Co., Ltd Device [1458:4013]
Kernel driver in use: vfio-pci
Kernel modules: snd_hda_intel
0b:00.2 USB controller [0c03]: NVIDIA Corporation Device [10de:1aec] (rev a1)
Subsystem: Gigabyte Technology Co., Ltd Device [1458:4013]
Kernel driver in use: vfio-pci
Kernel modules: xhci_pci
0b:00.3 Serial bus controller [0c80]: NVIDIA Corporation Device [10de:1aed] (rev a1)
Subsystem: Gigabyte Technology Co., Ltd Device [1458:4013]
Kernel driver in use: vfio-pci
Kernel modules: i2c_nvidia_gpu