Description of problem: I try to pass-throu device by libvirt API, I do pass-throu the NIC to the guest OS, but I can not see it in the guest OS, we can see the bdf in virt-manager control panel, I think that it should be bogus. If create the guest with qemu-kvm command directly, I can see the NIC. This issue exists on NHM-HEDT. For NHM-EP, it exists on some of hardware steppings. I will attach the dmidecode. the demsg with or without libvirt. Version-Release number of selected component (if applicable): libvirt-0.6.3-20 and kernel-2.6.18-162 (rhel5u4 rc1) How reproducible: 1. find the device ID #virsh nodedev-list -tree computer | +-pci_8086_10cc | | | +-net_00_1c_c0_79_8b_d7 2. Detach it from host [root@localhost ~]# virsh nodedev-dettach pci_8086_10cc Device pci_8086_10cc dettached I guess that It should be a typo, dettach should be detach. 3. Reset the device [root@localhost ~]# virsh nodedev-reset pci_8086_10cc Device pci_8086_10cc reset No FLR capability, it should use SBR or PM reset. 4. prepare a xml file, refer the attachment: kvm-new.xml I try to pass-throu 2 device: 00:19.0,01:00.0. both does not FLR. <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address bus='0x00' slot='0x19' function='0x00'/> </source> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address bus='0x01' slot='0x00' function='0x00'/> </source> </hostdev> 5. check the device in guest OS, I can not find them in guest OS, but it shows on virt-manager control panel. Attachment: vir-manager.png Check qemu log, it did do the pass-throu action -pcidevice host=00:19.0 -pcidevice host=01:00.0 My dmesg was attached, too. dmesg.txt 6. create guest without libvirt If create guest OS with the command: /usr/libexec/qemu-kvm -m 512 -smp 2 -hda /root/ia32e_rhel5u1.img -net none -pcidevice host=00:19.0 -name vm2 -pcidevice host=01:00.0 I can not find the NIC in guest OS. Actual results: Expected results: Additional info:
Created attachment 357654 [details] configure file
Created attachment 357655 [details] dmi decode information
Created attachment 357656 [details] virt-manager snapshot(bugus bdf)
Created attachment 357658 [details] dmesg when create guest with qemu-kvm
Created attachment 357659 [details] dmesg when create guest via libvirt
Created attachment 357662 [details] qemu log on /var/log/libvirt/qemu/vm2.log
Here's the problem: <domain type='qemu'> it should be: <domain type='kvm'> With type='qemu', libvirt runs qemu-kvm -no-kvm and -pcidevice is ignored If you change it to type='kvm', does it work?
After I change the hypervisor to kvm, I can success to pass-throu the device and it works fine.