vmm: Include device tree in vm.info API

The DeviceNode cannot be fully represented as it embeds a Rust style
enum (i.e. with data) which is instead represented by a simple
associative array.

Fixes: #1167

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2020-11-30 09:06:13 +00:00
committed by Samuel Ortiz
parent 15f0451c34
commit 280d4fb245
5 changed files with 36 additions and 0 deletions
+5
View File
@@ -30,6 +30,7 @@ use crate::config::{
};
use crate::cpu;
use crate::device_manager::{self, get_win_size, Console, DeviceManager, DeviceManagerError};
use crate::device_tree::DeviceTree;
use crate::memory_manager::{Error as MemoryManagerError, MemoryManager};
use crate::migration::{get_vm_snapshot, url_to_path, VM_SNAPSHOT_FILE};
use crate::seccomp_filters::{get_seccomp_filter, Thread};
@@ -1717,6 +1718,10 @@ impl Vm {
.unwrap()
.dirty_memory_range_table()
}
pub fn device_tree(&self) -> Arc<Mutex<DeviceTree>> {
self.device_manager.lock().unwrap().device_tree()
}
}
impl Pausable for Vm {