PCI passthrough fails with Intel 82574L
Hi,
I am unable to get PCI passthrough to work on my Opteron system. I
keep getting an 'adapter reset' within the VM that has the PCI ethernet assigned to it. It is running 2 x 6 core Opterons on a SuperMicro H8DCL motherboard that has 2 Intel 82574L network interfaces on it.
Host's lspci (relevant card):
02:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
03:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
Both host and VM are running Debian 7 (Wheezy). I have the latest qemu-kvm from debian backports (1.7.0).
I am running the virtual hosts via virt-manager and assigning the PCI express ethernet card at 03:00.0. There is no configuration on the host for that ethernet card, only the first one (02:00.0) is in use. I have enabled the
options kvm allow_unsafe_assigned_interrupts=1
When running the VM with the PCI express adapter assigned to it, and configured for the network it is connected to, it does not work. I simply get the 'adapter reset' message again and again.
The host shows the device being claimed by pci-stub as it gets assigned to the guest and getting the IRQs. On the guest there is a stack trace and also adapter resets.
I am hoping to run a number of different virtual machines off of this host. Due to network policies in place (no devices in promiscuous mode get routed) I cannot simply place the host's interface to be shared with different IPs, so must do one physical ethernet interface each.
Any help would be greatly appreciated.
Thanks,
Derek
Signature · 5 lines
Derek Piper - [email protected] - (812) 855 5560 System Administrator / Informatics Specialist Molecular Structure Center (IUMSC), Chemistry Indiana University, Bloomington, Indiana http://www.iumsc.indiana.edu/
Quoted 8 lines · Derek Piper
Hi,
I am unable to get PCI passthrough to work on my Opteron system. I
keep getting an 'adapter reset' within the VM that has the PCI ethernet assigned to it. It is running 2 x 6 core Opterons on a SuperMicro H8DCL motherboard that has 2 Intel 82574L network interfaces on it.
Quoted 8 lines
Host's lspci (relevant card):
02:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
03:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network ConnectionBoth host and VM are running Debian 7 (Wheezy). I have the latest qemu-kvm from debian backports (1.7.0).
Latest is 2.0, also what's the kernel version?
Quoted 6 lines
I am running the virtual hosts via virt-manager and assigning the PCI express ethernet card at 03:00.0. There is no configuration on the host for that ethernet card, only the first one (02:00.0) is in use. I have enabled the
options kvm allow_unsafe_assigned_interrupts=1
Quoted 7 lines
When running the VM with the PCI express adapter assigned to it, and configured for the network it is connected to, it does not work. I simply get the 'adapter reset' message again and again.
The host shows the device being claimed by pci-stub as it gets assigned to the guest and getting the IRQs. On the guest there is a stack trace and also adapter resets.
Relevant guest dmesg would be helpful.
Quoted 6 lines
I am hoping to run a number of different virtual machines off of this host. Due to network policies in place (no devices in promiscuous mode get routed) I cannot simply place the host's interface to be shared with different IPs, so must do one physical ethernet interface each.
Any help would be greatly appreciated.
Does it work using vfio-pci to do the assignment rather than pci-assign? Newer versions of libvirt will use this by default, you may need to add a driver tag with an older version, or upgrade if it's too old for vfio. See xml example here:
http://libvirt.org/formatdomain.html#elementsNICSHostdev
Thanks,
Alex
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 12 lines · Derek Piper
Attached is the dmesg from the host and the vm. I tried email these
before but it seemed to make the message get rejected from the mailing list.I attached the PCIe device via the virt-manager, which modified the config
like this:<hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x07'
Quoted 5 lines
function='0x0'/>
</hostdev>Debian wheezy kernel is 3.2.0-4-amd64. Yes, maybe what I have is too old.
Seeing what was said about VFIO, I will give that a go.
That's quite old. You'll need 3.6 or (preferably) newer for vfio. I expect there have also been plenty of legacy KVM assignment fixes since that kernel. Please upgrade and report back. Thanks,
Alex
Quoted 63 lines · Alex Williamson
Quoted 55 lines · Derek Piper
Quoted 9 lines
Hi,
I am unable to get PCI passthrough to work on my Opteron system. I
keep getting an 'adapter reset' within the VM that has the PCI ethernet assigned to it. It is running 2 x 6 core Opterons on a SuperMicro H8DCL motherboard that has 2 Intel 82574L network interfaces on it.
Quoted 8 lines
Host's lspci (relevant card):
02:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
03:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network ConnectionBoth host and VM are running Debian 7 (Wheezy). I have the latest qemu-kvm from debian backports (1.7.0).
Latest is 2.0, also what's the kernel version?
Quoted 7 lines
I am running the virtual hosts via virt-manager and assigning the PCI express ethernet card at 03:00.0. There is no configuration on the host for that ethernet card, only the first one (02:00.0) is in use. I have enabled the
options kvm allow_unsafe_assigned_interrupts=1
Quoted 7 lines
When running the VM with the PCI express adapter assigned to it, and configured for the network it is connected to, it does not work. I simply get the 'adapter reset' message again and again.
The host shows the device being claimed by pci-stub as it gets assigned to the guest and getting the IRQs. On the guest there is a stack trace and also adapter resets.
Relevant guest dmesg would be helpful.
Quoted 6 lines
I am hoping to run a number of different virtual machines off of this host. Due to network policies in place (no devices in promiscuous mode get routed) I cannot simply place the host's interface to be shared with different IPs, so must do one physical ethernet interface each.
Any help would be greatly appreciated.
Does it work using vfio-pci to do the assignment rather than pci-assign? Newer versions of libvirt will use this by default, you may need to add a driver tag with an older version, or upgrade if it's too old for vfio. See xml example here:
http://libvirt.org/formatdomain.html#elementsNICSHostdev
Thanks,
Alex
Signature · 5 lines
Derek Piper - [email protected] - (812) 855 5560 System Administrator / Informatics Specialist Molecular Structure Center (IUMSC), Chemistry Indiana University, Bloomington, Indiana http://www.iumsc.indiana.edu/
I'm happy to report that after updating the kernel to 3.14.3 (and
enabling the IPv4 NAT in the config) I was able to assign the device using virt-manager (so it was a regular 'hostdev' assignment). Networking works great, and the virtual machine can have both an internal IP on the virtual network and also have its own ethernet card on the external network. Packets travel well and no adapter resets any more.
Thanks for prodding me in the right direction with regard to the kernel.
Derek
Quoted 93 lines · Alex Williamson
Quoted 19 lines · Derek Piper
Attached is the dmesg from the host and the vm. I tried email these
before but it seemed to make the message get rejected from the mailing list.
I attached the PCIe device via the virt-manager, which modified the config
like this:
<hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x07'Quoted 8 lines
function='0x0'/>
</hostdev>
Debian wheezy kernel is 3.2.0-4-amd64. Yes, maybe what I have is too old.
Seeing what was said about VFIO, I will give that a go.
That's quite old. You'll need 3.6 or (preferably) newer for vfio. I expect there have also been plenty of legacy KVM assignment fixes since that kernel. Please upgrade and report back. Thanks,
Alex
Quoted 58 lines · Alex Williamson
Quoted 57 lines · Derek Piper
Quoted 10 lines
Hi,
I am unable to get PCI passthrough to work on my Opteron system. I
keep getting an 'adapter reset' within the VM that has the PCI ethernet assigned to it. It is running 2 x 6 core Opterons on a SuperMicro H8DCL motherboard that has 2 Intel 82574L network interfaces on it.
Quoted 8 lines
Host's lspci (relevant card):
02:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
03:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network ConnectionBoth host and VM are running Debian 7 (Wheezy). I have the latest qemu-kvm from debian backports (1.7.0).
Latest is 2.0, also what's the kernel version?
Quoted 7 lines
I am running the virtual hosts via virt-manager and assigning the PCI express ethernet card at 03:00.0. There is no configuration on the host for that ethernet card, only the first one (02:00.0) is in use. I have enabled the
options kvm allow_unsafe_assigned_interrupts=1
Quoted 7 lines
When running the VM with the PCI express adapter assigned to it, and configured for the network it is connected to, it does not work. I simply get the 'adapter reset' message again and again.
The host shows the device being claimed by pci-stub as it gets assigned to the guest and getting the IRQs. On the guest there is a stack trace and also adapter resets.
Relevant guest dmesg would be helpful.
Quoted 7 lines
I am hoping to run a number of different virtual machines off of this host. Due to network policies in place (no devices in promiscuous mode get routed) I cannot simply place the host's interface to be shared with different IPs, so must do one physical ethernet interface each.
Any help would be greatly appreciated.
Does it work using vfio-pci to do the assignment rather than pci-assign? Newer versions of libvirt will use this by default, you may need to add a driver tag with an older version, or upgrade if it's too old for vfio. See xml example here:
http://libvirt.org/formatdomain.html#elementsNICSHostdev
Thanks,
Alex
Signature · 5 lines
Derek Piper - [email protected] - (812) 855 5560 System Administrator / Informatics Specialist Molecular Structure Center (IUMSC), Chemistry Indiana University, Bloomington, Indiana http://www.iumsc.indiana.edu/