mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor: Remove unused VmExit enum members
The members for {Io, Mmio}{Read, Write} are unused as instead exits of
those types are handled through the VmOps interface. Removing these is
also a prerequisite due to changes in the mutability of the
VcpuFd::run() method.
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
This commit is contained in:
@@ -1147,15 +1147,6 @@ impl CpuManager {
|
||||
unreachable!("Couldn't get a mutable reference from Arc<dyn Vcpu> as there are multiple instances");
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
error!(
|
||||
"VCPU generated error: {:?}",
|
||||
Error::UnexpectedVmExit
|
||||
);
|
||||
vcpu_run_interrupted.store(true, Ordering::SeqCst);
|
||||
exit_evt.write(1).unwrap();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
Err(e) => {
|
||||
|
||||
@@ -3246,17 +3246,11 @@ pub fn test_vm() {
|
||||
|
||||
loop {
|
||||
match vcpu.run().expect("run failed") {
|
||||
VmExit::IoOut(addr, data) => {
|
||||
println!(
|
||||
"IO out -- addr: {:#x} data [{:?}]",
|
||||
addr,
|
||||
str::from_utf8(data).unwrap()
|
||||
);
|
||||
}
|
||||
VmExit::Reset => {
|
||||
println!("HLT");
|
||||
break;
|
||||
}
|
||||
VmExit::Ignore => {}
|
||||
r => panic!("unexpected exit reason: {r:?}"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user