diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-10-10 23:28:41 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-02-26 15:58:49 +0000 |
commit | c85b5d529a6d4ab28a93aa1e9b3f3f6459daca50 (patch) | |
tree | a93b13f34be72c1dccec73982a0e25489d9e69b8 | |
parent | 629fd0811fdea5b6bd0281ed5e21aff6e119e9a9 (diff) | |
download | spectrum-c85b5d529a6d4ab28a93aa1e9b3f3f6459daca50.tar spectrum-c85b5d529a6d4ab28a93aa1e9b3f3f6459daca50.tar.gz spectrum-c85b5d529a6d4ab28a93aa1e9b3f3f6459daca50.tar.bz2 spectrum-c85b5d529a6d4ab28a93aa1e9b3f3f6459daca50.tar.lz spectrum-c85b5d529a6d4ab28a93aa1e9b3f3f6459daca50.tar.xz spectrum-c85b5d529a6d4ab28a93aa1e9b3f3f6459daca50.tar.zst spectrum-c85b5d529a6d4ab28a93aa1e9b3f3f6459daca50.zip |
host/start-vm: use MAP_SHARED memory for VMs
This is required for any use of vhost-user. Since any VM might have a vhost-user device hotplugged, this needs to be on from the start for all VMs. Signed-off-by: Alyssa Ross <hi@alyssa.is> Message-Id: <20221010232909.1953738-2-hi@alyssa.is>
-rw-r--r-- | host/start-vm/lib.rs | 2 | ||||
-rw-r--r-- | host/start-vm/tests/vm_command-basic.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/host/start-vm/lib.rs b/host/start-vm/lib.rs index ef79091..9a92ab7 100644 --- a/host/start-vm/lib.rs +++ b/host/start-vm/lib.rs @@ -44,7 +44,7 @@ pub fn vm_command(dir: PathBuf, config_root: &Path) -> Result<Command, String> { command.arg("cloud-hypervisor"); command.args(&["--api-socket", "env/cloud-hypervisor.sock"]); command.args(&["--cmdline", "console=ttyS0 root=PARTLABEL=root"]); - command.args(&["--memory", "size=128M"]); + command.args(&["--memory", "size=128M,shared=on"]); command.args(&["--console", "pty"]); command.arg("--kernel"); command.arg(config_dir.join("vmlinux")); diff --git a/host/start-vm/tests/vm_command-basic.rs b/host/start-vm/tests/vm_command-basic.rs index b9585f9..4145b94 100644 --- a/host/start-vm/tests/vm_command-basic.rs +++ b/host/start-vm/tests/vm_command-basic.rs @@ -37,7 +37,7 @@ fn main() -> std::io::Result<()> { OsStr::new("--cmdline"), OsStr::new("console=ttyS0 root=PARTLABEL=root"), OsStr::new("--memory"), - OsStr::new("size=128M"), + OsStr::new("size=128M,shared=on"), OsStr::new("--console"), OsStr::new("pty"), OsStr::new("--kernel"), |