vmm: fix warnings when KVM is not enabled

Some imports are only used by KVM. Some variables and code become dead
or unused when KVM is not enabled.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu
2020-07-28 17:01:48 +00:00
committed by Rob Bradford
parent 15bf61c6aa
commit 218ec563fc
2 changed files with 5 additions and 3 deletions

View File

@@ -251,6 +251,7 @@ pub struct Vm {
cpu_manager: Arc<Mutex<cpu::CpuManager>>,
memory_manager: Arc<Mutex<MemoryManager>>,
#[cfg(target_arch = "x86_64")]
#[cfg_attr(not(feature = "kvm"), allow(dead_code))]
// The hypervisor abstracted virtual machine.
vm: Arc<dyn hypervisor::Vm>,
#[cfg(target_arch = "x86_64")]