Skip to content

Commit 13c1bcd

Browse files
committed
more logging
Signed-off-by: Simon Davies <[email protected]>
1 parent 9282fc7 commit 13c1bcd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/hyperlight_host/src/hypervisor/hyperv_linux.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ impl HypervLinuxDriver {
112112
// create_vm_with_args() with an empty arguments structure
113113
// here, because otherwise the partition is set up with a SynIC.
114114

115+
log::debug!("Creating VM with args");
115116
let vm_fd = mshv.create_vm_with_args(&pr)?;
117+
log::debug!("Setting partition property");
116118
let features: hv_partition_synthetic_processor_features = Default::default();
117119
vm_fd.hvcall_set_partition_property(
118120
hv_partition_property_code_HV_PARTITION_PROPERTY_SYNTHETIC_PROC_FEATURES,
@@ -122,15 +124,20 @@ impl HypervLinuxDriver {
122124
vm_fd
123125
};
124126

127+
log::debug!("Creating VCPU");
125128
let mut vcpu_fd = vm_fd.create_vcpu(0)?;
126129

127130
mem_regions.iter().try_for_each(|region| {
128131
let mshv_region = region.to_owned().into();
132+
log::debug!("Mapping user memory for region: {:?}", mshv_region);
129133
vm_fd.map_user_memory(mshv_region)
130134
})?;
131135

136+
log::debug!("Setting up initial sregs");
132137
Self::setup_initial_sregs(&mut vcpu_fd, pml4_ptr.absolute()?)?;
133138

139+
log::debug!("Setting up initial registers");
140+
134141
Ok(Self {
135142
_mshv: mshv,
136143
vm_fd,
@@ -163,7 +170,9 @@ impl HypervLinuxDriver {
163170
},
164171
..Default::default()
165172
};
173+
log::debug!("Setting up initial sregs: {:?}", sregs);
166174
vcpu.set_sregs(&sregs)?;
175+
log::debug!("Setting up initial sregs complete");
167176
Ok(())
168177
}
169178
}

0 commit comments

Comments
 (0)