[libvirt] Is seems necessary to pass "migratable=no/yes" to qemu.

Ján Tomko jtomko at redhat.com
Thu Sep 25 12:59:45 UTC 2014


On 09/25/2014 04:31 AM, zhang bo wrote:
> On 2014/9/24 19:49, Ján Tomko wrote:
>> I think the simplest fix for host-passthrough would be to apply the same
>> filter host-model has.
>>
>> But since using invtsc with host-passthrough requires both +invtsc and
>> migratable=no, so we'd need to either add a 'migratable' option to
>> host-passthrough (this would skip the filter and add migratable=on), or allow
>> fine-tuning the features for host-passthrough too.
>>
>> Jan
>>
> 
>    Additional to the 2 suggestions, will that be OK to remove the codes in qemuProcessVerifyGuestCPU that checks whether the vm->def has
>    invtsc flag while qemu doesn't?
> 
> -             if (STREQ(feature->name, "invtsc") &&
> -                 !cpuHasFeature(guestcpu, feature->name)) {
> -                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> -                                _("host doesn't support invariant TSC"));
> -                 goto cleanup;
> -             }

Without this check, the feature would be quietly discarded by QEMU if the host
kernel or host CPU does not support this feature.

I think it's better to leave "invtsc" out when we're generating the cpu
definition for host-passthrough, as we do for host-model.

Jan

> 
>    Removing these codes, plus with the solution that "add 'migratable' option to host-passthrough", it seems the problem would
>    be gone, and invtsc would not be so 'distinctive' in libvirt any more.
> 
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140925/d58da4d2/attachment-0001.sig>


More information about the libvir-list mailing list