From 5b3b50062250aa319b26f2ae027350c62b90b242 Mon Sep 17 00:00:00 2001 From: Simon Davies Date: Wed, 6 Nov 2024 09:36:40 +0000 Subject: [PATCH] updates kvm bindings and ioctls Signed-off-by: Simon Davies --- src/hyperlight_host/Cargo.toml | 4 ++-- src/hyperlight_host/src/hypervisor/kvm.rs | 11 ++++------- src/tests/rust_guests/callbackguest/Cargo.lock | 4 ++-- src/tests/rust_guests/simpleguest/Cargo.lock | 4 ++-- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/hyperlight_host/Cargo.toml b/src/hyperlight_host/Cargo.toml index 7486a6ba3..e8b365b4f 100644 --- a/src/hyperlight_host/Cargo.toml +++ b/src/hyperlight_host/Cargo.toml @@ -65,8 +65,8 @@ windows-result = "0.2" seccompiler = { version = "0.4.0", optional = true } mshv-bindings = { workspace = true, optional = true } mshv-ioctls = { workspace = true, optional = true } -kvm-bindings = { version = "0.9.0", features = ["fam-wrappers"], optional = true } -kvm-ioctls = { version = "0.18.0", optional = true } +kvm-bindings = { version = "0.10.0", features = ["fam-wrappers"], optional = true } +kvm-ioctls = { version = "0.19.0", optional = true } [dev-dependencies] signal-hook-registry = "1.4.1" diff --git a/src/hyperlight_host/src/hypervisor/kvm.rs b/src/hyperlight_host/src/hypervisor/kvm.rs index 24d6c1472..338d97b14 100644 --- a/src/hyperlight_host/src/hypervisor/kvm.rs +++ b/src/hyperlight_host/src/hypervisor/kvm.rs @@ -145,16 +145,13 @@ impl Debug for KVMDriver { f.field("Registers", ®s); } - // TODO: the call to get sregs is removed because it hangs after updating to kvm-ioctls 0.18 - // this needs to be investigated or to be replaced with sync_regs() to see if that gets around the issue - - //let sregs = self.vcpu_fd.get_sregs(); + let sregs = self.vcpu_fd.get_sregs(); // check that sregs is OK and then set field in debug struct - // if let Ok(sregs) = sregs { - // f.field("Special Registers", &sregs); - // } + if let Ok(sregs) = sregs { + f.field("Special Registers", &sregs); + } f.finish() } diff --git a/src/tests/rust_guests/callbackguest/Cargo.lock b/src/tests/rust_guests/callbackguest/Cargo.lock index b4a6a3cf9..b0b45ec48 100644 --- a/src/tests/rust_guests/callbackguest/Cargo.lock +++ b/src/tests/rust_guests/callbackguest/Cargo.lock @@ -22,9 +22,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "buddy_system_allocator" -version = "0.9.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d44d578cadd17312c75e7d0ef489361f160ace58f7139aa32001fee1a51b89b5" +checksum = "a1a0108968a3a2dab95b089c0fc3f1afa7759aa5ebe6f1d86d206d6f7ba726eb" dependencies = [ "spin", ] diff --git a/src/tests/rust_guests/simpleguest/Cargo.lock b/src/tests/rust_guests/simpleguest/Cargo.lock index c4a7a900f..738128c79 100644 --- a/src/tests/rust_guests/simpleguest/Cargo.lock +++ b/src/tests/rust_guests/simpleguest/Cargo.lock @@ -22,9 +22,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "buddy_system_allocator" -version = "0.9.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d44d578cadd17312c75e7d0ef489361f160ace58f7139aa32001fee1a51b89b5" +checksum = "a1a0108968a3a2dab95b089c0fc3f1afa7759aa5ebe6f1d86d206d6f7ba726eb" dependencies = [ "spin", ]