Bug 1330859

Summary: Assignment of BCM5719 NIC to a guest VM failed when vt-d enabled and intel_iommu=on
Product: Red Hat Enterprise Linux 7 Reporter: yaoal <yaoal1>
Component: libvirtAssignee: Pavel Hrdina <phrdina>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.2CC: dyuan, fchen16, hehy1, jishao, jkachuck, kstansel, phrdina, rbalakri, shyu, yangsp1, yaoal1
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-11 06:18:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1274381    
Attachments:
Description Flags
kernel start log
none
when add NIC to a guest,the Dmesg log none

Description yaoal 2016-04-27 07:13:11 UTC
Description of problem:
Assignment of BCM5719 NIC to a guest VM failed when vt-d enabled and intel_iommu=on
Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.enable vt-d in bios 
2.pass intel_iommu=on to kernel
3.run virt-manager
4.add BCM5719 NIC to a guest
5.start guset OS,it will fail;

show:unsupported configuration: host doesn't support passthrough of host PCI devices 


Actual results:

unsupported configuration: host doesn't support passthrough of host PCI devices 


Expected results:
guest OS starts,and we will see the NIC

Additional info:

Comment 1 yaoal 2016-04-27 07:31:45 UTC
add related redhat engineers

Comment 2 yaoal 2016-04-27 07:34:03 UTC
Created attachment 1151242 [details]
kernel start log

Comment 3 yaoal 2016-04-27 07:40:43 UTC
Created attachment 1151244 [details]
when add NIC to a guest,the Dmesg log

Comment 5 Pavel Hrdina 2016-04-27 10:25:51 UTC
Hi, could you please provide version of libvirt, qemu and kernel and also output of "virt-host-validate" command? Thanks.

Comment 6 yaoal 2016-05-04 02:59:11 UTC
Hi :
 Finally i got the infomation,see below:

[root@localhost ~]# libvirtd --version
libvirtd (libvirt) 1.2.17
[root@localhost ~]# virsh --version
1.2.17
[root@localhost ~]# qemu-img --help | grep version
qemu-img version 1.5.3, Copyright (c) 2004-2008 Fabrice Bellard
       conversion. If the number of bytes is 0, the source will not be scanned for
[root@localhost ~]# /usr/libexec/qemu-kvm -version
QEMU emulator version 1.5.3 (qemu-kvm-1.5.3-105.el7), Copyright (c) 2003-2008 Fabrice Bellard
[root@localhost ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.2 (Maipo)
[root@localhost ~]# cat /proc/version
Linux version 3.10.0-327.el7.x86_64 (mockbuild.eng.bos.redhat.com) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Oct 29 17:29:29 EDT 2015
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# virt-host-validate
  QEMU: Checking for hardware virtualization                                 : PASS
  QEMU: Checking for device /dev/kvm                                         : PASS
  QEMU: Checking for device /dev/vhost-net                                   : PASS
  QEMU: Checking for device /dev/net/tun                                     : PASS
   LXC: Checking for Linux >= 2.6.26                                         : PASS
[root@localhost ~]#

Comment 7 yaoal 2016-05-09 01:40:50 UTC
Hi:
  Do you still need any more info?

Comment 8 Pavel Hrdina 2016-05-09 15:31:07 UTC
Hi, I didn't realized that RHEL-7.2 doesn't have all the checks in virt-host-validate as upstream libvirt.  Are you sure, that the IOMMU in bios is enabled and also the intel_iommu=on is on the command line?

Please check again, that the vt-d is enabled in bios and the intel_iommu=on is properly passed to the kernel.  If everything works, you should be able to see several iommu groups inside /sys/kernel/iommu_groups/ directory.

I've tried it and everything works.

Comment 9 yaoal 2016-05-11 06:18:30 UTC
Hi:
  After checking with our customer, Now they can assign BCM5719 NIC to VM now;
  They said they have made some error settings in bios and kernel before;

  thanks for helping;