The query-sev-capabilities command fails if SEV is not compiled in,
even though both the command and -object sev-guest are present
in that case :/
Ignore the errors to avoid spamming the logs:
internal error: unable to execute QEMU command 'query-sev-capabilities': SEV feature is not available
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0)
goto cleanup;
+ /* Both -object sev-guest and query-sev-capabilities can be present
+ * even if SEV is not available */
+ if (qemuMonitorJSONHasError(reply, "GenericError")) {
+ ret = 0;
+ goto cleanup;
+ }
if (qemuMonitorJSONCheckError(cmd, reply) < 0)
goto cleanup;