diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7861beefc4b4d186376541cd3847e08adaa93105..8e1177c46592ac5ccfebc9a0a8c5a652d7a7097b 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -661,7 +661,8 @@ qemuCapsInitGuest(virCapsPtr caps, /* Ignore binary if extracting version info fails */ if (binary && - qemuCapsExtractVersionInfo(binary, info->arch, NULL, &qemuCaps) < 0) + qemuCapsExtractVersionInfo(binary, info->arch, + false, NULL, &qemuCaps) < 0) VIR_FREE(binary); /* qemu-kvm/kvm binaries can only be used if @@ -683,7 +684,8 @@ qemuCapsInitGuest(virCapsPtr caps, continue; if (qemuCapsExtractVersionInfo(kvmbin, info->arch, - NULL, &kvmCaps) < 0) { + false, NULL, + &kvmCaps) < 0) { VIR_FREE(kvmbin); continue; } @@ -1489,7 +1491,9 @@ qemuCapsParseDeviceStr(const char *str, virBitmapPtr flags) return 0; } -int qemuCapsExtractVersionInfo(const char *qemu, const char *arch, +int qemuCapsExtractVersionInfo(const char *qemu, + const char *arch, + bool check_yajl, unsigned int *retversion, virBitmapPtr *retflags) { @@ -1522,7 +1526,8 @@ int qemuCapsExtractVersionInfo(const char *qemu, const char *arch, if (!(flags = qemuCapsNew()) || qemuCapsParseHelpStr(qemu, help, flags, - &version, &is_kvm, &kvm_version, true) == -1) + &version, &is_kvm, &kvm_version, + check_yajl) == -1) goto cleanup; /* Currently only x86_64 and i686 support PCI-multibus. */ @@ -1600,7 +1605,8 @@ int qemuCapsExtractVersion(virCapsPtr caps, return -1; } - if (qemuCapsExtractVersionInfo(binary, ut.machine, version, NULL) < 0) { + if (qemuCapsExtractVersionInfo(binary, ut.machine, false, + version, NULL) < 0) { return -1; } diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 6526ea838df9a982484e938aa7cac30e5d40b192..ca5482914154016043c13562dcf6dea493d22aa8 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -169,7 +169,9 @@ int qemuCapsProbeCPUModels(const char *qemu, int qemuCapsExtractVersion(virCapsPtr caps, unsigned int *version); -int qemuCapsExtractVersionInfo(const char *qemu, const char *arch, +int qemuCapsExtractVersionInfo(const char *qemu, + const char *arch, + bool check_yajl, unsigned int *version, virBitmapPtr *qemuCaps); diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index d34af96db42bf8bb80b2d37aa1a3957e5aaed8f0..d6df4ee10fcb000ab4dd167f34d496b488e65ada 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -776,7 +776,7 @@ qemuDomainAssignS390Addresses(virDomainDefPtr def, virBitmapPtr qemuCaps) if (!qemuCaps) { /* need to get information from real environment */ if (qemuCapsExtractVersionInfo(def->emulator, def->os.arch, - NULL, + false, NULL, &localCaps) < 0) goto cleanup; qemuCaps = localCaps; @@ -1015,6 +1015,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def, if (!qemuCaps) { /* need to get information from real environment */ if (qemuCapsExtractVersionInfo(def->emulator, def->os.arch, + false, NULL, &localCaps) < 0) goto cleanup; diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 46831a68a427c09f828d5c76ebce574a7fb66db2..ecd2ec18dc7cb124d8ed9ddfca97be3e9a944ebe 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4761,6 +4761,7 @@ static char *qemuDomainXMLToNative(virConnectPtr conn, } if (qemuCapsExtractVersionInfo(def->emulator, def->os.arch, + false, NULL, &qemuCaps) < 0) goto cleanup; diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 5bdf7335470cf3c61d8014bfcdf4a1ebca060e71..dad5304940881998a303da80d6442492750cb3e9 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3104,6 +3104,7 @@ qemuProcessReconnect(void *opaque) */ if (!priv->qemuCaps && qemuCapsExtractVersionInfo(obj->def->emulator, obj->def->os.arch, + false, NULL, &priv->qemuCaps) < 0) goto error; @@ -3504,6 +3505,7 @@ int qemuProcessStart(virConnectPtr conn, qemuCapsFree(priv->qemuCaps); priv->qemuCaps = NULL; if (qemuCapsExtractVersionInfo(vm->def->emulator, vm->def->os.arch, + true, NULL, &priv->qemuCaps) < 0) goto cleanup; @@ -4248,6 +4250,7 @@ int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED, priv->qemuCaps = NULL; if (qemuCapsExtractVersionInfo(vm->def->emulator, vm->def->os.arch, + false, NULL, &priv->qemuCaps) < 0) goto cleanup;