vmm: Switch to storing VmConfig inside an Arc<Mutex<>>

This permits the runtime reconfiguration of the VM.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2019-12-05 14:50:38 +00:00
parent c063bb8d30
commit 1722708612
6 changed files with 65 additions and 50 deletions

View File

@@ -377,7 +377,7 @@ fn main() {
vmm::api::vm_create(
api_evt.try_clone().unwrap(),
api_request_sender,
Arc::new(vm_config),
Arc::new(Mutex::new(vm_config)),
)
.expect("Could not create the VM");
vmm::api::vm_boot(api_evt.try_clone().unwrap(), sender).expect("Could not boot the VM");