PCI passthrough Error code 43

tsadigov

Member
Nov 27, 2021
11
0
6
38
Hello
I have been trying to set up passthrough to my Windows guest. I tried following different tutorials. Overcame several issues. I feel I am almost there. But also I feel almost like quitting.
Installed latest driver on windows guest and it gives error 43 for the device.
I am at a point where I aimlessly change random parameters.

My setup : I have Ryzen 3900x + Nvidia 1070

Code:
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off'
balloon: 2048
bios: ovmf
boot: order=ide0;ide2;net0
cores: 6
cpu: host,hidden=1,flags=+pcid
efidisk0: local-lvm:vm-132-disk-0,size=4M
hostpci0: 0000:0b:00,pcie=1,x-vga=1
ide0: d500:132/vm-132-disk-0.qcow2,cache=writeback,size=64G,ssd=1
ide2: disk1:iso/ru-en_windows_10_1909_x86-x64_28in1_HWID-act.iso,media=cdrom
machine: pc-q35-3.1
memory: 20480
name: windows10.2
net0: e1000=E2:9B:1C:6A:F3:A3,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
scsihw: virtio-scsi-pci
smbios1: uuid=7c47c8f8-0cfb-41c5-a288-b288fb769f79
sockets: 1
vga: none
vmgenid: 08802d18-a9b5-4948-acfe-dc4d529d124c
 
You don't need -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off' because you are already using x-vga=1.
You don't need balloon: 2048 because ballooning cannot work because memory needs to be pinned because of PCI passthrough.
Don't forget to install VirtIO drivers for Windows later, because e1000 and IDE is very slow and does not support trim.

Have you tried adding video=efifb:off video=vesafb:off (separate) if this is the only GPU in the system? Did you bind the GPU early to vfio-pci using vfio-pci.ids= (or in /etc/modprobe.d/)? You will not see boot messages when you use those options, so please make sure you can access the system remotely.
 
  • Like
Reactions: tsadigov
You don't need -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off' because you are already using x-vga=1.
You don't need balloon: 2048 because ballooning cannot work because memory needs to be pinned because of PCI passthrough.
Don't forget to install VirtIO drivers for Windows later, because e1000 and IDE is very slow and does not support trim.

Have you tried adding video=efifb:off video=vesafb:off (separate) if this is the only GPU in the system? Did you bind the GPU early to vfio-pci using vfio-pci.ids= (or in /etc/modprobe.d/)? You will not see boot messages when you use those options, so please make sure you can access the system remotely.
thanks for reply

I already have settings for grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt pcie_acs_override=downstream,multifunction nofb nomodeset video=vesafb:eek:ff video=efifb:eek:ff"

I already have /etc/modprobe.d/vfio.conf
options vfio-pci ids=10de:1b81,10de:10f0 disable_vga=1

As you suggested I removed
Code:
-cpu 'host,+kvm
and it caused this message when starting VM
kvm: warning: host doesn't support requested feature: CPUID.01H:ECX.pcid [bit 17]
kvm: warning: host doesn't support requested feature: CPUID.01H:ECX.pcid [bit 17]
kvm: warning: host doesn't support requested feature: CPUID.01H:ECX.pcid [bit 17]

I also removed ballooning option,

The interesting thing, inspite of me getting the above message when starting VM, unbelievable thing happened. My monitor attached to the GPU shows guest VM login screen. I checked, error 43 is gone.

That is a result of having option to ask someone knowledgable.

Thanks a lot.
 
I know for sure that you do not need amd_iommu=on and most likely don't need nofb nomodeset. Probably the iommu=pt does not make a performance difference (for the host devices which are not passed through) and has nothing to do with PCI passthrough. Please check if you really need pcie_acs_override=downstream,multifunction, because it comes with potential security issues as it breaks IOMMU device isolation.

But other than those little things: I'm glad to hear you got it working!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!