libxl: Fix xl shutdown for HVM without PV drivers
authorOlaf Hering <olaf@aepfle.de>
Wed, 18 Mar 2020 16:51:51 +0000 (17:51 +0100)
committerWei Liu <wl@xen.org>
Sat, 21 Mar 2020 16:44:15 +0000 (16:44 +0000)
A return value of zero means no PV drivers. Restore a hunk which was removed.

Fixes commit b183e180bce93037d3ef385a8c2338bbfb7f23d9

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Wei Liu <wl@xen.org>
tools/libxl/libxl_domain.c

index 41d08394f3c8e33d54afb7142df9eae582d47eaa..fef2cd4e13f842db2e16a793d16d3ed31eb32590 100644 (file)
@@ -774,6 +774,9 @@ int libxl__domain_pvcontrol(libxl__egc *egc, libxl__xswait_state *pvcontrol,
     if (rc < 0)
         return rc;
 
+    if (!rc)
+        return ERROR_NOPARAVIRT;
+
     shutdown_path = libxl__domain_pvcontrol_xspath(gc, domid);
     if (!shutdown_path)
         return ERROR_FAIL;