summaryrefslogtreecommitdiffstats
path: root/src/vmspawn/vmspawn.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-04-19 13:38:38 +0200
committerLennart Poettering <lennart@poettering.net>2024-04-20 12:10:42 +0200
commit77290bc83fe9fc3eeba1354e7635a2aa0a1caa2d (patch)
treebd757fb7dc4cdcec2373c226a11bb0b48c4c2b83 /src/vmspawn/vmspawn.c
parentdetect-virt: detect hyperv-enlightened qemu as qemu, not as hyperv (diff)
downloadsystemd-77290bc83fe9fc3eeba1354e7635a2aa0a1caa2d.tar.xz
systemd-77290bc83fe9fc3eeba1354e7635a2aa0a1caa2d.zip
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.
Diffstat (limited to '')
-rw-r--r--src/vmspawn/vmspawn.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c
index d3d37fd5d3..9687119df4 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();