pci passthrough not working on linux for plex but working on windows

floppy86

New Member
Oct 31, 2022
3
1
3
Hi,


Proxmox config:

/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"

/etc/modprobe.d/vfio.conf
options vfio-pci ids=8086:1912

/etc/modprobe.d/iommu_unsafe_interrupts.conf
options vfio_iommu_type1 allow_unsafe_interrupts=1

/etc/modules
# Modules required for PCI passthrough
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

# Modules required for Intel GVT
kvmgt
xengt
vfio-mdev

/etc/modprobe.d/kvm.conf
options kvm ignore_msrs=1

lspci -nnv -s 00:02.0
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 530 [8086:1912] (rev 06) (prog-if 00 [VGA controller])
DeviceName: Onboard IGD
Subsystem: Hewlett-Packard Company HD Graphics 530 [103c:8055]
Flags: bus master, fast devsel, latency 0, IRQ 132, IOMMU group 1
Memory at e0000000 (64-bit, non-prefetchable) [size=16M]
Memory at d0000000 (64-bit, prefetchable) [size=256M]
I/O ports at 3000
Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
Capabilities: [40] Vendor Specific Information: Len=0c <?>
Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
Capabilities: [ac] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [d0] Power Management version 2
Capabilities: [100] Process Address Space ID (PASID)
Capabilities: [200] Address Translation Service (ATS)
Capabilities: [300] Page Request Interface (PRI)
Kernel driver in use: vfio-pci
Kernel modules: i915

On Ubuntu Server VM i have the below conf

boot: order=scsi0;ide2;net0
cores: 2
hostpci0: 0000:00:02
ide2: none,media=cdrom
memory: 4096
meta: creation-qemu=7.0.0,ctime=1668419938
name: plex
net0: virtio=8E:B6:D8:52:51:2D,bridge=vmbr0
numa: 0
ostype: l26
scsi0: local:101/vm-101-disk-0.qcow2,size=64G
scsi5: /dev/disk/by-id/wwn-0x50014ee60329f453,backup=0,size=488386584K
scsihw: virtio-scsi-pci
smbios1: uuid=a4c49b86-6441-4193-8c67-314dabe0dd57
sockets: 2
usb0: host=0bc2:ac35,usb3=1
usb1: host=152d:0578,usb3=1
usb2: host=2-5,usb3=1
vmgenid: fde8e359-f4be-4c88-93b7-18a120af04f5

1669059933768.png

passthrough is not working.


I also have a Windows machine where PCI passthrough is working


bios: ovmf
boot: order=ide0;net0
cores: 4
efidisk0: local:102/vm-102-disk-0.qcow2,efitype=4m,pre-enrolled-keys=1,size=528K
hostpci0: 0000:00:02.0
ide0: local:102/vm-102-disk-1.qcow2,size=32G
machine: pc-i440fx-7.1
memory: 8196
meta: creation-qemu=7.1.0,ctime=1669026798
name: win11
net0: e1000=06:77:28:C1:AF:33,bridge=vmbr0,firewall=1
numa: 0
ostype: win11
scsihw: virtio-scsi-single
smbios1: uuid=8c753469-0500-43fe-a2bd-7c323a1c0a40
sockets: 1
tpmstate0: local:102/vm-102-disk-2.raw,size=4M,version=v2.0
vmgenid: d3cc1d10-4b20-468d-8f61-23c45c6f0c2a


Any ideas on how to get it working on ubuntu server ?

note that if i change machine from Default (i440fx) to q35 then the ubuntu server gets stuck.
 
Last edited:
passthrough is not working.
what do you mean 'not working'? what exactly does not work and which errors do you get?

the biggest difference i can see is that the windows vm boots with ovmf (uefi) and the ubuntu one with seabios
 
when I start the ubuntu VM it just gets stuck i see in the pve using dmesg

[Nov21 23:32] device tap103i0 entered promiscuous mode
[ +0.088907] vmbr0: port 3(fwpr103p0) entered blocking state
[ +0.000006] vmbr0: port 3(fwpr103p0) entered disabled state
[ +0.000353] device fwpr103p0 entered promiscuous mode
[ +0.000047] vmbr0: port 3(fwpr103p0) entered blocking state
[ +0.000002] vmbr0: port 3(fwpr103p0) entered forwarding state
[ +0.011071] fwbr103i0: port 1(fwln103i0) entered blocking state
[ +0.000005] fwbr103i0: port 1(fwln103i0) entered disabled state
[ +0.000062] device fwln103i0 entered promiscuous mode
[ +0.000035] fwbr103i0: port 1(fwln103i0) entered blocking state
[ +0.000002] fwbr103i0: port 1(fwln103i0) entered forwarding state
[ +0.010549] fwbr103i0: port 2(tap103i0) entered blocking state
[ +0.000005] fwbr103i0: port 2(tap103i0) entered disabled state
[ +0.000075] fwbr103i0: port 2(tap103i0) entered blocking state
[ +0.000003] fwbr103i0: port 2(tap103i0) entered forwarding state
[ +0.069591] DMAR: DRHD: handling fault status reg 3
[ +0.000008] DMAR: [DMA Write NO_PASID] Request device [00:02.0] fault addr 0x0 [fault reason 0x02] Present bit in context entry is clear
[ +0.681966] vfio-pci 0000:00:02.0: vfio_ecap_init: hiding ecap 0x1b@0x100
[ +11.799642] kvm [1692]: ignored rdmsr: 0x10f data 0x0
[ +0.000012] kvm [1692]: ignored rdmsr: 0x123 data 0x0
[ +0.000005] kvm [1692]: ignored rdmsr: 0xc0011020 data 0x0
[ +0.782420] vfio-pci 0000:00:02.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0xffff
[ +0.632060] DMAR: DRHD: handling fault status reg 2
[ +0.000007] DMAR: [DMA Read NO_PASID] Request device [00:02.0] fault addr 0xca821000 [fault reason 0x05] PTE Write access is not set
[ +0.000018] DMAR: DRHD: handling fault status reg 3
[ +0.000003] DMAR: [DMA Read NO_PASID] Request device [00:02.0] fault addr 0xca821000 [fault reason 0x05] PTE Write access is not set
[ +0.000078] DMAR: DRHD: handling fault status reg 2
[ +0.000003] DMAR: [DMA Read NO_PASID] Request device [00:02.0] fault addr 0xca822000 [fault reason 0x05] PTE Write access is not set
[ +0.000012] DMAR: DRHD: handling fault status reg 3
[ +38.341858] fwbr103i0: port 2(tap103i0) entered disabled state
[ +0.034716] fwbr103i0: port 1(fwln103i0) entered disabled state
[ +0.000074] vmbr0: port 3(fwpr103p0) entered disabled state
[ +0.000141] device fwln103i0 left promiscuous mode
[ +0.000002] fwbr103i0: port 1(fwln103i0) entered disabled state
[ +0.024316] device fwpr103p0 left promiscuous mode
[ +0.000002] vmbr0: port 3(fwpr103p0) entered disabled state
[ +0.340201] dmar_fault: 41 callbacks suppressed
[ +0.000003] DMAR: DRHD: handling fault status reg 2
[ +0.000006] DMAR: [DMA Write NO_PASID] Request device [00:02.0] fault addr 0x0 [fault reason 0x02] Present bit in context entry is clear
[ +0.085019] DMAR: DRHD: handling fault status reg 2
[ +0.000008] DMAR: [DMA Write NO_PASID] Request device [00:02.0] fault addr 0x0 [fault reason 0x02] Present bit in context entry is clear