Description of problem: Assign one VF to guest failed Version-Release number of selected component (if applicable): RHEL5.6-Server-x86_64-kvm kvm-83-199.el5 kvm-qemu-img-83-199.el5 libvirt-0.8.2-6.el5 How reproducible: Always Steps to Reproduce: 1.# lspci|grep 82576 03:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 03:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 03:10.1 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 03:10.3 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 2.# lspci -n |grep 03:10.3 03:10.3 0200: 8086:10ca (rev 01) 3.# virsh nodedev-dumpxml pci_8086_10ca_0 <device> <name>pci_8086_10ca_0</name> <parent>pci_8086_3408</parent> <driver> <name>pci-stub</name> </driver> <capability type='pci'> <domain>0</domain> <bus>3</bus> <slot>16</slot> <function>1</function> <product id='0x10ca'>82576 Virtual Function</product> <vendor id='0x8086'>Intel Corporation</vendor> <capability type='phys_function'> <address domain='0x0000' bus='0x03' slot='0x00' function='0x1'/> </capability> </capability> </device> 4.Add this VF xml info to guest config xml(guest mig is in shutoff status) ... <hostdev mode='subsystem' type='pci'> <source> <address bus='3' slot='16' function='1'/> </source> </hostdev> ... 5.# virsh nodedev-dettach pci_8086_10ca 6.# virsh start mig Domain mig started 7.On guest, check whether VF is already assigned successfully #lscpi | grep 82576 Actual results: step7:no output Expected results: step 7: should display assigned VF information Additional info:
mig.log:assigned_dev_pci_read_config: pread failed, ret = 0 errno = 0
Is selinux in permissive or enforcing mode? If it is enforcing, does anything change when you switch selinux to permissive? If so, could you check what selinux is complaining about in enforcing mode and attach more info about that?
Hi Jiri, I have tried with permissive mode and enforcing mode. No output when using lspci|grep 82576 in guest. --------Permissive mode---------- step 7 still has no output in Permissive mode. # tail -f /var/log/libvirt/qemu/rh55.log LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin HOME=/ QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -S -M rhel5.4.0 -no-kvm -m 512 -smp 1 -name rh55 -uuid 20e1cb0f-8277-5090-d20f-06d00ff5343b -monitor unix:/var/lib/libvirt/qemu/rh55.monitor,server,nowait -boot c -drive file=/var/lib/libvirt/images/rh5.6.img,if=ide,bus=0,unit=0,format=raw,cache=none -net nic,macaddr=54:52:00:40:75:78,vlan=0 -net tap,fd=18,vlan=0 -serial pty -parallel none -usb -vnc 127.0.0.1:0 -k en-us -vga cirrus -soundhw ac97 -pcidevice host=03:10.1 -balloon virtio char device redirected to /dev/pts/3 # tail -f /var/log/messages Oct 20 01:39:44 dhcp-66-92-51 dbus: avc: received setenforce notice (enforcing=0) Oct 20 01:40:04 dhcp-66-92-51 libvirtd: 01:40:04.394: warning : SELinuxRestoreSecurityFileLabel:385 : cannot lookup default selinux label for /sys/bus/pci/devices/0000:03:10.1/resource3 -------------Enforcing mode---------- step 7 still has no output in Enforcing mode. # tail -f /var/log/libvirt/qemu/rh55.log LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin HOME=/ QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -S -M rhel5.4.0 -no-kvm -m 512 -smp 1 -name rh55 -uuid 20e1cb0f-8277-5090-d20f-06d00ff5343b -monitor unix:/var/lib/libvirt/qemu/rh55.monitor,server,nowait -boot c -drive file=/var/lib/libvirt/images/rh5.6.img,if=ide,bus=0,unit=0,format=raw,cache=none -net nic,macaddr=54:52:00:40:75:78,vlan=0 -net tap,fd=18,vlan=0 -serial pty -parallel none -usb -vnc 127.0.0.1:0 -k en-us -vga cirrus -soundhw ac97 -pcidevice host=03:10.1 -balloon virtio char device redirected to /dev/pts/3 # tail -f /var/log/messages Oct 20 01:41:18 dhcp-66-92-51 dbus: avc: received setenforce notice (enforcing=1)
(In reply to comment #3) Also the Version-Release number of selected component: RHEL5.6-Server-x86_64-kvm libvirt-0.8.2-7.el5 kvm-qemu-img-83-205.el5 kvm-83-205.el5
Version-Release number of selected component: RHEL5.6-Server-x86_64-kvm libvirt-0.8.2-7.el5 kvm-qemu-img-83-205.el5 kvm-83-205.el5 I have tried in these scenarios about passthrough using kvm type guest with managed=yes. - Permissive mode VF passthrough - Enforcing mode VF passthrough Works well and VF can be checked in guest.
ok, so this is not a bug then since it works