[xen master] libxl: don't set PoD target for PV guests

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen master] libxl: don't set PoD target for PV guests

patchbot
commit b824478103d590dc6b755d20ff8aae4d3f8ed3e4
Author:     Wei Liu <[hidden email]>
AuthorDate: Tue Sep 4 17:15:23 2018 +0100
Commit:     Wei Liu <[hidden email]>
CommitDate: Fri Sep 7 15:01:39 2018 +0100

    libxl: don't set PoD target for PV guests
   
    Previously PoD target was unconditionally set for both PV and HVM
    guests, but in fact PoD has always been an HVM (now PVH as well) only
    feature.
   
    Signed-off-by: Wei Liu <[hidden email]>
    Acked-by: Ian Jackson <[hidden email]>
---
 tools/libxl/libxl_mem.c | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/tools/libxl/libxl_mem.c b/tools/libxl/libxl_mem.c
index e551e09fed..448a2af8fd 100644
--- a/tools/libxl/libxl_mem.c
+++ b/tools/libxl/libxl_mem.c
@@ -298,16 +298,18 @@ retry_transaction:
         }
     }
 
-    r = xc_domain_set_pod_target(ctx->xch, domid,
-            (new_target_memkb + size) / 4, NULL, NULL, NULL);
-    if (r != 0) {
-        LOGED(ERROR, domid,
-              "xc_domain_set_pod_target memkb=%"PRIu64" failed rc=%d\n",
-              (new_target_memkb + size) / 4,
-              r);
-        abort_transaction = 1;
-        rc = ERROR_FAIL;
-        goto out;
+    if (d_config.c_info.type != LIBXL_DOMAIN_TYPE_PV) {
+        r = xc_domain_set_pod_target(ctx->xch, domid,
+                (new_target_memkb + size) / 4, NULL, NULL, NULL);
+        if (r != 0) {
+            LOGED(ERROR, domid,
+                  "xc_domain_set_pod_target memkb=%"PRIu64" failed rc=%d\n",
+                  (new_target_memkb + size) / 4,
+                  r);
+            abort_transaction = 1;
+            rc = ERROR_FAIL;
+            goto out;
+        }
     }
 
     libxl__xs_printf(gc, t, GCSPRINTF("%s/memory/target", dompath),
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog