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
+2 -2
View File
@@ -21,7 +21,7 @@ use libc::EFD_NONBLOCK;
use std::io;
use std::os::unix::io::{AsRawFd, RawFd};
use std::sync::mpsc::{Receiver, RecvError, SendError, Sender};
use std::sync::Arc;
use std::sync::{Arc, Mutex};
use std::{result, thread};
use vmm_sys_util::eventfd::EventFd;
@@ -178,7 +178,7 @@ pub struct Vmm {
api_evt: EventFd,
version: String,
vm: Option<Vm>,
vm_config: Option<Arc<VmConfig>>,
vm_config: Option<Arc<Mutex<VmConfig>>>,
}
impl Vmm {