<div dir="ltr">Hi<div><br></div><div>thanks for your reply</div><div><br></div><div>Since I am working on my master thesis and seriously I am running out of time I decided to downgrade my libvirt from 1.1.1 to 1.0.2 to be able to continue working on my thesis. Now it works !</div>
<div><br></div><div>But for your information , I already checked the XML file and the <font face="arial, sans-serif">interface was really removed. I checked my host interfaces using ifconfig -a and I found however I released the device but it is not there and it is not possible to assign it to other VM so I though it means there is some missed procedure or some thing like this to unbind pci device ! as i mentioned if I restarted the libvirt service I was able to attach it again but still it was not shown in ifconfig -a list. The other point that i noticed was the number of "irq"s in my logs for MSI/MSI-X while attaching device. I am not a programmer and I have no clue about interrupts but the point was that in 1.1.1 i cloud see only 2 or 3 "irq" in my logs but now I see 7 or 8 . </font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">regards</font></div><div><font face="arial, sans-serif">Mohsen</font></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Mar 28, 2014 at 10:34 AM, Michal Privoznik <span dir="ltr"><<a href="mailto:mprivozn@redhat.com" target="_blank">mprivozn@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 27.03.2014 13:53, Mohsen Ghaemi wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all<br>
<br>
I just encountered a problem in libvirt while was trying to attach and<br>
detach a sr-iov vf to my VM<br>
<br>
<br>
The version of my libvirt is 1.1.1-0ubuntu8.5<br>
<br>
<br>
I tried to attach the device using following xml<br>
<br>
<br>
<interface type='hostdev' managed='yes'><br>
<br>
    <mac address='5c:01:fd:12:34:58'/><br>
<br>
    <source><br>
<br>
        <address type='pci' domain='0x0000' bus='0x04' slot='0x01'<br>
function='0x1'/><br>
<br>
    </source><br>
<br>
</interface><br>
<br>
<br>
When i attached device it worked properly and i managed to ping another<br>
host.<br>
<br>
<br>
virsh # attach-device t5 1.xml<br>
<br>
Device attached successfully<br>
<br>
<br>
But when i detached it still i had network traffic in my VM but libvirt<br>
(virsh) said that<br>
<br>
<br>
virsh # detach-device t5 1.xml<br>
<br>
Device detached successfully<br>
<br>
<br>
The next time i tried to attach it libvirt said that<br>
<br>
<br>
virsh # attach-device t5 1.xml<br>
<br>
error: Failed to attach device from 1.xml<br>
<br>
error: Requested operation is not valid: PCI device 0000:04:01.1 is in<br>
use by domain t5<br>
<br>
<br>
and when i continue this action after the ‘domain’ i receive some<br>
strange characters which might come from the memory space (memory<br>
content) like some addresses, links or some characters<br>
<br>
<br>
I tried it with different VMs and different guest OSs that the same happend.<br>
<br>
<br>
The same action was done with another host running libvirt version<br>
<br>
<br>
Installed: 1.0.2-0ubuntu11.13.04.5~cloud1<br>
<br>
Candidate: 1.0.2-0ubuntu11.13.04.5~cloud1<br>
</blockquote>
<br></div></div>
This is probably a bug in libvirt. There's been a rework of hostdev plugging and unplugging recently. Can you try the 1.2.3-rc1 and see if the problem is gone?<span class="HOEnZb"><font color="#888888"><br>
<br>
Michal<br>
</font></span></blockquote></div><br></div>