Signed-off-by: Zhao Liu <zhao1....@intel.com> --- rust/Cargo.lock | 52 ++++++++++++++++++++++++++++++++++++++++ rust/qemu-api/Cargo.toml | 11 +++++++++ 2 files changed, 63 insertions(+)
diff --git a/rust/Cargo.lock b/rust/Cargo.lock index b785c718f315..7aedae239f66 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -133,6 +133,7 @@ dependencies = [ "foreign", "libc", "qemu_api_macros", + "vm-memory", ] [[package]] @@ -164,6 +165,26 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "thiserror" +version = "1.0.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "unicode-ident" version = "1.0.12" @@ -175,3 +196,34 @@ name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "vm-memory" +version = "0.16.1" +source = "git+https://github.com/rust-vmm/vm-memory.git?rev=5eb996a060d7ca3844cbd2f10b1d048c0c91942f#5eb996a060d7ca3844cbd2f10b1d048c0c91942f" +dependencies = [ + "thiserror", + "winapi", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/rust/qemu-api/Cargo.toml b/rust/qemu-api/Cargo.toml index db7000dee441..bbed3d2de514 100644 --- a/rust/qemu-api/Cargo.toml +++ b/rust/qemu-api/Cargo.toml @@ -19,6 +19,17 @@ anyhow = "~1.0" libc = "0.2.162" foreign = "~0.3.1" +[dependencies.vm-memory] +# The latest v0.16.2 didn't contain Paolo's commit 5f59e29c3d30 +# ("guest_memory: let multiple regions slice one global bitmap"). +# Once a new release has that change, switch to crates.io. +git = "https://github.com/rust-vmm/vm-memory.git" +rev = "5eb996a060d7ca3844cbd2f10b1d048c0c91942f" +# Note "rawfd" (as the only default feature) is disabled by default in +# meson. It cause compilation failure on Windows and fortunately, we +# don't need it either. +default-features = false + [features] default = ["debug_cell"] allocator = [] -- 2.34.1