Skip to content

Commit 3695134

Browse files
committed
check if 0.5.1mshv crates work with az linux 2
Signed-off-by: Simon Davies <[email protected]>
1 parent 63c04a4 commit 3695134

File tree

6 files changed

+9
-79
lines changed

6 files changed

+9
-79
lines changed

Cargo.lock

Lines changed: 3 additions & 36 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: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,8 @@ gdbstub_arch = { version = "0.3.1", optional = true }
7171
seccompiler = { version = "0.5.0", optional = true }
7272
kvm-bindings = { version = "0.12", features = ["fam-wrappers"], optional = true }
7373
kvm-ioctls = { version = "0.22", optional = true }
74-
mshv-bindings2 = { package="mshv-bindings", version = "=0.2.1", optional = true }
75-
mshv-ioctls2 = { package="mshv-ioctls", version = "=0.2.1", optional = true}
76-
mshv-bindings3 = { package="mshv-bindings", version = "0.5.1", optional = true }
77-
mshv-ioctls3 = { package="mshv-ioctls", version = "0.5.1", optional = true}
74+
mshv-bindings = { version = "0.5", optional = true }
75+
mshv-ioctls = { version = "0.5", optional = true}
7876

7977
[dev-dependencies]
8078
uuid = { version = "1.17.0", features = ["v4"] }
@@ -125,8 +123,8 @@ executable_heap = []
125123
print_debug = []
126124
crashdump = ["dep:tempfile"] # Dumps the VM state to a file on unexpected errors or crashes. The path of the file will be printed on stdout and logged. This feature can only be used in debug builds.
127125
kvm = ["dep:kvm-bindings", "dep:kvm-ioctls"]
128-
mshv2 = ["dep:mshv-bindings2", "dep:mshv-ioctls2"]
129-
mshv3 = ["dep:mshv-bindings3", "dep:mshv-ioctls3"]
126+
mshv2 = []
127+
mshv3 = []
130128
# This enables easy debug in the guest
131129
gdb = ["dep:gdbstub", "dep:gdbstub_arch"]
132130
fuzzing = ["hyperlight-common/fuzzing"]

src/hyperlight_host/src/error.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
#[cfg(mshv2)]
18-
extern crate mshv_ioctls2 as mshv_ioctls;
19-
20-
#[cfg(mshv3)]
21-
extern crate mshv_ioctls3 as mshv_ioctls;
22-
2317
use std::array::TryFromSliceError;
2418
use std::cell::{BorrowError, BorrowMutError};
2519
use std::convert::Infallible;

src/hyperlight_host/src/hypervisor/gdb/mshv_debug.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
#[cfg(mshv2)]
18-
extern crate mshv_bindings2 as mshv_bindings;
19-
#[cfg(mshv2)]
20-
extern crate mshv_ioctls2 as mshv_ioctls;
21-
22-
#[cfg(mshv3)]
23-
extern crate mshv_bindings3 as mshv_bindings;
24-
#[cfg(mshv3)]
25-
extern crate mshv_ioctls3 as mshv_ioctls;
26-
2717
use std::collections::HashMap;
2818

2919
use mshv_bindings::{

src/hyperlight_host/src/hypervisor/hyperv_linux.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
#[cfg(mshv2)]
18-
extern crate mshv_bindings2 as mshv_bindings;
19-
#[cfg(mshv2)]
20-
extern crate mshv_ioctls2 as mshv_ioctls;
21-
22-
#[cfg(mshv3)]
23-
extern crate mshv_bindings3 as mshv_bindings;
24-
#[cfg(mshv3)]
25-
extern crate mshv_ioctls3 as mshv_ioctls;
26-
2717
use std::fmt::{Debug, Formatter};
2818

2919
use log::{error, LevelFilter};
@@ -71,7 +61,8 @@ use crate::{log_then_return, new_error, Result};
7161
mod debug {
7262
use std::sync::{Arc, Mutex};
7363

74-
use super::mshv_bindings::hv_x64_exception_intercept_message;
64+
use mshv_bindings::hv_x64_exception_intercept_message;
65+
7566
use super::{HypervLinuxDriver, *};
7667
use crate::hypervisor::gdb::{DebugMsg, DebugResponse, VcpuStopReason, X86_64Regs};
7768
use crate::hypervisor::handlers::DbgMemAccessHandlerCaller;

src/hyperlight_host/src/mem/memory_region.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
#[cfg(mshv2)]
18-
extern crate mshv_bindings2 as mshv_bindings;
19-
#[cfg(mshv2)]
20-
extern crate mshv_ioctls2 as mshv_ioctls;
21-
22-
#[cfg(mshv3)]
23-
extern crate mshv_bindings3 as mshv_bindings;
24-
#[cfg(mshv3)]
25-
extern crate mshv_ioctls3 as mshv_ioctls;
26-
2717
use std::ops::Range;
2818

2919
use bitflags::bitflags;

0 commit comments

Comments
 (0)