[libvirt] [PATCH 03/10] qemu: fail if virQEMUCapsProbeQMPSEVCapabilities fails

Ján Tomko jtomko at redhat.com
Tue Jun 12 12:00:17 UTC 2018


Do not mask the errors.

If we'd expect query-sev-capabilities to fail, we should not
call it in the first place.

Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
 src/qemu/qemu_capabilities.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 7a245a58bc..35d46c465d 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -4105,7 +4105,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
     /* Probe for SEV capabilities */
     if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SEV_GUEST)) {
         if (virQEMUCapsProbeQMPSEVCapabilities(qemuCaps, mon) < 0)
-            virQEMUCapsClear(qemuCaps, QEMU_CAPS_SEV_GUEST);
+            goto cleanup;
     }
 
     ret = 0;
-- 
2.16.1




More information about the libvir-list mailing list