From 77290bc83fe9fc3eeba1354e7635a2aa0a1caa2d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 19 Apr 2024 13:38:38 +0200 Subject: [PATCH] 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. --- src/vmspawn/vmspawn.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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(); -- 2.47.3