From: Lennart Poettering Date: Fri, 19 Apr 2024 11:38:38 +0000 (+0200) Subject: vmspawn: enable hyperv enlightenments X-Git-Tag: v256-rc1~93^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77290bc83fe9fc3eeba1354e7635a2aa0a1caa2d;p=thirdparty%2Fsystemd.git vmspawn: enable hyperv enlightenments THese are generally recommended (and libvirt/gnome-boxes default to them hence). They are mostly relevant for Windows, but I think it makes sense to enable them anyway for Linux too, simply to excercise #28001, and they shouldn't hurt. --- diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c index d3d37fd5d32..9687119df4d 100644 --- a/src/vmspawn/vmspawn.c +++ b/src/vmspawn/vmspawn.c @@ -1421,7 +1421,13 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) { pass_fds[n_pass_fds++] = device_fd; } - r = strv_extend_many(&cmdline, "-cpu", "max"); + r = strv_extend_many(&cmdline, "-cpu", +#ifdef __x86_64__ + "max,hv_relaxed,hv-vapic,hv-time" +#else + "max" +#endif + ); if (r < 0) return log_oom();