mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
cargo: Bump the kvm and vmm-sys-util crates
Since the kvm crates now depend on vmm-sys-util, the bump must be atomic. The kvm-bindings and ioctls 0.2.0 and 0.4.0 crates come with a few API changes, one of them being the use of a kvm_ioctls specific error type. Porting our code to that type makes for a fairly large diff stat. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
ca97385da5
commit
0f21781fbe
+5
-4
@@ -20,6 +20,7 @@ use libc::{c_void, siginfo_t};
|
||||
use crate::device_manager::DeviceManager;
|
||||
|
||||
use devices::{ioapic, BusDevice};
|
||||
use kvm_bindings::CpuId;
|
||||
use kvm_ioctls::*;
|
||||
|
||||
use vm_memory::{Address, GuestAddress, GuestMemoryMmap};
|
||||
@@ -74,10 +75,10 @@ impl fmt::Display for DebugIoPortRange {
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
/// Cannot open the VCPU file descriptor.
|
||||
VcpuFd(io::Error),
|
||||
VcpuFd(kvm_ioctls::Error),
|
||||
|
||||
/// Cannot run the VCPUs.
|
||||
VcpuRun(io::Error),
|
||||
VcpuRun(kvm_ioctls::Error),
|
||||
|
||||
/// Cannot spawn a new vCPU thread.
|
||||
VcpuSpawn(io::Error),
|
||||
@@ -95,7 +96,7 @@ pub enum Error {
|
||||
FPUConfiguration(arch::x86_64::regs::Error),
|
||||
|
||||
/// The call to KVM_SET_CPUID2 failed.
|
||||
SetSupportedCpusFailed(io::Error),
|
||||
SetSupportedCpusFailed(kvm_ioctls::Error),
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
/// Cannot set the local interruption due to bad configuration.
|
||||
@@ -309,7 +310,7 @@ impl Vcpu {
|
||||
}
|
||||
},
|
||||
|
||||
Err(ref e) => match e.raw_os_error().unwrap() {
|
||||
Err(ref e) => match e.errno() {
|
||||
libc::EAGAIN | libc::EINTR => Ok(true),
|
||||
_ => {
|
||||
error!("VCPU {:?} error {:?}", self.id, e);
|
||||
|
||||
Reference in New Issue
Block a user