I have successfully managed to pass through my P4600 IGD to a VM. However I could only get it working up to a machine of pc-i440fx-2.2.
The error given with pc-i440fx > 2.2 was that the address 1f.0 was in use by another device and the vfio legacy IGD passthrough requires this address to be free. This was confirmed by trying to create an ISA bridge (vfio-pci-igd-lpc-bridge) at 1f.0 - we find that there is already a PCI bridge there.
Looking at the code at https://github.com/proxmox/qemu-server/blob/master/PVE/QemuServer.pm we see the folllowing:
Where qemu_machine_feature_enabled effectively checks to see what version of pc-i440fx we are using, and:
where 31 is 0x1f in hex
I understand from the commit comments that this was done for a good reason (an issue with live migration), but it's unfortunate that there isn't any control over it for a case like IGD passthrough.
Is it possible to somehow override this? Either by controlling how many PCI Bridges are created or by influencing the addresses they are created at? Perhaps a way to manipulate the command to KVM?
I tried looking for this file so I could patch it directly, but I wasn't able to. I presume it's compiled or somesuch? But if that's possible I'd be happy to go that route.
The error given with pc-i440fx > 2.2 was that the address 1f.0 was in use by another device and the vfio legacy IGD passthrough requires this address to be free. This was confirmed by trying to create an ISA bridge (vfio-pci-igd-lpc-bridge) at 1f.0 - we find that there is already a PCI bridge there.
Looking at the code at https://github.com/proxmox/qemu-server/blob/master/PVE/QemuServer.pm we see the folllowing:
Perl:
if (!$q35) {
# add pci bridges
if (qemu_machine_feature_enabled ($machine_type, $kvmver, 2, 3)) {
$bridges->{1} = 1;
$bridges->{2} = 1;
}
$bridges->{3} = 1 if $scsihw =~ m/^virtio-scsi-single/;
while (my ($k, $v) = each %$bridges) {
$pciaddr = print_pci_addr("pci.$k");
unshift @$devices, '-device', "pci-bridge,id=pci.$k,chassis_nr=$k$pciaddr" if $k > 0;
}
}
Where qemu_machine_feature_enabled effectively checks to see what version of pc-i440fx we are using, and:
Perl:
sub print_pci_addr {
my ($id, $bridges) = @_;
my $res = '';
my $devices = {
#...
'pci.1' => { bus => 0, addr => 30 },
'pci.2' => { bus => 0, addr => 31 },
#...
};
where 31 is 0x1f in hex
I understand from the commit comments that this was done for a good reason (an issue with live migration), but it's unfortunate that there isn't any control over it for a case like IGD passthrough.
Is it possible to somehow override this? Either by controlling how many PCI Bridges are created or by influencing the addresses they are created at? Perhaps a way to manipulate the command to KVM?
I tried looking for this file so I could patch it directly, but I wasn't able to. I presume it's compiled or somesuch? But if that's possible I'd be happy to go that route.
Last edited: