]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
libxl: warn about ignored CPU mode=custom
authorMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Thu, 12 Apr 2018 01:03:21 +0000 (03:03 +0200)
committerJim Fehlig <jfehlig@suse.com>
Wed, 18 Apr 2018 03:15:27 +0000 (21:15 -0600)
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 <marmarek@invisiblethingslab.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/libxl/libxl_conf.c

index 2565f6473cb576cf0b4eefd0cf27fd8d22b8d311..2053ed332754ac1f7f801b83a44ca734e956407f 100644 (file)
@@ -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