[Fixed] Intel Arc B580: PCIe Passthrough Issues

Hello everyone,

just got the Intel Arc B580 installed and keep having issues with getting the Intel driver to work under Windows 11 inside a VM.
It throws error code 43.

What works is booting “bare-metal” without QEMU/KVM.
Also I managed to get it work once in the VM, but could not figure out why.
After a reboot it stopped working. Lol.

My setup is roughly as follows:

  • Gigabyte X570 AORUS PRO
    • ReBAR: Yes
    • AMD-V: Yes
  • AMD Ryzen 7 3700X
  • GPU 1: Intel Arc B580
  • GPU 2 (Primary): Radeon RX 550 640SP / RX 560/560X
  • Fedora 41 (all updates installed up to now)
  • libvirtd
  • Boot from PCIe NVMe drive reserved for Windows (also passed through)
  • Video: None
  • Looking Glass

Configured as usual for PCIe Passthrough:

  • Load vfio-pci at initrd with IDs from B580
  • softdeps for xe driver to first load vfio-pci (also tried without)
  • Rebuilt all initrds with dracut (–force)

Used to work fine with NVIDIA GeForce GTX 1060.

Any ideas :/?

Since it works when booting bare metal I guess its more of some driver ↔ VM incompatibility?

1 Like

Intel Driver version: 32.0.101.6332_101.6253 from 26/12/2024.

Fixed by upgrading qemu package version to 9.2.0 from rawhide.
Stumbled upon this issue Xe probe fails when device (B580) attached to Qemu virtual machine with 16G BAR size (#3892) · Issues · drm / xe / xe kernel driver · GitLab which got me on the right track.

4 Likes

This appears to be a general issue with 6.12+ and QEMU <= 9.1.x, also affecting AMD GPUs.
The vfio-pci-core driver can now map 2M and 1G pages for PCIe BARs, and from what I understand, only QEMU 9.2.0 aligns the mmap calls properly for that to work consistently.

https://lore.kernel.org/regressions/20241222223604.GA3735586@bhelgaas/

(This is fixed since Kernel 6.12.9 and 6.13; QEMU 9.2.0+ will still produce a better alignment and need less pages)

I’m having issues with my B580 trying to pass it into a VM. It seems to all work until I install the Intel GPU drivers in Windows 11. Every time after that the mouse starts to not behave properly and then the host OS fails to boot after that.

I am not really sure what I could be doing wrong that breaks the boot device of the host.

mounting 'PARTUUID=...' on real root
BTRFS error (device nvme0n1p2): bad tree block start, mirror 1 want 310263808 have 260620288
BTRFS error (device nvme0n1p2): bad tree block start, mirror 2 want 310263808 have 260620288
BTRFS error (device nvme0n1p2): failed to read block groups: -5
BTRFS error (device nvme0n1p2): open_ctree failed: -5

If anyone has any ideas I am all ears.

All I assume is the difference is using the newer libvirt modular daemons instead of the monolithic daemon

To get it working I mean as since using that I haven’t had it crash and unable to boot.

Well to follow up I have been using the scripts just fine to bind and unbind the B580, but now I am getting kernel panics when booting the VM. It seems it is specifically upon binding the GPU to VFIO. Everything continues fine, but shutting down the system is where is gives the beautiful Blue Screen with the QR Code.

Continuing my discovery. I was able to narrow it down to having a display connected to the B580 upon booting the host system. If no display is connected when the host is booted, no kernel panic everything works fine.

Unsure how to proceed.

I even use the kernel parameter video=HDMI-A-3:d to disable that port outside the VM

This post also found that no display connected is required. But for me it specifically only needs to be not connected when booting the host.

video=efifb:off didnt work

messing with the frame buffer didnt work.

This type of removal didnt work and also kernel panics
echo “1” > /sys/bus/pci/devices/$gpu/remove echo “1” > /sys/bus/pci/devices/$aud/remove sleep 1 echo “1” > /sys/bus/pci/rescan sleep 1

This causes A LOT of kernel panics
echo "1" > /sys/bus/pci/devices/$gpu/reset echo "1" > /sys/bus/pci/devices/$aud/reset

When booting the host with no display connected the module Xe only has 4 processes using it, If a display was connected on boot, then it has 7 processes using it.

1 Like