<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">(please configure your email client to
properly quote earlier messages, and reply inline rather as a
top-post; it makes it easier for others to determine the context
of replies.)<br>
<br>
On 04/03/2016 05:00 AM, Moshe Levi wrote:<br>
</div>
<blockquote
cite="mid:AM4PR05MB1826E14C08C636FC13F5A8E6D09C0@AM4PR05MB1826.eurprd05.prod.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"Times New Roman \,serif";
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
h4
{mso-style-priority:9;
mso-style-link:"Heading 4 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
span.Heading4Char
{mso-style-name:"Heading 4 Char";
mso-style-priority:9;
mso-style-link:"Heading 4";
font-family:"Times New Roman",serif;
font-weight:bold;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle23
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1229917838;
mso-list-type:hybrid;
mso-list-template-ids:2125207760 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Ok, so here are
the errors I get when using vfio/( kvm is working fine)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">This is the
Error [1] I am getting on resume when using vfio. And [2] is
the ls output on the /dev/vfio/<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Please note
that I am trying to attach pci which is VF
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">My setup is:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Fedora 21<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Libvirt 1.3.0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Qemu 2.5<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Kernel
3.17.4-301.fc21.x86_64<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">OpenStack –
master. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Let me know if
you need more information.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">[1] – <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">root@r-dcs78:/var/log/libvirt/qemu#
cat ./instance-0000000e.log<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2016-03-31
15:31:09.895+0000: starting up libvirt version: 1.3.0,
package: 1.fc21 (Unknown, 2016-02-25-10:56:09,
r-ufm231.mtr.labs.mlnx), qemu version: 2.5.0
(qemu-2.5.0-11.fc21)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -name
instance-0000000e -S -machine
pc-i440fx-2.5,accel=kvm,usb=off -m 2048 -realtime mlock=off
-smp 1,sockets=1,cores=1,threads=1 -uuid
a809a3b5-ba75-41e6-889f-ffeebecfe54e -smbios
'type=1,manufacturer=OpenStack Foundation,product=OpenStack
Nova,version=13.0.0,serial=533a28c3-7519-4e6d-8cdb-4b1f72649e71,uuid=a809a3b5-ba75-41e6-889f-ffeebecfe54e,family=Virtual
Machine' -no-user-config -nodefaults -chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-instance-0000000e/monitor.sock,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control -rtc
base=utc,driftfix=slew -global
kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -boot
strict=on -device
piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive
file=/opt/stack/data/nova/instances/a809a3b5-ba75-41e6-889f-ffeebecfe54e/disk,if=none,id=drive-virtio-disk0,format=qcow2,cache=none
-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
-drive
file=/opt/stack/data/nova/instances/a809a3b5-ba75-41e6-889f-ffeebecfe54e/disk.config,if=none,id=drive-ide0-1-1,readonly=on,format=raw,cache=none
-device
ide-cd,bus=ide.1,unit=1,drive=drive-ide0-1-1,id=ide0-1-1
-chardev
file,id=charserial0,path=/opt/stack/data/nova/instances/a809a3b5-ba75-41e6-889f-ffeebecfe54e/console.log
-device isa-serial,chardev=charserial0,id=serial0 -chardev
pty,id=charserial1 -device
isa-serial,chardev=charserial1,id=serial1 -vnc 127.0.0.1:0
-k en-us -device cirrus-vga,id=video0,bus=pci.0,addr=0x2
-device vfio-pci,host=04:00.7,id=hostdev0,bus=pci.0,addr=0x4
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
-msg timestamp=on<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">char device
redirected to /dev/pts/29 (label charserial1)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2016-03-31T15:31:46.775166Z
qemu-system-x86_64: terminating on signal 15 from pid 6866<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2016-03-31
15:32:07.547+0000: starting up libvirt version: 1.3.0,
package: 1.fc21 (Unknown, 2016-02-25-10:56:09,
r-ufm231.mtr.labs.mlnx), qemu version: 2.5.0
(qemu-2.5.0-11.fc21)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -name
instance-0000000e -S -machine
pc-i440fx-2.5,accel=kvm,usb=off -m 2048 -realtime mlock=off
-smp 1,sockets=1,cores=1,threads=1 -uuid
a809a3b5-ba75-41e6-889f-ffeebecfe54e -smbios
'type=1,manufacturer=OpenStack Foundation,product=OpenStack
Nova,version=13.0.0,serial=533a28c3-7519-4e6d-8cdb-4b1f72649e71,uuid=a809a3b5-ba75-41e6-889f-ffeebecfe54e,family=Virtual
Machine' -no-user-config -nodefaults -chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-instance-0000000e/monitor.sock,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control -rtc
base=utc,driftfix=slew -global
kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -boot
strict=on -device
piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive
file=/opt/stack/data/nova/instances/a809a3b5-ba75-41e6-889f-ffeebecfe54e/disk,if=none,id=drive-virtio-disk0,format=qcow2,cache=none
-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
-drive
file=/opt/stack/data/nova/instances/a809a3b5-ba75-41e6-889f-ffeebecfe54e/disk.config,if=none,id=drive-ide0-1-1,readonly=on,format=raw,cache=none
-device
ide-cd,bus=ide.1,unit=1,drive=drive-ide0-1-1,id=ide0-1-1
-chardev
file,id=charserial0,path=/opt/stack/data/nova/instances/a809a3b5-ba75-41e6-889f-ffeebecfe54e/console.log
-device isa-serial,chardev=charserial0,id=serial0 -chardev
pty,id=charserial1 -device
isa-serial,chardev=charserial1,id=serial1 -vnc 127.0.0.1:0
-k en-us -device cirrus-vga,id=video0,bus=pci.0,addr=0x2
-incoming defer -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -msg
timestamp=on<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">char device
redirected to /dev/pts/29 (label charserial1)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">vfio: error
opening /dev/vfio/57: Permission denied<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">vfio: failed to
get group 57</span></p>
</div>
</blockquote>
<br>
<br>
It's very strange that this error follows a commandline that doesn't
have any "-device vfio-pci" in it, and the previous commandline
(which *did* have a "-device vfio-pci") had no error message. Is the
device being hotplugged? If not, why isn't it in the commandline?
Can you include the XML for the device in your next reply? (Since
you're assigning a network device, I'm hoping that you're using
<interface type='hostdev'> rather than <hostdev> - the
former allows you to set the VF's MAC address / vlan tag after
detaching it from the host driver and before assigning it to the
guest)<br>
<br>
<br>
Alex: what could be the reasons for permission-denied when opening
the node for the iommu group? Could this be an issue with other
devices being in the same iommu group? (I would hope this isn't the
case, since the device in question is apparently an SRIOV VF, so it
should have its own iommu group).<br>
<br>
I'll be offline for about 6 days starting Monday AM, so may not be
able to participate in this discussion much more. Good luck!<br>
<br>
<br>
<blockquote
cite="mid:AM4PR05MB1826E14C08C636FC13F5A8E6D09C0@AM4PR05MB1826.eurprd05.prod.outlook.com"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">2016-03-31T16:05:54.975312Z
qemu-system-x86_64: terminating on signal 15 from pid 6866<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">[2]
root@r-dcs78:/var/log/libvirt/qemu# ls -l /dev/vfio/<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">total 0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">crw-rw-rw- 1
root root 10, 196 Mar 29 11:11 vfio<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in
0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
style="color:windowtext"> sendmail
[<a class="moz-txt-link-freetext" href="mailto:justsendmailnothingelse@gmail.com">mailto:justsendmailnothingelse@gmail.com</a>]
<b>On Behalf Of </b>Laine Stump<br>
<b>Sent:</b> Thursday, March 31, 2016 7:07 PM<br>
<b>To:</b> Libvirt <a class="moz-txt-link-rfc2396E" href="mailto:libvir-list@redhat.com"><libvir-list@redhat.com></a><br>
<b>Cc:</b> Moshe Levi <a class="moz-txt-link-rfc2396E" href="mailto:moshele@mellanox.com"><moshele@mellanox.com></a><br>
<b>Subject:</b> Re: [libvirt] Host device assignment
driver name vfio/ kvm<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 03/31/2016 11:58 AM, Moshe Levi
wrote:<span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:#1F497D">Thanks
Laine,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Adding the
driver_name o the config did the trick, thanks
</span><span style="font-family:Wingdings;color:#1F497D">J</span><span
style="color:#1F497D">
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Regarding
the vifo error it seem that openstack does roleback if
operation failed so that why you see the
virDomainAttachDeviceFlags</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">Anyhow I
found that the in qemu 2.1 suspend is not working (I got
error [1] ) so I upgrade to qemu 2.5 and then suspend
work but it failed on resume.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">So Just to
clarify vfio is not supporting “attach device” right?
is qemu going to support it?
</span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif"><br>
Not at all. attach device works just fine with vfio
(that's how hotplug is done). I've just been using it
myself in some testing. (note that vfio has been supported
since kernel 3.6 and libvirt 1.0.5, i.e. a "very long
time")<br>
<br>
<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:#1F497D">Now I
wonder if I need to hardcode in the hostdev config to be
with driver_name=kvm…
</span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif"><br>
<br>
I certainly hope not. You would be viciously attacked by
the keeper of vfio for your transgression! :-)<br>
<br>
Seriously, there should be no reason whatsoever to force
driver name='kvm'. This was made configurable *only* as a
fallback in case errors were encountered with vfio during
its early days. As a matter of fact, I'm pretty sure that
RHEL7 has legacy kvm device assignment completely
disabled. If you are needing to force legacy kvm device
assignment to make your setup work, then there is a bug
somewhere that needs to be investigated and squashed.<br>
<br>
<br>
<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D">[1]
-ERROR:qom/object.c:725:object_unref: assertion failed:
(obj->ref > 0)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<div style="border:none;border-left:solid blue
1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span
style="color:windowtext"> sendmail [<a
moz-do-not-send="true"
href="mailto:justsendmailnothingelse@gmail.com"><a class="moz-txt-link-freetext" href="mailto:justsendmailnothingelse@gmail.com">mailto:justsendmailnothingelse@gmail.com</a></a>]
<b>On Behalf Of </b>Laine Stump<br>
<b>Sent:</b> Wednesday, March 30, 2016 9:25 PM<br>
<b>To:</b> Libvirt <a moz-do-not-send="true"
href="mailto:libvir-list@redhat.com"><libvir-list@redhat.com></a><br>
<b>Cc:</b> Moshe Levi <a moz-do-not-send="true"
href="mailto:moshele@mellanox.com"><moshele@mellanox.com></a><br>
<b>Subject:</b> Re: [libvirt] Host device
assignment driver name vfio/ kvm</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<p class="MsoNormal">On 03/29/2016 07:45 AM, Moshe Levi
wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I was testing <a
moz-do-not-send="true" name="elementsHostDev">Host
device assignment</a> in OpenStack environment
where the driver name is vfio or kvm.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">My setup is as follow: <o:p></o:p></p>
<p class="MsoListParagraph"
style="text-indent:-.25in;mso-list:l0 level1 lfo2"><!--[if !supportLists]--><span
style="mso-list:Ignore">1.<span style="font:7.0pt
"Times New Roman"">
</span></span><!--[endif]--><span dir="LTR"></span>Fedora
21<o:p></o:p></p>
<p class="MsoListParagraph"
style="text-indent:-.25in;mso-list:l0 level1 lfo2"><!--[if !supportLists]--><span
style="mso-list:Ignore">2.<span style="font:7.0pt
"Times New Roman"">
</span></span><!--[endif]--><span dir="LTR"></span>Libvirt
1.3.0 which I compiled<o:p></o:p></p>
<p class="MsoListParagraph"
style="text-indent:-.25in;mso-list:l0 level1 lfo2"><!--[if !supportLists]--><span
style="mso-list:Ignore">3.<span style="font:7.0pt
"Times New Roman"">
</span></span><!--[endif]--><span dir="LTR"></span>OpenStack
master <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I have also other setups with older
Libvirt version and the same OpenStack environment.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I notice that on my fedora
environment the driver name is vfio were in my old
environment the driver name is kvm.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">According to Libvirt documentation
default is "vfio" on systems where the VFIO driver is
available and loaded, see [1]<o:p></o:p></p>
<p class="MsoNormal">I remove the vfio modules by
removing vfio, vfio_iommu_type1, vfio_pci but when I
boot a vm the drive name is vfio<o:p></o:p></p>
<p class="MsoNormal">How can change the driver name to
be kvm?<o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman ,serif",serif"><br>
libvirt tries very hard to use vfio rather than legacy
kvm, because legacy kvm is old, deprecated, and
"declared bad" :-). But it won't changed it to vfio if
you've explicitly said that you want to use kvm. If
you really want to use legacy kvm device assignment,
manually set that in the config. When you do that, if
the system you're running on doesn't support it, it
will error out rather than switching.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span><o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Another thing that I encounter is
an error when suspending VM (in OpenStack environment)
when the driver name is vfio.<o:p></o:p></p>
<p class="MsoNormal">In such case I am getting the
following error from Libvirt:<o:p></o:p></p>
<p class="MsoNormal">2016-03-28 11:42:59.527 1966 ERROR
oslo_messaging.rpc.dispatcher File
"/usr/lib64/python2.7/site-packages/libvirt.py", line
560, in attachDeviceFlags<o:p></o:p></p>
<p class="MsoNormal">2016-03-28 11:42:59.527 1966 ERROR
oslo_messaging.rpc.dispatcher if ret == -1: raise
libvirtError ('virDomainAttachDeviceFlags() failed',
dom=self)<o:p></o:p></p>
<p class="MsoNormal">2016-03-28 11:42:59.527 1966 ERROR
oslo_messaging.rpc.dispatcher libvirtError: internal
error: unable to execute QEMU command 'device_add':
Device initialization failed.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I would appreciate for some
pointers on what can cause this issue.<o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman ,serif",serif"><br>
Assuming that openstack uses libvirt's virDomainSave
API I would expect suspending a guest to fail if it
had an assigned device (since libvirt implements this
by "migrating to disk", and qemu doesn't allow
migration of a guest with an assigned device. But your
problem is that it's trying to *attach* a device,
which I wouldn't consider to be a part of a save or
suspend or whatever operation. Is it possible to get
more information about what leads up to this?<br>
<br>
<br>
<br>
<br>
</span><o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">[1] <a moz-do-not-send="true"
href="https://libvirt.org/formatdomain.html#elementsHostDev">
https://libvirt.org/formatdomain.html#elementsHostDev</a><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman ,serif",serif"><br>
<br>
<br>
<br>
</span><o:p></o:p></p>
<pre>--<o:p></o:p></pre>
<pre>libvir-list mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="https://www.redhat.com/mailman/listinfo/libvir-list">https://www.redhat.com/mailman/listinfo/libvir-list</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman ,serif",serif"> </span><o:p></o:p></p>
</div>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman",serif"><o:p> </o:p></span></p>
</div>
</div>
</blockquote>
<br>
</body>
</html>