<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 17, 2016 at 11:42 AM, Corey Larson <span dir="ltr"><<a href="mailto:corey@eatrunco.de" target="_blank">corey@eatrunco.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>




<div><div><div class="h5"><div><div> </div>
<div>On Thu, Mar 17, 2016, at 06:56 AM, Alex Williamson wrote:<br></div>
</div>
</div></div><blockquote type="cite"><div><div class="h5"><div dir="ltr"><div>There are definitely easier ways to do this than recompiling QEMU.  I favor a wrapper script such that you simply replace the <emulator> in the domain XML with the wrapper and it works automatically, something like:<br></div>
<div> </div>
<div><div>$ cat /usr/libexec/qemu-kvm-hv-vendor <br></div>
<div>#!/bin/sh<br></div>
<div><div>exec /usr/bin/qemu-kvm \<br></div>
</div>
<div><span style="white-space:pre-wrap"></span>`echo "\$@" | sed 's|hv_time|hv_time,hv_vendor_id=KeenlyKVM|g'`<br></div>
</div>
</div>
</div></div><div><u>_______________________________________________</u><br></div>
<div>vfio-users mailing list<br></div>
<div><a href="mailto:vfio-users@redhat.com" target="_blank">vfio-users@redhat.com</a><br></div>
<div><a href="https://www.redhat.com/mailman/listinfo/vfio-users" target="_blank">https://www.redhat.com/mailman/listinfo/vfio-users</a><br></div>
</blockquote><div> </div>
<div> </div>
<div>I was going to be trying this approach soon: <a href="https://libvirt.org/drvqemu.html#qemucommand" target="_blank">https://libvirt.org/drvqemu.html#qemucommand</a>. Is there any reason to prefer this scripting approach over the XML approach?</div></div></blockquote><div><br></div><div><qemu:arg> is inherently evil.  You end up specifying two -cpu args, the one libvirt generates and the one you specific in the qemucommand (which is opaque to libvirt) and you hope that qemu selects the one you want.  Using virt-manager to fiddle with cpu options might become meaningless, we don't know whether qemu merges all cpu options together or only takes the last (we could look, but it's probably unexpected and therefore undefined and could change at any release). </div></div></div></div>