]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Use virQEMUCapsCacheLookupDefault instead of lookup by arch
authorErik Skultety <eskultet@redhat.com>
Fri, 3 Jul 2020 12:26:13 +0000 (14:26 +0200)
committerErik Skultety <eskultet@redhat.com>
Wed, 8 Jul 2020 08:55:07 +0000 (10:55 +0200)
commitf3d838237d55ee636163825c1e4ee573d8437968
treed9b441470bce06e908024c4a4ca01fc2f76bc1ef
parent049846b9fd356270a5bafe211f11792582ab6285
qemu: Use virQEMUCapsCacheLookupDefault instead of lookup by arch

Firstly, SEV is present only on AMD, so we can safely assume x86.
Secondly, the problem with looking up capabilities in the cache by arch
is that it's using virHashSearch with a callback to find the right
capabilities and get the binary name from it as well, but since the
cache is empty, it will return NULL and we won't get the corresponding
binary name out of the lookup either. Then, during the cache validation
we try to create a new cache entry for the emulator, but since we don't
have the binary name, nothing gets created.
Therefore, virQEMUCapsCacheLookupDefault is used to fix this issue,
because it doesn't rely on the capabilities cache to construct the
emulator binary name.

https://bugzilla.redhat.com/show_bug.cgi?id=1852311

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/qemu/qemu_driver.c