From: Marek Marczykowski-Górecki Date: Thu, 12 Apr 2018 01:03:21 +0000 (+0200) Subject: libxl: warn about ignored CPU mode=custom X-Git-Tag: v4.3.0-rc1~197 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c49e04ecd0e442389b029004a0f0bc3e958a6eb;p=thirdparty%2Flibvirt.git libxl: warn about ignored CPU mode=custom When support for mode=custom will be added in the future, semantics of current config will change. Reduce the surprise by emitting a warning. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Daniel P. Berrangé --- diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 2565f6473c..2053ed3327 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -424,6 +424,12 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, libxl_defbool_set(&b_info->u.hvm.nested_hvm, hasHwVirt); } + if (def->cpu && def->cpu->mode == VIR_CPU_MODE_CUSTOM) { + VIR_WARN("Ignoring CPU with mode=custom, update your config to " + "mode=host-passthrough to avoid risk of changed guest " + "semantics when mode=custom is supported in the future"); + } + if (def->nsounds > 0) { /* * Use first sound device. man xl.cfg(5) describes soundhw as