mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
hypervisor: mshv: drop one unsafe in code
The binding already provides a default() method which does the same thing. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
ae68c802bd
commit
86afa38c64
@ -288,9 +288,7 @@ impl cpu::Vcpu for MshvVcpu {
|
||||
}
|
||||
#[allow(non_upper_case_globals)]
|
||||
fn run(&self) -> std::result::Result<cpu::VmExit, cpu::HypervisorCpuError> {
|
||||
// Safe because this is just only done during initialization.
|
||||
// TODO don't zero it everytime we enter this function.
|
||||
let hv_message: hv_message = unsafe { std::mem::zeroed() };
|
||||
let hv_message: hv_message = hv_message::default();
|
||||
match self.fd.run(hv_message) {
|
||||
Ok(x) => match x.header.message_type {
|
||||
hv_message_type_HVMSG_X64_HALT => {
|
||||
|
Loading…
Reference in New Issue
Block a user