]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
vmspawn: enable hyperv enlightenments
authorLennart Poettering <lennart@poettering.net>
Fri, 19 Apr 2024 11:38:38 +0000 (13:38 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 20 Apr 2024 10:10:42 +0000 (12:10 +0200)
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.

src/vmspawn/vmspawn.c

index d3d37fd5d324790233dfd9f23068d01d51250ca2..9687119df4d8100e165a1a6e219464c9025608a1 100644 (file)
@@ -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();