Caching qemu capabilities and KubeVirt

Roman Mohr rmohr at google.com
Thu Sep 8 12:24:00 UTC 2022


Hi,


I have a question regarding capability caching  in the context of KubeVirt.
Since we start in KubeVirt one libvirt instance per VM, libvirt has to
re-discover on every VM start the qemu capabilities which leads to a 1-2s+
delay in startup.

We already discover the features in a dedicated KubeVirt pod on each node.
Therefore I tried to copy the capabilities over to see if that would work.

It looks like in general it could work, but libvirt seems to detect a
mismatch in the exposed KVM CPU ID in every pod. Therefore it invalidates
the cache. The recreated capability cache looks esctly like the original
one though ...

The check responsible for the invalidation is this:

```
Outdated capabilities for '%s': host cpuid changed
```

So the KVM_GET_SUPPORTED_CPUID call seems to return
slightly different values in different containers.

After trying out the attached golang scripts in different containers, I
could indeed see differences.

I can however not really judge what the differences in these KVM function
registers mean and I am curious if someone else knows. The files are
attached too (as json for easy diffing).

Best regards,
Roman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20220908/fd7e3309/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testbin.go
Type: text/x-go
Size: 754 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20220908/fd7e3309/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testbin_launcher.json
Type: application/json
Size: 19776 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20220908/fd7e3309/attachment-0002.json>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testbin_handler.json
Type: application/json
Size: 19776 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20220908/fd7e3309/attachment-0003.json>


More information about the libvirt-users mailing list