]> xenbits.xensource.com Git - xen.git/commitdiff
libxl: disallow enabling PoD and ALTP2M at the same time
authorWei Liu <wei.liu2@citrix.com>
Thu, 3 Nov 2016 16:41:57 +0000 (16:41 +0000)
committerWei Liu <wei.liu2@citrix.com>
Fri, 4 Nov 2016 15:08:26 +0000 (15:08 +0000)
That combination would cause Xen to crash.

Note that although this is a security issue, is not XSA-worthy because
ALTP2M is experimental.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl_create.c

index abd2272e1bab7e1f9b1d1d32db0b578906bf34ef..7c1695a1fd40a326bc22c661e9cc2c71cbf68703 100644 (file)
@@ -915,6 +915,14 @@ static void initiate_domain_create(libxl__egc *egc,
         goto error_out;
     }
 
+    if (d_config->c_info.type == LIBXL_DOMAIN_TYPE_HVM &&
+        libxl_defbool_val(d_config->b_info.u.hvm.altp2m) &&
+        pod_enabled) {
+        ret = ERROR_INVAL;
+        LOG(ERROR, "Cannot enable PoD and ALTP2M at the same time");
+        goto error_out;
+    }
+
     ret = libxl__domain_make(gc, d_config, &domid, &state->config);
     if (ret) {
         LOG(ERROR, "cannot make domain: %d", ret);