Skip to content

Commit a0ad034

Browse files
committed
Upgrade KVM bindings and map error type directly
Signed-off-by: James Sturtevant <[email protected]>
1 parent a83049f commit a0ad034

File tree

4 files changed

+15
-33
lines changed

4 files changed

+15
-33
lines changed

Cargo.lock

Lines changed: 11 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/hyperlight_host/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ lazy_static = "1.4.0"
7575
[target.'cfg(unix)'.dependencies]
7676
seccompiler = { version = "0.5.0", optional = true }
7777
kvm-bindings = { version = "0.14", features = ["fam-wrappers"], optional = true }
78-
kvm-ioctls = { version = "0.23", optional = true }
78+
kvm-ioctls = { version = "0.24", optional = true }
7979
mshv-bindings2 = { package="mshv-bindings", version = "=0.2.1", optional = true }
8080
mshv-ioctls2 = { package="mshv-ioctls", version = "=0.2.1", optional = true}
8181
mshv-bindings3 = { package="mshv-bindings", version = "=0.3.2", optional = true }

src/hyperlight_host/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ pub enum HyperlightError {
268268
/// vmm sys Error Occurred
269269
#[error("vmm sys Error {0:?}")]
270270
#[cfg(target_os = "linux")]
271-
VmmSysError(#[from] vmm_sys_util::errno::Error),
271+
VmmSysError(vmm_sys_util::errno::Error),
272272

273273
/// Windows Error
274274
#[cfg(target_os = "windows")]

src/hyperlight_host/src/signal_handlers/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ pub(crate) fn setup_signal_handlers(config: &SandboxConfiguration) -> crate::Res
5252
vmm_sys_util::signal::register_signal_handler(
5353
libc::SIGRTMIN() + config.get_interrupt_vcpu_sigrtmin_offset() as c_int,
5454
vm_kill_signal,
55-
)?;
55+
)
56+
.map_err(|e| crate::HyperlightError::VmmSysError(e))?;
5657

5758
// Note: For libraries registering signal handlers, it's important to keep in mind that
5859
// the user of the library could have their own signal handlers that we don't want to

0 commit comments

Comments
 (0)