From: Wei Liu Date: Wed, 2 Nov 2016 14:10:37 +0000 (+0000) Subject: libxl: disallow enabling PoD and ALTP2M at the same time X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~129 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ff53c65311a32e54dba51f2b8112632e9dd2af3b;p=xen.git libxl: disallow enabling PoD and ALTP2M at the same time 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 Acked-by: Ian Jackson Release-acked-by: Wei Liu --- diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index d986cd277b..47c297b4bf 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -885,6 +885,13 @@ 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) { + LOG(ERROR, "Cannot enable PoD and ALTP2M at the same time"); + goto error_out; + } + /* PV vNUMA is not yet supported because there is an issue with * cpuid handling. */