Quoting Jiri Denemark (2018-05-29 09:34:02)
Hi Chris,
> The new hypervisor specific compare and baseline commands seem to depend on
> qemuCaps being pre-populated with model data that is specific to a hypervisor
> instance.
>
> How do we make sure the qemuCaps are pre-populated with cpu model data for any
> arbitrary hypervisor (with a different exec path, arch, etc) that we can issue
> the hypervisor compare or baseline commands against?
The cache lookup functions automatically generate qemuCaps if they don't
exist (i.e., someone asked for an emulator binary which is not known to
libvirt yet) or if they need to be refreshed (e.g., the QEMU binary
changed in the meantime). It's a bit hidden behind the generic
virFileCache object which uses the following callbacks to handle QEMU
caps cache:
virFileCacheHandlers qemuCapsCacheHandlers = {
.isValid = virQEMUCapsIsValid,
.newData = virQEMUCapsNewData,
.loadFile = virQEMUCapsLoadFile,
.saveFile = virQEMUCapsSaveFile,
.privFree = virQEMUCapsCachePrivFree,
};
Jirka
Got it. Read through cache of sorts. Thanks Jirka and Collin.
Chris.