We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24e7737 commit 7220a78Copy full SHA for 7220a78
vmm_core/virt_mshv/src/lib.rs
@@ -138,12 +138,8 @@ impl virt::Hypervisor for LinuxMshv {
138
break;
139
}
140
141
- match vmfd.initialize() {
142
- Ok(()) => {}
143
- Err(_) => {
144
- return Err(Error::CreateVMFailed);
145
- }
146
+ vmfd.initialize()
+ .map_err(|e| Error::CreateVMInitFailed(e.into()))?;
147
148
// Create virtual CPUs.
149
let mut vps: Vec<MshvVpInner> = Vec::new();
@@ -1083,6 +1079,8 @@ pub enum Error {
1083
1079
NotSupported,
1084
1080
#[error("create_vm failed")]
1085
1081
CreateVMFailed,
1082
+ #[error("failed to initialize VM")]
+ CreateVMInitFailed(#[source] anyhow::Error),
1086
#[error("failed to create VCPU")]
1087
CreateVcpu(#[source] MshvError),
1088
#[error("vtl2 not supported")]
0 commit comments