mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
hypervisor: mshv: Add VmFd to MshvVcpu struct
This would be required later to implement few additional operations on top of it. Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
This commit is contained in:
parent
a69d8c63b3
commit
96bc282759
@ -338,6 +338,8 @@ pub struct MshvVcpu {
|
|||||||
cpuid: Vec<CpuIdEntry>,
|
cpuid: Vec<CpuIdEntry>,
|
||||||
msrs: Vec<MsrEntry>,
|
msrs: Vec<MsrEntry>,
|
||||||
vm_ops: Option<Arc<dyn vm::VmOps>>,
|
vm_ops: Option<Arc<dyn vm::VmOps>>,
|
||||||
|
#[cfg(feature = "sev_snp")]
|
||||||
|
vm_fd: Arc<VmFd>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Implementation of Vcpu trait for Microsoft Hypervisor
|
/// Implementation of Vcpu trait for Microsoft Hypervisor
|
||||||
@ -1435,6 +1437,8 @@ impl vm::Vm for MshvVm {
|
|||||||
cpuid: Vec::new(),
|
cpuid: Vec::new(),
|
||||||
msrs: self.msrs.clone(),
|
msrs: self.msrs.clone(),
|
||||||
vm_ops,
|
vm_ops,
|
||||||
|
#[cfg(feature = "sev_snp")]
|
||||||
|
vm_fd: self.fd.clone(),
|
||||||
};
|
};
|
||||||
Ok(Arc::new(vcpu))
|
Ok(Arc::new(vcpu))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user