From: Daan De Meyer Date: Fri, 19 Apr 2024 11:41:49 +0000 (+0200) Subject: vmspawn: Fix shared memory check X-Git-Tag: v256-rc1~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5fefec786e35ef7606e2b14e2530878b74ca879;p=thirdparty%2Fsystemd.git vmspawn: Fix shared memory check We need the shared memory added if we're doing runtime mounts as well. --- diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c index 0eba4569715..d3d37fd5d32 100644 --- a/src/vmspawn/vmspawn.c +++ b/src/vmspawn/vmspawn.c @@ -1248,7 +1248,7 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) { log_warning("Couldn't find OVMF firmware blob with Secure Boot support, " "falling back to OVMF firmware blobs without Secure Boot support."); - shm = arg_directory ? ",memory-backend=mem" : ""; + shm = arg_directory || arg_runtime_mounts.n_mounts != 0 ? ",memory-backend=mem" : ""; if (ARCHITECTURE_SUPPORTS_SMM) machine = strjoin("type=" QEMU_MACHINE_TYPE ",smm=", on_off(ovmf_config->supports_sb), shm); else