<div dir="ltr"><div dir="ltr">On Fri, Jul 10, 2020 at 7:48 AM Mark Mielke <<a href="mailto:mark.mielke@gmail.com">mark.mielke@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Fri, Jul 10, 2020 at 7:14 AM Jiri Denemark <<a href="mailto:jdenemar@redhat.com" target="_blank">jdenemar@redhat.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> +    if (qemuCaps &&<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> +        def->cpu->mode == VIR_CPU_MODE_HOST_PASSTHROUGH &&<br>
> +        !def->cpu->migratable) {<br>
> +        if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_CPU_MIGRATABLE))<br>
> +            def->cpu->migratable = VIR_TRISTATE_SWITCH_ON;<br>
> <br>
> *+        else if (ARCH_IS_X86(def->os.arch))+<br>
>  def->cpu->migratable = VIR_TRISTATE_SWITCH_OFF;*<br>
> +    }<br>
<br>
The implementation seems to be doing exactly what the commit message<br>
says. The migratable=off default should be used only when QEMU does not<br>
support -cpu host,migratable=on|off, that is only when QEMU is very old.<br>
Every non-ancient version of libvirt should have the<br>
QEMU_CAPS_CPU_MIGRATABLE set and thus this code should choose<br>
migrateble=on default.<br></blockquote><div><br></div><div>I wasn't sure what QEMU_CAPS_CPU_MIGRATABLE represents. I initially suspected what you are saying, but since it apparently did not work the way I expected, I then presumed it does not work the way I expected. :-)</div><div><br></div><div>Is QEMU_CAPS_CPU_MIGRATABLE only from the <cpu> element? If so, doesn't this mean that it is not explicitly listed for host-passthrough, and this means the check is not detecting whether it is enabled or not properly?</div></div></div></blockquote><div><br></div><div>Trying to understand what is going on more - I see "migratable" seems to be ok when launching a new machine, but the failure scenario was live migration from 6.4.0 to 6.5.0.</div><div><br></div><div>Is this because the QEMU_CAPS_CPU_MIGRATABLE was not filled in for 6.4.0, and live migration grabs the capabilities from the source, where the absence of this capability makes it presume an older Qemu in the above code?</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Mark Mielke <<a href="mailto:mark.mielke@gmail.com" target="_blank">mark.mielke@gmail.com</a>><br><br></div></div>