When attempting GPU passthrough on QEMU-KVM, many users hit a wall with the default 440fx machine type. The older architecture simply wasn't designed for modern PCI Express devices. The q35 machine type, which supports PCIe natively, becomes essential - but the migration isn't always straightforward.
The core error message "PCI Bridges not supported by current qemu binary"
typically appears when your domain XML contains legacy PCI device assignments that are incompatible with q35's PCIe-only approach. Here's what needs attention in your configuration:
<controller type='pci' index='0' model='pci-root'/>
<controller type='usb' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
First, update the machine type in your XML:
<type arch='i686' machine='pc-q35-2.1'>hvm</type>
Then replace the PCI controllers section with q35-compatible alternatives:
<controller type='pci' index='0' model='pcie-root'/>
<controller type='pci' index='1' model='pcie-root-port'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</controller>
<controller type='usb' index='0' model='qemu-xhci'>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</controller>
All existing PCI device addresses need adjustment. For example, change:
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
To use the pcie-root-port bus:
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
After making these changes, validate your configuration with:
virsh define /etc/libvirt/qemu/Win7enterprise32bit.xml
virsh start Win7enterprise32bit
If you encounter ACPI or boot issues, consider adding these features:
<features>
<acpi/>
<apic/>
<pae/>
<kvm>
<hidden state='on'/>
</kvm>
</features>
When working with QEMU/KVM virtualization, the machine type defines the virtual hardware architecture. The traditional pc-i440fx
uses legacy PCI buses, while pc-q35
introduces PCI Express (PCIe) support - crucial for modern device passthrough scenarios like GPU virtualization.
Here's the essential changes needed in your domain XML:
<type arch='i686' machine='pc-q35-2.1'>hvm</type>
<controller type='pci' index='0' model='pcie-root'>
<controller type='pci' index='1' model='pcie-root-port'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</controller>
For your specific GPU passthrough case, here's how to properly structure the PCIe hierarchy:
<devices>
<controller type='pci' index='0' model='pcie-root'/>
<controller type='pci' index='1' model='pcie-root-port'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</controller>
<!-- Add more root ports as needed -->
<controller type='pci' index='2' model='pcie-to-pci-bridge'>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</controller>
</devices>
For devices that still require PCI (not PCIe), use the pcie-to-pci-bridge:
<controller type='pci' index='3' model='pcie-to-pci-bridge'>
<address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
</controller>
<sound model='ac97'>
<address type='pci' domain='0x0000' bus='0x03' slot='0x01' function='0x0'/>
</sound>
After making changes, always validate your XML before starting the VM:
virsh define /etc/libvirt/qemu/your_vm.xml
virsh validate /etc/libvirt/qemu/your_vm.xml
If you encounter "PCI Bridges not supported" errors:
- Verify QEMU version supports q35 (2.1+ should work)
- Ensure all PCI devices are properly addressed in the new hierarchy
- Check for any legacy PCI devices that need bridge conversion
When using Q35 with PCIe passthrough:
- Enable MSI/MSI-X interrupts in guest OS
- Consider CPU pinning for better performance
- Verify IOMMU groups are properly isolated